I got this libasan output from my sanitiser-enabled debug build, though while using the footprint selector dialog to change a footprint for a part. Although a debug build, I cannot find out how to get the debug symbols to be found (installed?) in a flatpak build. If anyone can assist I'm all ears.

The messages about 'toplevel window not shown' are very persistent while using the app. I presume this is to do with syncing the display of pcbnew part and eeschema part, but it seems to me unhelpful to keep showing the message.

Version info:

Application: KiCad

Version: (5.99.0-13123-g97e9348ee1-dirty), debug build

Libraries:
    wxWidgets 3.1.5
    libcurl/7.79.1-DEV GnuTLS/3.7.2 (NSS/3.69) (OpenSSL/1.1.1l) zlib/1.2.11 libidn2/2.3.1 nghttp2/1.44.0

Platform: Linux 5.11.0-38-generic x86_64, 64 bit, Little endian, wxGTK, KDE, x11

Build Info:
    Date: Nov  7 2021 01:26:49
    wxWidgets: 3.1.5 (wchar_t,wx containers) GTK+ 3.24
    Boost: 1.77.0
    OCC: 7.5.1
    Curl: 7.79.1-DEV
    ngspice: 35
    Compiler: GCC 11.2.0 with C++ ABI 1016

Build settings:
    KICAD_USE_OCC=ON
    KICAD_USE_EGL=ON
    KICAD_SPICE=ON
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE_ADDRESS=ON
    KICAD_SANITIZE_THREADS=OFF


To get that version info I started kicad to show the About box. There is then a quite extensive memory leak report displayed. I don't know if this is of interest? The two largest direct leaks are 384k from font enumeration, and 147k from PyUnicode_InternInPlace / PyDict_SetDefault.

The ASAN info is:

=-=--=-=-=-=-=-= cut =-=-=-=-=-=-=-=

