Crash when change SectionView plane location

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
marioalexis
Posts: 124
Joined: Wed Jun 19, 2019 7:44 pm

Crash when change SectionView plane location

Post by marioalexis »

Steps to reproduce:

Double click to edit the SectionView.
Scroll the QSpinBox up and down to change the Section plane location in the X direction in the range (5mm, 15mm) so that the section plane leaves the shape.
Repeat the scrolling process (maybe several times).
At some point the crash occurs.

Code: Select all

OS: Arch Linux (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.21.30473 (Git)
Build type: Unknown
Branch: src-py_type_check
Hash: b5e29c20dc7eb96d972b0fc72bd230098f58d099
Python 3.10.7, Qt 5.15.6, Coin 4.0.1, Vtk 9.1.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * fasteners 0.3.38
Attachments
crash_techdraw.FCStd
(19.57 KiB) Downloaded 23 times
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Crash when change SectionView plane location

Post by Shalmeneser »

True. :twisted:

Code: Select all

OS: Linux Mint 20.3 (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.21.30398 (Git) AppImage
Build type: Release
Branch: master
Hash: b3dfdc568a92810449bf47bc73b6784d65dfa206
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: French/France (fr_FR)
Installed mods: 
  * Manipulator 1.4.9
  * fasteners
  * sheetmetal 0.2.50
  * fasteners.bak
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Crash when change SectionView plane location

Post by wandererfan »

marioalexis wrote: Thu Sep 29, 2022 2:31 am At some point the crash occurs.
I thought I had seen this. Thanks for figuring out how to reproduce.

The dialog currently recomputes the section for every click of the QSpinBox without waiting for the previous recompute to complete. I think this messes up the synchronization of the various threads.

I have plans to change the recompute behaviour of this and other dialogs so this can't happen. Not sure when that will be done.
marioalexis
Posts: 124
Joined: Wed Jun 19, 2019 7:44 pm

Re: Crash when change SectionView plane location

Post by marioalexis »

Yes, based on the stack trace, I also assumed that it is due to a desynchronization in the threads.
Post Reply