Bug #3152: FreeCAD crashes upon opening saved file

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 5770
Joined: Thu Jan 05, 2017 9:03 pm

Bug #3152: FreeCAD crashes upon opening saved file

Postby Kunda1 » Sat Aug 19, 2017 11:29 am

issue #3152: FreeCAD crashes upon opening saved file
FreeCAD crashes when opening a saved file. The last operation before saving was attempting to pad a sketch. No output on command line other than Segmentation Fault.
OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11740 (Git)/Daily-PPA
Build type: None
Branch: master
Hash: 6b05302c2e70f191a2a5787f55c5b549155b9824
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedKingdom (en_GB)

Reproduced on:
OS: "Manjaro Linux"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11779 (Git)
Build type: None
Branch: master
Hash: 7c87549e4ba992cf324c59986908a22ccb5fcf4c
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Please browse ticket to d/l file that causes crash.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
wmayer
Site Admin
Posts: 14887
Joined: Thu Feb 19, 2009 10:32 am

Re: Bug #3152: FreeCAD crashes upon opening saved file

Postby wmayer » Sat Aug 19, 2017 11:39 am

Stack trace:
#0 0xb6dd0ada in std::_Rb_tree<Base::Type, std::pair<Base::Type const, App::Extension*>, std::_Select1st<std::pair<Base::Type const, App::Extension*> >, std::less<Base::Type>, std::allocator<std::pair<Base::Type const, App::Extension*> > >::_S_key(std::_Rb_tree_node<std::pair<Base::Type const, App::Extension*> > const*) () from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#1 0xb6dd0bf5 in std::_Rb_tree<Base::Type, std::pair<Base::Type const, App::Extension*>, std::_Select1st<std::pair<Base::Type const, App::Extension*> >, std::less<Base::Type>, std::allocator<std::pair<Base::Type const, App::Extension*> > >::_M_lower_bound(std::_Rb_tree_node<std::pair<Base::Type const, App::Extension*> > const*, std::_Rb_tree_node<std::pair<Base::Type const, App::Extension*> > const*, Base::Type const&) const ()
from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#2 0xb6dd0026 in std::_Rb_tree<Base::Type, std::pair<Base::Type const, App::Extension*>, std::_Select1st<std::pair<Base::Type const, App::Extension*> >, std::less<Base::Type>, std::allocator<std::pair<Base::Type const, App::Extension*> > >::find(Base::Type const&) const () from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#3 0xb6dcfa51 in std::map<Base::Type, App::Extension*, std::less<Base::Type>, std::allocator<std::pair<Base::Type const, App::Extension*> > >::find(Base::Type const&) const ()
from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#4 0xb6dcd618 in App::ExtensionContainer::hasExtension(Base::Type, bool) const () from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#5 0xb6dd4836 in App::GroupExtension::hasObject(App::DocumentObject const*, bool) const () from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#6 0xb6dd48ba in App::GroupExtension::hasObject(App::DocumentObject const*, bool) const () from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#7 0xb6dd48ba in App::GroupExtension::hasObject(App::DocumentObject const*, bool) const () from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
#8 0xb6dd48ba in App::GroupExtension::hasObject(App::DocumentObject const*, bool) const () from /home/werner/Projects/freecad-git/build/lib/libFreeCADApp.so
The call of App::GroupExtension::hasObject appears a few thousand times, so it looks like a stack overflow to me.
User avatar
DeepSOIC
Posts: 7049
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug #3152: FreeCAD crashes upon opening saved file

Postby DeepSOIC » Sat Aug 19, 2017 12:11 pm

The file opens fine in FreeCADCmd. Then, I was able to generate dependency graph.
Parabolic trough (crash).txt.png
Parabolic trough (crash).txt.png (89.54 KiB) Viewed 554 times
User avatar
DeepSOIC
Posts: 7049
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug #3152: FreeCAD crashes upon opening saved file

Postby DeepSOIC » Sat Aug 19, 2017 12:30 pm

So I would guess, the crash is actually reported as issue #0002567
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: Bug #3152: FreeCAD crashes upon opening saved file

Postby peterl94 » Sat Aug 19, 2017 2:05 pm

DeepSOIC wrote:
Sat Aug 19, 2017 12:30 pm
So I would guess, the crash is actually reported as issue #0002567
If that is the case, then it will be fixed with PR 916: commit 853733d8