I get a bad_cast message here, but it does not crash. Not sure where the type error should be handled though. Please add it to the bug tracker.jmaustpc wrote: ↑Sat Apr 13, 2019 3:12 amHi all
I have found a way to crash FreeCAD
click on the property Placement X of the default Part Sphere, start creating an Expression, type "Body.Sh" it will offer "ShapeType", press the down arrow keyboard or mouse click to select "ShapeType", you get an instant crash.
ShapeType would presumably return a string where a float would be needed, and is obviously an inappropriate input ...but FreeCAD should not crash.
thanks Werner, both for the fix and the explanation.wmayer wrote: ↑Sun Apr 14, 2019 11:06 amFixed with git commit 88f637d8f
The one error responsible for the abort() is the missing instantiation of Base::PyGILStateLocker to acquire the mutex.
The second error is the Python to C string conversion. There PyUnicode_AsUTF8String is used which however creates a bytes object in Py3. The following call of PyUnicode_AsUTF8 then of course returns null. The solution is to call directly PyUnicode_AsUTF8.
Would it be helpful if we collected a list of bugs that probably should be back ported to 0.18.2 if/when we tag one?
Yes, it makes a lot of sense because this is a serious one and the likelihood that someone else will have it is quite high.Would you agree that pretty much any "crash bug" should be a candidate for such a list?
There is already a topic about this and up to my knowledge all serious issues have been back ported to 0.18. So, this will be the only issue at the moment that must be fixed in 0.18, too.I was wondering if I should create a topic in the developer's forum (pin it to the top) where we can post links to topics like this, if we think they are a bug of a nature that should be backported?