View Issue Details

IDProjectCategoryView StatusLast Update
0001019FreeCADBugpublic2013-03-03 10:29
Reporterwmayer Assigned ToJriegel 
PriorityhighSeveritycrashReproducibilitysometimes
Status closedResolutionfixed 
Target Version0.14Fixed in Version0.14 
Summary0001019: Crash on document recompute
DescriptionVertexObjectList and DepList have become a member of the document and this causes sometimes a crash in the recompute.

The problem might be that VertexObjectList even keeps deleted objects. The objects are not destroyed if undo/redo is on but they are still part of the graph but not part of the document any more. However, the method getNameInDocument() returns a null pointer for such objects and this causes a crash in the line

#ifdef FC_LOGFEATUREUPDATE
        std::clog << Cur->getNameInDocument() << " dep on: " ;
#endif

So, these objects shouldn't be recomputed either and should be ignored on the recompute. But beyond that I wonder what's the benefit of having VertexObjectList as a member. It doesn't seem to care about deleted objects even if undo/redo is off and then it becomes really ugly because of dangling pointers.

TagsNo tags attached.
FreeCAD Information

Activities

Jriegel

2013-02-19 14:43

administrator   ~0002923

The benefit is to have the graph available if you want to query it, like in Assembly. There its necesarry to get the graph information.

But its right, if we keep the graph we have to do the delete also on the graph!

wmayer

2013-03-03 10:28

administrator   ~0002957

This is a show stopper bug and I can't wait longer for it to be fixed. So, I did it myself.

The document calls _rebuildDependencyList() for every recompute and only there. So, it is safe to clear VertexObjectList and DepList there too.

git show 18355cdd256324b83e463338fbb1e6840770ebbd

Issue History

Date Modified Username Field Change
2013-02-19 13:03 wmayer New Issue
2013-02-19 13:03 wmayer Status new => assigned
2013-02-19 13:03 wmayer Assigned To => Jriegel
2013-02-19 14:43 Jriegel Note Added: 0002923
2013-02-19 14:43 Jriegel Status assigned => confirmed
2013-03-03 10:28 wmayer Note Added: 0002957
2013-03-03 10:29 wmayer Status confirmed => closed
2013-03-03 10:29 wmayer Resolution open => fixed
2013-03-03 10:29 wmayer Fixed in Version => 0.14