Kicad crashes when opening Footprint library editor

Bug #1793913 reported by staviq
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Jeff Young

Bug Description

Kicad on crashes when opening Footprint library editor, with: Assertion failed: (dims.x != 0 && dims.y != 0)

Happens on OSX, not tested on windows.

I do not remember fiddling with any footprint library, just to make sure, i have recompiled from source with mac builder, and reinstalled kicad, But no luck.

Steps to reproduce:

1. Start Kicad.
2. Click "Footprint library editor"
3. Loading windows appears, and when the progress bar reaches 100%, the Kicad crashes.

According to the crash report, it happens somewhere in opengl init functions, except accelerated toolset in pcbnew works fine, so opengl and gpu seem to work fine.

OSX Crash report: https://pastebin.com/xByVe6RA

Application: kicad
Version: (6.0.0-rc1-dev-573-g4c9938a4a), 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 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.1.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_WXPYTHON=ON
    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
staviq (staviq) wrote :

Just to make sure, i have tried this without a second display, but no luck, still crashes.

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

No problem on Linux, might be macOS specific.

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

@Orson, try sizing your Footprint Editor as small as it will go, quit Kicad, and then try it again.

@staviq, go into ~/Library/Preferences/Kicad/pcbnew and delete the ModViewFramePerspective item. (It will be 5 or 6 lines long; basically everything from ModViewFramePerspective down to but not including ModViewFrameMostRecentlyUsedPath.

Let me know if that fixes it.

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

That's odd. Can you change the anti-aliasing setting to supersampling and see if that changes it?

I cannot recreate on my Mac (admitted not as up-to-date)

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

I take it back. That did it Jeff! Good catch.

Revision history for this message
Jeff Young (jeyjey) wrote : Re: [Bug 1793913] Re: Kicad crashes when opening Footprint library editor

You were nearly there, Seth. One more step from the antialiasing initialisation would have taken you to GetClientRect() returning {0,0}.

I’ll push a fix shortly.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 0309228276f44fe0638e798556d5418eccb2313e
https://git.launchpad.net/kicad/patch/?id=0309228276f44fe0638e798556d5418eccb2313e

Changed in kicad:
status: New → Fix Committed
assignee: nobody → Jeff Young (jeyjey)
Jeff Young (jeyjey)
Changed in kicad:
milestone: none → 5.1.0
importance: Undecided → High
milestone: 5.1.0 → 5.0.1
Revision history for this message
staviq (staviq) wrote :

@Jeff

I do not have any file in ~/Library/Preferences/kicad containing "ModView"

However, i did rename Kicad preferences folder so it resets, and when i opened Kicad, the footprint editor did not crash, so you are definitely on the right track.

Just in case, hare is my whole kicad prefs folder.

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

Odd. (I made a mistake and meant to say ModEdit not ModView, but you don't have any of those keys either.)

Anyway, you can also wait for tomorrow's build and then revert your Preferences folder and it should handle even the bad data.

Revision history for this message
staviq (staviq) wrote :

I have reverted my prefs folder and recompiled from master and it works, so i guess your patch did it.

Thanks !

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

Cool. Thanks for reporting back.

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.