View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002504 | PartDesign | Bug | public | 2016-04-14 10:23 | 2017-03-18 20:36 |
Reporter | wmayer | Assigned To | ickby | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 0.17 | Fixed in Version | 0.17 | ||
Summary | 0002504: Crash in pad function after undoing some operations | ||||
Description | Maybe this is related to lack of knowledge how to correctly work with the new PartDesign. In http://forum.freecadweb.org/viewtopic.php?f=9&t=15269 it's said under point 6.) that one can apply e.g. revolutions on a face of a feature. When doing so on e.g. a pad object then it creates the Revolution object but raises an error dialog that the selected object neither is a sketch nor a Part2DObject. The Revolution object is not inside the Body feature but outside. When I now use the Migrate command it creates a Part object where all object seems to sorted correctly. Of course, the tip shape is still empty because the revolution is still invalid. When I run undo three times to go back to the state of the pad object the view is empty but no errors are reported. When I edit the pad and change some values nothing happens. When I leave edit mode and re-enter it then FreeCAD crashes as soon as I change a value. | ||||
Steps To Reproduce | 1. Create Body, Sketch, Pad 2. Select a face and press Revolve => error 3. Run the Migrate command 4. 3x undo 5. Edit Pad, change a value and leave it 6. Edit Pad again and change a value => crash | ||||
Tags | undo | ||||
FreeCAD Information | |||||
related to | 0002387 | closed | FreeCAD | Unexpected position when rotating multiple objects | |
related to | 0002055 | closed | kkremitzki | FreeCAD | Undo and redo of fillet restore it incorrectly |
|
The Revolution tool seems not to be portet to the new behavior and fails in the creation command. Also the error handling is bad, after failing no object should have been created. |
|
Groove tool shows same behavior |
|
This was quite a tricky error because it was hard to locate the code where the actual problem occurred. After spending some hours on it I finally found the problematic location in the source code: it was crashing inside ViewProviderBody::slotChangedObjectApp because the view provider is a dangling pointer because the boost connection wasn't disconnected when the object has been destroyed. The regression was caused with commit: https://github.com/FreeCAD/FreeCAD/commit/d4c67c0366e29d47eb4bcfbac1362aa6e589a27c This crash is fixed now, however, the pad object still doesn't come up again. It looks like the geometry of the sketcher has been erased. When trying to edit sketch it still crashes after a while. There might be a few more boost signals that haven't been disconnected at destruction time. |
|
Update on the sketcher: the geometry list is still intact and also the shape is valid but for any reason the scene graph is (almost) empty. It contains the root node and some switches but all the nodes of any view provider are gone. The lack of nodes is responsible for the crash when trying to edit the sketch because the mouseMove method uses getPointOnRay which doesn't check for an empty SoPath. |
|
The basic problem is that there is no program logic implemented that restores the layout of the scene graph when undoing an operation. In this case the Migrate command puts the 1st created body feature underneath a 2nd body feature, internally it calls removeViewProvider and puts the root node to the 2nd body feature. The undo then removes the link from the 1st body feature to the 2nd body feature and also reorders the tree view but never calls addViewProvider to put back the root node as top-level node to the scene graph. Note, this is not related that revolution & groove is not yet ready for the new part design workflow. The same behaviour can be demonstrated when loading an old project with a pad inside. Calling Migrate and Undo makes the pad disappear, too. |
|
another example to test (simpler): 1. PartDesign workbench: create a Part container. 2. Part workbench: Create a cube 3. In tree view, drag the cube into Part container. So far so good. 4. Drag the cube back out of Part. The cube disappears. See also http://forum.freecadweb.org/viewtopic.php?f=3&t=15323 |
|
> another example to test (simpler): For the sake of completeness the issue reported by DeepSOIC is something different because: 1. the failure of the first issue is about broken undo which is not tested in the second case 2. PR 616 fixes the first issue while the second issue has been fixed in the meantime |
|
https://github.com/FreeCAD/FreeCAD/pull/616/commits |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-04-14 10:23 | wmayer | New Issue | |
2016-04-14 10:23 | wmayer | Assigned To | => ickby |
2016-04-14 10:23 | wmayer | Status | new => assigned |
2016-04-14 11:42 | ickby | Note Added: 0006963 | |
2016-04-14 11:42 | ickby | Status | assigned => confirmed |
2016-04-14 11:43 | ickby | Note Added: 0006964 | |
2016-04-16 13:15 | wmayer | Note Added: 0006976 | |
2016-04-16 13:16 | wmayer | Changeset attached | => FreeCAD Master master 099ceebe |
2016-04-16 14:53 | wmayer | Note Added: 0006978 | |
2016-04-16 15:38 | wmayer | Note Added: 0006979 | |
2016-04-18 14:14 | DeepSOIC | Note Added: 0006988 | |
2017-01-17 20:04 | Kunda1 | Tag Attached: undo | |
2017-02-04 03:42 | Kunda1 | Relationship added | related to 0002055 |
2017-02-04 03:45 | Kunda1 | Relationship added | related to 0002387 |
2017-02-15 09:45 | kkremitzki | Target Version | => 0.17 |
2017-03-18 20:27 | wmayer | Note Added: 0008647 | |
2017-03-18 20:36 | wmayer | Status | confirmed => closed |
2017-03-18 20:36 | wmayer | Resolution | open => fixed |
2017-03-18 20:36 | wmayer | Fixed in Version | => 0.17 |
2017-03-18 20:36 | wmayer | Note Added: 0008648 |