[Fixed]Full crash when trying to transform simple body

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
bobmel
Posts: 15
Joined: Wed Mar 14, 2018 9:28 am

Re: Full crash when trying to transform simple body

Post by bobmel »

wmayer wrote: Sat Mar 17, 2018 3:06 pm @bobmel

When starting the transformation tool what is the output when you type in this into the Python console:

Code: Select all

print(Gui.ActiveDocument.ActiveView.getCamera())
This the output before starting the transformation:

>>> print(Gui.ActiveDocument.ActiveView.getCamera())
#Inventor V2.1 ascii


OrthographicCamera {
viewportMapping ADJUST_CAMERA
position 50.176514 -37.496468 10
orientation 0.74290603 0.30772206 0.59447277 1.2171158
nearDistance -5.5158906
farDistance 120.87151
aspectRatio 1
focalDistance 17.320509
height 171.57809

}


This is the output after having performed the transformation that causes a crash (when 'OK' is pressed followed by a mouse move)

>>> print(Gui.ActiveDocument.ActiveView.getCamera())
#Inventor V2.1 ascii


OrthographicCamera {
viewportMapping ADJUST_CAMERA
position 50.176514 -37.496468 10
orientation 0.74290603 0.30772206 0.59447277 1.2171158
nearDistance -10.706846
farDistance 91.123581
aspectRatio 1
focalDistance 17.320509
height 171.57809

}
bobmel
Posts: 15
Joined: Wed Mar 14, 2018 9:28 am

Re: Full crash when trying to transform simple body

Post by bobmel »

wmayer wrote: Sun Mar 18, 2018 9:08 am Looking further at what is causing the crash I found out that when doing PRDP and moving the mouse a bit the method SoHandleEventAction::setGrabber is called with an instance of RDragger as argument. Internally it doesn't increment the reference counter and this means that when closing the task panel RDragger will be destroyed but the SoHandleEventAction still links to the (now dangling) RDragger pointer.

Anyway, switching off and on the selectionRole on opening or closing the transform mode heals both issues.

git commit f3f857f
Thanks for taking the time to look into this issue! Greatly appreciated!

If you have a binary available with that patch I could give that a spin on my machine to verify that it solves the issue there too.
Post Reply