Re: [Kicad-developers] Fwd: Crash invoking pcbnew Board settings

2021-11-07 Thread Ruth Ivimey-Cook

  
  
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

Re: [Kicad-developers] Fwd: Crash invoking pcbnew Board settings

2021-11-06 Thread Jeff Young
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  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  > 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


Re: [Kicad-developers] Fwd: Crash invoking pcbnew Board settings

2021-11-06 Thread Ian McInerney
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  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


[Kicad-developers] Fwd: Crash invoking pcbnew Board settings

2021-11-06 Thread Jeff Young
___
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