footprint wizard crashed on start

Bug #1832635 reported by John
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Jeff Young

Bug Description

I try to start footprint wizard from footprint editor and Kicad crashes. Is this a known bug?
I have installed the latest stable release Kicad. On a previous version (5.1) I was able to start footprint wizard.
My system is an iMac12,1 with OS X 10.13.6

Application: kicad
Version: (5.1.2-1)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.51.0
    Compiler: Clang 8.0.0 with C++ ABI 1002
Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Does not happen on linux. May be macos specific.

Changed in kicad:
status: New → Incomplete
tags: added: macos pcbnew
Revision history for this message
John (okoroil) wrote :

I don't think if it's relative but I hae replaced the stock AMD GPU with a nvidia 765M. Everything else works fine.
In console I can see an error but the message says: <private>
I could upload a video of it crashing in case it is helpful.

Revision history for this message
Seth Hillbrand (sethh) wrote :

In console, please look in the folders "User Reports" and "System Reports" to see if there are any crash reports that correspond to the timing. If there are, they would be helpful in tracking this down.

Revision history for this message
Mark J. Blair (dogfinder) wrote :

I am also having this issue. When I click "New footprint using footprint wizard" in Footprint Editor, the wizard window pops up for a moment, and then the entire application crashes in less than a second. It's hard to see, but it does not appear to me that the wizards lists get populated in the window. I do not see any corresponding crash reports in "User Reports" or "System Reports", or any of the other Console log locations. I've tried upgrading from 5.1.0-0 -> 5.1.2-1 with no change. I've tried using the default component libraries instead of my local custom ones with no change.

I am pretty sure I've used the new footprint wizard under 5.1.0-0 previously (weeks or months ago), prior to seeing this issue in 5.1.0-0 today. I am only seeing this on my work iMac, but not on my personal MacBook, so this doesn't appear to affect all Macs... but does seem to affect at least two of them at this time.

I'd appreciate any more suggestions about how I might help debug this one.

Application: kicad
Version: (5.1.2-1)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.51.0
    Compiler: Clang 8.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Nick Østergaard (nickoe) wrote :

I will set it to confirmed for now as it seems like both John and Mark have seen this issue on macos.

Changed in kicad:
status: Incomplete → Confirmed
milestone: none → 5.1.3
Revision history for this message
John Pateman (gasman2016) wrote :

Affects me to on 5.1.2 on both my iMac and MacBook - both running 10.3. I have removed any non-stock footprint generators and all .pyc files from the plugin directory. The .pyc files are regenerated in the plugin files and then the entire application crashes. Normally a crash like this triggers a crash report window but this doesn't happen and the entire application crashes silently.

Revision history for this message
John Pateman (gasman2016) wrote :

EDIT running macos 10.13 - can't seem to edit my post.

tags: added: python
Revision history for this message
Seth Hillbrand (sethh) wrote :

@jeyjey, are you still running 10.13? I can't seem to recreate this with 10.14.

Revision history for this message
Jeff Young (jeyjey) wrote :
Download full text (5.3 KiB)

@Seth, yes, it reproduces for me on master. It's throwing an exception in NSRunModal, but my debugger won't tell me what:

