Crash when changing footprint editor parameters on macOS

Bug #1754738 reported by Alessandro Gatti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Unassigned

Bug Description

Reproduction steps:

1. Create new project or open an empty project
2. Open the Footprint Editor
3. Click on 'New footprint using footprint wizard'
4. Click on 'Select wizard script to run'
5. Pick QFN
6. Click on the "EPad" label on the left side.
7. Click twice on the "epad" checkbox, to get it to an unticked state.
8. Select the 'Pads' label on the left side. Crash occurs (see attachment for stack trace).

System version information:

ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D102

KiCad version information:

Packaged on 20180309-033023
KiCad revision: r9c62792
KiCad CMake Settings: -DDEFAULT_INSTALL_PATH=/Library/Application Support/kicad
-DCMAKE_C_COMPILER=/usr/bin/clang
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
-DwxWidgets_CONFIG_EXECUTABLE=../wx/wx-bin/bin/wx-config
-DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON
-DPYTHON_EXECUTABLE=/usr/bin/python
-DPYTHON_SITE_PACKAGE_PATH=/Volumes/SSD/workspace/osx-kicad-adam-head/wx/wx-bin/lib/python2.7/site-packages
-DKICAD_USE_OCE=ON
-DOCE_DIR=/Users/kicad/homebrew/opt/oce/OCE.framework/Versions/0.17/Resources/
-DKICAD_SPICE=ON
-DKICAD_REPO_NAME=maser-c4osx
-DCMAKE_INSTALL_PREFIX=../bin
-DCMAKE_BUILD_TYPE=RelWithDebInfo
Build script revision: r9c62792

Thank you for your time,
Alessandro

Revision history for this message
Alessandro Gatti (agatti) wrote :
Jon Evans (craftyjon)
Changed in kicad:
importance: Undecided → Critical
status: New → Confirmed
milestone: none → 5.0.0-rc2
Revision history for this message
Alessandro Gatti (agatti) wrote :

A similar stack trace can be obtained also from the QR Code footprint wizard, uncheck "Use Cu layer" so all three checkboxes are unchecked, then click on the 'Caption' label on the left side.

Revision history for this message
Alessandro Gatti (agatti) wrote :

Also, in the QR Code footprint wizard, check the "Negative" checkbox and then click on the 'Caption' label as well, same crash occurs.

Revision history for this message
Alessandro Gatti (agatti) wrote :

On the other hand, on Debian Stable, a build compiled in debug mode asserts with "/usr/include/wx-3.0/wx/arrstr.h(178): assert "nIndex < m_nCount" failed in Item(): wxArrayString: index out of bounds".

Revision history for this message
Alessandro Gatti (agatti) wrote :

Ok, inside FOOTPRINT_WIZARD_FRAME::ParametersUpdated, footprintWizard->GetParameterValues(m_parameterGridPage) returns the parameters for the *new* list, while m_parameterGrid->GetNumberRows() returns the count for the *old* list - therefore the change check loop right after goes OOB and the crash occurs. Interesting...

Revision history for this message
Alessandro Gatti (agatti) wrote :

This should fix the issue, since the page click event triggered the parameter update check but after changing the current page id.

Revision history for this message
Alessandro Gatti (agatti) wrote :

Sending again to let launchpad recognise the patch this time...

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

Fixed in revision 53c9143b64610010a54adf063da479ff6a96dd17
https://git.launchpad.net/kicad/patch/?id=53c9143b64610010a54adf063da479ff6a96dd17

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Jon Evans (craftyjon) wrote :

I checked and this patch does fix the problem; I have commited your patch. In the future please use `git format-patch` to create patches so that they can be applied automatically. Thank you for your contribution to KiCad!

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.