$ flatpak run --devel org.kicad.KiCad.Nightly
04:35:27: Debug: ScreenToClient cannot work when toplevel window is not shown
04:35:37: Debug: ScreenToClient cannot work when toplevel window is not shown
==2==WARNING: ASan is ignoring requested __asan_handle_no_return: stack type: default top: 0x7ffe6a8e1000; bottom 0x7f28c4074000; size: 0x00d5a686d000 (917621886976)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
=================================================================
==2==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f28c4076730 at pc 0x7f28d293c2e7 bp 0x7f28c4076700 sp 0x7f28c4075ea8
WRITE of size 24 at 0x7f28c4076730 thread T0
    #0 0x7f28d293c2e6 in __interceptor_sigaltstack.part.0 (/usr/lib/x86_64-linux-gnu/libasan.so.6+0x582e6)
    #1 0x7f28d29a26a5 in __asan::PlatformUnpoisonStacks() (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xbe6a5)
    #2 0x7f28d29a84e4 in __asan_handle_no_return (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xc44e4)
    #3 0x7f28bf648bbf  (/app/bin/_eeschema.kiface+0x885bbf)
    #4 0x7f28c084f783  (/app/bin/_eeschema.kiface+0x1a8c783)
    #5 0x7f28c0431de1  (/app/bin/_eeschema.kiface+0x166ede1)
    #6 0x7f28c04327ef  (/app/bin/_eeschema.kiface+0x166f7ef)
    #7 0x7f28bfe30d79  (/app/bin/_eeschema.kiface+0x106dd79)
    #8 0x7f28c1180d3d  (/app/bin/_eeschema.kiface+0x23bdd3d)
    #9 0x7f28c11810ea  (/app/bin/_eeschema.kiface+0x23be0ea)
    #10 0x7f28d1d8329d in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x21729d)
    #11 0x7f28d1d8377e in wxEvtHandler::SearchDynamicEventTable(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x21777e)
    #12 0x7f28d1d83b2c in wxEvtHandler::TryHereOnly(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x217b2c)
    #13 0x7f28d1d83bdf in wxEvtHandler::ProcessEventLocally(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x217bdf)
    #14 0x7f28d1d83cf1 in wxEvtHandler::ProcessEvent(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x217cf1)
    #15 0x7f28d243d384 in wxWindowBase::TryAfter(wxEvent&) (/app/lib/libwx_gtk3u_core-3.1.so.5+0x5a8384)
    #16 0x7f28d1d85553 in wxEvtHandler::SafelyProcessEvent(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x219553)
    #17 0x7f28d2286cc4  (/app/lib/libwx_gtk3u_core-3.1.so.5+0x3f1cc4)
    #18 0x7f28d0e53577 in _g_closure_invoke_va (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x16577)
    #19 0x7f28d0e6d82a in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x3082a)
    #20 0x7f28d0e6da42 in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x30a42)
    #21 0x7f28d11d6357 in gtk_real_button_released (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x156357)
    #22 0x7f28d0e53577 in _g_closure_invoke_va (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x16577)
    #23 0x7f28d0e6d82a in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x3082a)
    #24 0x7f28d0e6da42 in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x30a42)
    #25 0x7f28d11d452c in multipress_released_cb (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x15452c)
    #26 0x7f28d14b18bc in _gtk_marshal_VOID__INT_DOUBLE_DOUBLEv (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x4318bc)
    #27 0x7f28d0e53577 in _g_closure_invoke_va (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x16577)
    #28 0x7f28d0e6d82a in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x3082a)
    #29 0x7f28d0e6da42 in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x30a42)
    #30 0x7f28d12aa019 in gtk_gesture_multi_press_end (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x22a019)
    #31 0x7f28d0e56922 in g_cclosure_marshal_VOID__BOXEDv (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x19922)
    #32 0x7f28d0e53577 in _g_closure_invoke_va (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x16577)
    #33 0x7f28d0e6d82a in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x3082a)
    #34 0x7f28d0e6da42 in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x30a42)
    #35 0x7f28d12a6d47 in _gtk_gesture_check_recognized (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x226d47)
    #36 0x7f28d12a858a in gtk_gesture_handle_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x22858a)
    #37 0x7f28d12ab99d in gtk_gesture_single_handle_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x22b99d)
    #38 0x7f28d126f1c4 in gtk_event_controller_handle_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ef1c4)
    #39 0x7f28d144f525 in _gtk_widget_run_controllers (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x3cf525)
    #40 0x7f28d14ab440 in _gtk_marshal_BOOLEAN__BOXED (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x42b440)
    #41 0x7f28d0e53348 in g_closure_invoke (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x16348)
    #42 0x7f28d0e664a2 in signal_emit_unlocked_R (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x294a2)
    #43 0x7f28d0e6d1ba in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x301ba)
    #44 0x7f28d0e6da42 in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x30a42)
    #45 0x7f28d1450ea3 in gtk_widget_event_internal.part.0 (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x3d0ea3)
    #46 0x7f28d12f609e in propagate_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x27609e)
    #47 0x7f28d12f7cab in gtk_main_do_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x277cab)
    #48 0x7f28d0063191 in _gdk_event_emit (/usr/lib/x86_64-linux-gnu/libgdk-3.so.0+0x3f191)
    #49 0x7f28d00993ae in gdk_event_source_dispatch (/usr/lib/x86_64-linux-gnu/libgdk-3.so.0+0x753ae)
    #50 0x7f28d0d5f2a0 in g_main_context_dispatch (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x592a0)
    #51 0x7f28d0d5f547 in g_main_context_iterate.constprop.0 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x59547)
    #52 0x7f28d0d5f862 in g_main_loop_run (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x59862)
    #53 0x7f28d12f6d84 in gtk_main (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x276d84)
    #54 0x7f28d221eb04 in wxGUIEventLoop::DoRun() (/app/lib/libwx_gtk3u_core-3.1.so.5+0x389b04)
    #55 0x7f28d1c3c2d9 in wxEventLoopBase::Run() (/app/lib/libwx_baseu-3.1.so.5+0xd02d9)
    #56 0x7f28c118081c  (/app/bin/_eeschema.kiface+0x23bd81c)
    #57 0x7f28c0ab6e54  (/app/bin/_eeschema.kiface+0x1cf3e54)
    #58 0x7f28c0aba9a7  (/app/bin/_eeschema.kiface+0x1cf79a7)
    #59 0x7f28c15fb504  (/app/bin/_eeschema.kiface+0x2838504)
    #60 0x7f28c183c9e0 in make_fcontext (/app/bin/_eeschema.kiface+0x2a799e0)

