View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000414 | FreeCAD | Bug | public | 2011-08-05 09:17 | 2011-11-05 22:55 |
| Reporter | magwas | Assigned To | wmayer | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | trunk | ||||
| Fixed in Version | 0.12 | ||||
| Summary | 0000414: reference counting problem | ||||
| Description | This bug is recently introduced. It might be related to the fixed reference count problem related to mouse observer or the buttonup/buttondown patch. I am basically doing a self.vobj.RootNode.addChild(self.pt) self.vobj.RootNode.removeChild(self.pt) self.vobj.RootNode.addChild(self.pt) the error message is: Coin error in SoBase::assertAlive(): Detected an attempt to access an instance (0xa8f6b10) of an SoBase-derived class after it was destructed! This is most likely to be the result of some grave programming error in the application / client code (or less likely: internal library code), causing premature destruction of a reference counted object instance. This check was called from a dangling reference to it. freecad: SoBase.cpp:443: void SoBase::assertAlive() const: Assertion `0 && "SoBase-object no longer alive!"' failed. | ||||
| Additional Information | reproduction: use git@github.com:magwas/SurfaceMesh.git , commit tagged refcountbug (d2fa07f6ee03dbf8b03e4b1ccf45cf5d90db43d5) start freecad new document draw a 2d line select it in the Surface Mesh workbench do an Add Mesh select a Point object press the space three times | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
|
Another one. Reproduction: start freecad new document draw a line l=App.getDocument("Unnamed").getObject("Line") delete the line l.Content |
|
|
> I am basically doing a > self.vobj.RootNode.addChild(self.pt) > self.vobj.RootNode.removeChild(self.pt) > self.vobj.RootNode.addChild(self.pt) I can't imagine that this is related to the fix because these are two completely different things. > l=App.getDocument("Unnamed").getObject("Line") > delete the line > l.Content And what is the bug? When removing an object if undo/redo is enabled the object isn't deleted but only managed by a transaction object. With an undo you can restore it. And when removing an object if undo/redo is not enabled the objects gets destroyed. If you access "l" afterwards it throws an exception: ReferenceError: Cannot print representation of deleted object This is exactly the desired behaviour because python objects are not allowed to prevent C++ objects from being destructed if they should. Thus, we set a flag in the python object to become invalid now. |
|
|
Werner Im not sure whats the problem and I have no need to debug hes application. Close the bug if you want... |
|
|
No bug |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-08-05 09:17 | magwas | New Issue | |
| 2011-08-05 11:15 | magwas | Note Added: 0000974 | |
| 2011-08-06 07:14 | wmayer | Note Added: 0000975 | |
| 2011-08-08 05:48 | wmayer | Note Edited: 0000975 | |
| 2011-11-04 21:14 |
|
Status | new => assigned |
| 2011-11-04 21:14 |
|
Assigned To | => Jriegel |
| 2011-11-04 21:14 |
|
Assigned To | Jriegel => wmayer |
| 2011-11-04 21:15 |
|
Note Added: 0001245 | |
| 2011-11-05 22:55 | wmayer | Note Added: 0001259 | |
| 2011-11-05 22:55 | wmayer | Status | assigned => closed |
| 2011-11-05 22:55 | wmayer | Resolution | open => no change required |
| 2011-11-05 22:55 | wmayer | Fixed in Version | => 0.12 |
FreeCAD