__cxa_throw 0x00007fff660c61f7
objc_exception_throw 0x00007fff674eada5
+[NSException raise:format:] 0x00007fff402f017d
_NSRunModal 0x00007fff3e037431
-[NSApplication runModalSession:] 0x00007fff3db89a9b
wxGUIEventLoop::DoDispatchTimeout(unsigned long) evtloop.mm:213
wxCFEventLoop::DispatchTimeout(unsigned long) evtloop_cf.cpp:259
wxCFEventLoop::DoProcessEvents() evtloop_cf.cpp:246
wxCFEventLoop::OSXDoRun() evtloop_cf.cpp:304
wxModalEventLoop::OSXDoRun() evtloop.mm:436
wxCFEventLoop::DoRun() evtloop_cf.cpp:340
wxEventLoopBase::Run() evtloopcmn.cpp:78
wxModalEventLoop::Run() evtloop.h:33
wxDialog::ShowModal() dialog_osx.cpp:150
FOOTPRINT_WIZARD_FRAME::SelectFootprintWizard() footprint_wizard_frame_functions.cpp:170
FOOTPRINT_WIZARD_FRAME::OnActivate(wxActivateEvent&) footprint_wizard_frame.cpp:534
wxAppConsoleBase::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const appbase.cpp:611
wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const appbase.cpp:623
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) event.cpp:1395
wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) event.cpp:1001
wxEvtHandler::TryHereOnly(wxEvent&) event.cpp:1592
wxEvtHandler::TryBeforeAndHere(wxEvent&) event.h:3680
wxEvtHandler::ProcessEvent(wxEvent&) event.cpp:1494
EDA_BASE_FRAME::ProcessEvent(wxEvent&) eda_base_frame.cpp:183
wxEvtHandler::DoTryChain(wxEvent&) event.cpp:1557
wxEvtHandler::ProcessEventLocally(wxEvent&) event.cpp:1525
wxEvtHandler::ProcessEvent(wxEvent&) event.cpp:1498
wxEvtHandler::SafelyProcessEvent(wxEvent&) event.cpp:1616
wxWindowBase::HandleWindowEvent(wxEvent&) const wincmn.cpp:1525
wxNonOwnedWindow::HandleActivated(double, bool) nonownedwnd_osx.cpp:306
::-[wxNonOwnedWindowController windowDidBecomeKey:](NSNotification *) nonownedwnd.mm:491
__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ 0x00007fff401ed62c
_CFXRegistrationPost 0x00007fff401ed4fa
___CFXNotificationPost_block_invoke 0x00007fff401ed231
-[_CFXNotificationRegistrar find:object:observer:enumerator:] 0x00007fff401ab010
_CFXNotificationPost 0x00007fff401aa147
-[NSNotificationCenter postNotificationName:object:userInfo:] 0x00007fff422bb817
-[NSWindow becomeKeyWindow] 0x00007fff3d894973
-[NSWindow _changeKeyAndMainLimitedOK:] 0x00007fff3d893bcd
-[NSWindow _makeKeyRegardlessOfVisibility] 0x00007fff3d94127e
NSPerformVisuallyAtomicChange 0x00007fff3d896c0c
-[NSWindow makeKeyAndOrderFront:] 0x00007fff3d9411b5
wxNonOwnedWindowCocoaImpl::Show(bool) nonownedwnd.mm:779
wxNonOwnedWindow::Show(bool) nonownedwnd_osx.cpp:377
KIWAY_PLAYER::ShowModal(wxString*, wxWindow*) kiway_player.cpp:100
FOOTPRINT_EDIT_FRAME::Process_Special_Functions(wxCommandEvent&) footprint_editor_utils.cpp:222
MODULE_EDITOR_TOOLS::CreateFootprint(TOOL_EVENT const&) footprint_editor_tools.cpp:133
int std::__1::__invoke_void_return_wrapper<int>::__call<std::__1::__bind<int (MODULE_EDITOR_TOOLS::*&)(TOOL_EVENT const&), MODULE_EDITOR_TOOLS*, std::__1::placeholders::__ph<1> const&>&, TOOL_EVENT const&>(std::__1::_...

Read more...

Revision history for this message
Jeff Young (jeyjey) wrote :

I found this on the web (his debugger is obviously better than mine):

Exception Name: NSGenericException
-------
Exception Reason: -[NSAlert runModal] may not be invoked inside of transaction begin/commit pair, or inside of transaction commit (usually this means it was invoked inside of a view's -drawRect: method.)

Full details:

0 CoreFoundation 0x00007fff3f66e2fb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff65fdfc76 objc_exception_throw + 48
2 CoreFoundation 0x00007fff3f6ffd6d +[NSException raise:format:] + 205
3 AppKit 0x00007fff3d4c9319 _NSRunModal + 484
4 AppKit 0x00007fff3cea97ad -[NSAlert runModal] + 240

Seth Hillbrand (sethh)
Changed in kicad:
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Seth Hillbrand (sethh) wrote :

I suppose that there are a few ways to avoid this. I can't figure out how the re-draw is happening at the same time as onActivate but we could activate this in a different call, maybe onShow()? Or we can check the flag in the Update event.

I can't recreate this so I'm hesitant to poke in the dark. @jeyjey can you take a swing at it? If you don't have time, I can push a couple defensive blocks and we'll wait for a nightly build for John or Mark to test.

Revision history for this message
Jeff Young (jeyjey) wrote :

@Seth, how about a trade? Care to take a look at https://bugs.launchpad.net/kicad/+bug/1831881 ?

Jeff Young (jeyjey)
Changed in kicad:
status: Triaged → In Progress
assignee: nobody → Jeff Young (jeyjey)
Revision history for this message
Seth Hillbrand (sethh) wrote :

Deal

Revision history for this message
Seth Hillbrand (sethh) wrote :

Fixed in f214cfae12ea6745c92e647f572a43e89be92405

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Mark J. Blair (dogfinder) wrote :

I finally was able to make time to test this in the nightly build. In 5.1.0-1227-gf0cc224fd it does not crash when I launch the footprint wizard in the footprint editor. Thanks!

Application: KiCad
Version: (5.1.0-1227-gf0cc224fd), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.