0x7f28c4076730 is located 1019696 bytes inside of 1048576-byte region [0x7f28c3f7d800,0x7f28c407d800)
allocated by thread T0 here:
    #0 0x7f28d299e527 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xba527)
    #1 0x7f28c15fc7a0  (/app/bin/_eeschema.kiface+0x28397a0)
    #2 0x7f28c15da1f7  (/app/bin/_eeschema.kiface+0x28171f7)
    #3 0x7f28c15e98d0  (/app/bin/_eeschema.kiface+0x28268d0)
    #4 0x7f28c15ebdd3  (/app/bin/_eeschema.kiface+0x2828dd3)
    #5 0x7f28c14dcfc4  (/app/bin/_eeschema.kiface+0x2719fc4)
    #6 0x7f28c15eb22d  (/app/bin/_eeschema.kiface+0x282822d)
    #7 0x7f28c15f1b49  (/app/bin/_eeschema.kiface+0x282eb49)
    #8 0x7f28c15aa0c0  (/app/bin/_eeschema.kiface+0x27e70c0)
    #9 0x7f28c1ae4018  (/app/bin/_eeschema.kiface+0x2d21018)
    #10 0x7f28d1d8329d in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x21729d)
    #11 0x7f28d1d8377e in wxEvtHandler::SearchDynamicEventTable(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x21777e)
    #12 0x7f28d1d83b2c in wxEvtHandler::TryHereOnly(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x217b2c)
    #13 0x7f28d1d83bdf in wxEvtHandler::ProcessEventLocally(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x217bdf)
    #14 0x7f28d1d83cf1 in wxEvtHandler::ProcessEvent(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x217cf1)
    #15 0x7f28d24ab566 in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) (/app/lib/libwx_gtk3u_core-3.1.so.5+0x616566)
    #16 0x7f28d1d85553 in wxEvtHandler::SafelyProcessEvent(wxEvent&) (/app/lib/libwx_baseu-3.1.so.5+0x219553)
    #17 0x7f28d224d38d  (/app/lib/libwx_gtk3u_core-3.1.so.5+0x3b838d)
    #18 0x7f28d14ab440 in _gtk_marshal_BOOLEAN__BOXED (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x42b440)
    #19 0x7f28d0e53348 in g_closure_invoke (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x16348)
    #20 0x7f28d0e66a7e in signal_emit_unlocked_R (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x29a7e)
    #21 0x7f28d0e6d1ba in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x301ba)
    #22 0x7f28d0e6da42 in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x30a42)
    #23 0x7f28d1450ea3 in gtk_widget_event_internal.part.0 (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x3d0ea3)
    #24 0x7f28d147407a in gtk_window_propagate_key_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x3f407a)
    #25 0x7f28d2235a45  (/app/lib/libwx_gtk3u_core-3.1.so.5+0x3a0a45)
    #26 0x7f28d14ab440 in _gtk_marshal_BOOLEAN__BOXED (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x42b440)
    #27 0x7f28d0e53348 in g_closure_invoke (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x16348)
    #28 0x7f28d0e66a7e in signal_emit_unlocked_R (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x29a7e)
    #29 0x7f28d0e6d1ba in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x301ba)

SUMMARY: AddressSanitizer: stack-use-after-scope (/usr/lib/x86_64-linux-gnu/libasan.so.6+0x582e6) in __interceptor_sigaltstack.part.0
Shadow bytes around the buggy address:
  0x0fe598806c90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f2
  0x0fe598806ca0: f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe598806cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe598806cc0: 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 f3 f3
  0x0fe598806cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0fe598806ce0: f1 f1 f1 f1 f1 f1[f8]f2 f8 f2 f8 f2 f8 f3 f3 f3
  0x0fe598806cf0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
  0x0fe598806d00: 00 00 00 f2 00 00 00 f2 00 00 00 f2 00 00 00 f2
  0x0fe598806d10: 00 00 00 f2 f2 f2 00 00 00 00 00 f3 f3 f3 f3 f3
  0x0fe598806d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe598806d30: f1 f1 f1 f1 f1 f1 01 f2 01 f2 01 f2 01 f2 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==2==ABORTING

=-=--=-=-=-=-=-= cut =-=--=-=-=-=-=-=


On 06/11/2021 18:59, Jeff Young wrote:
I presume that’s supposed to look like:

-DKICAD_SANITIZE_ADDRESS=ON

It didn’t produce any output.


On 6 Nov 2021, at 18:06, Ian McInerney <ian.s.mciner...@ieee.org> wrote:

So, for some reason GMail thinks this email is empty when I open it but shows text in the inbox view, so I am going off of what I can see in the "show original message" option.

For running with ASAN, you simply need to pass the CMake flag KICAD_SANITIZE_ADDRESS and then I would suggest setting the environment variable "ASAN_OPTIONS=detect_leaks=0:halt_on_error=0:check_initialization_order=1:detect_stack_use_after_return=1:detect_invalid_pointer_pairs=2" in whatever you run the KiCad process in (that helps configure ASAN).

-Ian

FYI, the content I can see:
Devs,

Can someone run this on the flatpak and see if it reproduces for them?  (It=
 does not for me on OSX.  Speaking of which, can someone refresh my memory =
on the cmake instruction to turn on something like ASAN on OSX?)

Cheers,
Jeff.

On Sat, Nov 6, 2021 at 5:56 PM Jeff Young <j...@rokeby.ie> wrote:
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp
-- 
Tel: 01223 414180
Blog: http://www.ivimey.org/blog
LinkedIn: http://uk.linkedin.com/in/ruthivimeycook/
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to