View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004823||FreeCAD||Bug||public||2022-01-08 19:49||2022-01-12 13:52|
|Platform||x64 (MacBookAir9,1)||OS||macOS||OS Version||11.6.2 (20G314)|
|Fixed in Version||0.20|
|Summary||0004823: Random crashes (SIGSEGV) on MacOS and Linux; Triggered by kicadStepUp|
|Description||When importing boards (more often importing board tracks), there are crashes with bad memory access.|
We've had multiple users reproduce the problem. All backtraces I've seen end up at the same tip. It hasn't been seen in 0.18; It's been reproducible in 0.19 and 0.20. It's not deterministic: some people seem to readily reproduce, while others (e.g. @easy-fc) can't reproduce it.
Looking through the backtrace, I found this interesting note one level up:
Interesting line in Gui/Tree.cpp
|Steps To Reproduce||- Open FreeCAD|
- Change to KiCadStepUp WB
- Navigate to menu "ksu Tools" -> "Demo" -> "demo.kicad_pcb"
- Click on button in ribbon "ksu Tools add Tracks..."
- Select "demo.kicad_pcb" from file dialog (it should already be at the demo folder)
If the crash didn't happen on the last three steps, try again e.g. undo, and "add Tracks" or generate a new file from the demo.kicad_pcb using the menu (step 3 above.) It's random, and we're not sure what makes some of us more susceptible.
|Additional Information||Used to demonstrate/induce the problem: KiCadStepUpWB.Activated(v 10.9.3)|
Crash report showing backtrace:
|Tags||No tags attached.|
|FreeCAD Information||OS: macOS 10.16|
Word size of FreeCAD: 64-bit
Version: 0.20.26720 (Git)
Build type: Release
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
KiCadStepUp Bug I opened first
I realize the forum discussion had gotten a bit long. The gist is that my analysis leads me to the code line quoted above:
...is in fact calling getNameInDocument method on an object that's already been reclaimed and overwritten. This leads to a an attempt to access one of its string members. Pointer to the string object is out of bounds.
See this post specifically.
||Fixed with https://github.com/FreeCAD/FreeCAD/commit/771d9a735abed245e6b095dc1408df68b7d7a3cc and https://github.com/FreeCAD/FreeCAD/commit/29ae8b0502d34946b776cd6fcea43e1d085f857d|
|2022-01-08 19:49||berka||New Issue|
|2022-01-08 19:53||berka||Note Added: 0016198|
|2022-01-09 03:15||berka||Note Edited: 0016198|
|2022-01-09 12:40||wmayer||Status||new => confirmed|
|2022-01-12 13:52||wmayer||Assigned To||=> wmayer|
|2022-01-12 13:52||wmayer||Status||confirmed => closed|
|2022-01-12 13:52||wmayer||Resolution||open => fixed|
|2022-01-12 13:52||wmayer||Fixed in Version||=> 0.20|
|2022-01-12 13:52||wmayer||Note Added: 0016201|