forked from FreeCAD/FreeCAD
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fillet of Part workbench crash in debug mode (visual studio 2015) #26
Comments
PropertyListT::getPyValue() is not supposed to throw any Py::Exception. It is supposed to catch and translate the exception to various Base::Exception. I have fixed this now. Thanks for digging in! |
print21
pushed a commit
to print21/FreeCAD
that referenced
this issue
Dec 5, 2019
Fixes realthunder#26 # Conflicts: # src/Mod/Part/App/PropertyTopoShape.cpp
This was referenced Oct 20, 2020
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I build the latest freecad code of the LinkStage3 branch with VS2015 and libpack of FreeCADLibs_12.1.3_x64_VC15.
The crash happens when fillet operation in Part workbench and in debug mode.
Same operation performed in release mode and report view shows error of "PyEval_EvalFrameEx returned a result with an error set".
I debug the code and found that: when set the value of fillet “Edges”, the crash happened.
In "PropertyFilletEdges::getPyValue()" function, the “PyObject *item” is a list not a tuple, so python exception throw. the "PropertyListsT::setPyObject()" function dose not handle the python exception.
So i did some tests.
First i changed the code in "PropertyFilletEdges::getPyValue()". i checked the type of “PyObject *item”, when it was not a tuple, a Base::ValueError exception trowed. Then the crash aforementioned did not happen.
Second, i restored the code in "PropertyFilletEdges::getPyValue()". i modified the code of "PropertyListsT::setPyObject()" in catch scope. When “Py::Exception" caught, i cleared the python exception. Then the crash aforementioned did not happen too.
So i guess that the assert was triggered caused by “Py::Exception" and crash happened.
and i suggest the first modification to fix this problem because the include file of “Py::Exception" will be included in “Property.h” with the second change.
The text was updated successfully, but these errors were encountered: