Issue #4242. Crash with a single Draft Dimension

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
vocx
Posts: 3974
Joined: Thu Oct 18, 2018 9:18 pm

Issue #4242. Crash with a single Draft Dimension

Postby vocx » Sun May 17, 2020 8:16 pm

Code: Select all

OS: Ubuntu 18.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21097 (Git)
Build type: Debug
Branch: master
Hash: a5ab09aa0941cc945e59848897b160f8cbfc0831
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Code: Select all

>>> import pivy
>>> print(pivy.__version__)
0.6.5a0

Code: Select all

Intel HD 620 (rev 02) graphics.
This is possibly related to issue #4242, Crash: when testing Draft Dimension.

1. Open FreeCAD.
2. Load this file, single_dimension.FCStd. It just contains a single Draft Dimension.
3. Crash.
single_dimension.FCStd
(6.92 KiB) Downloaded 7 times
You can also do this from the command line.

Code: Select all

freecad single_dimension.FCStd
I think the problem is that this object is not a typical object with a Part_TopoShape. It requires Pivy (Coin) to rebuild its viewprovider when it's loaded.

It will work as long as you
1. first create a new document (Unnamed), then
2. load the Draft Workbench.

If you switch to the Draft Workbench, but don't create the new document; or if you create the new document but don't switch to the Draft Workbench, it will crash as well.

After you create the new document Unnamed, and switched to Draft, by opening the file, the Unnamed document will be replaced by the single_dimension document, and everything will work well after that.

Backtrace.

Code: Select all

Thread 1 "FreeCAD" received signal SIGSEGV, Segmentation fault.
0x00007ffff160de3a in cc_rbptree_insert () from /usr/lib/x86_64-linux-gnu/libCoin.so.80c
(gdb) bt
#0  0x00007ffff160de3a in cc_rbptree_insert () at /usr/lib/x86_64-linux-gnu/libCoin.so.80c
#1  0x00007ffff17899d2 in SoChildList::append(SoNode*) () at /usr/lib/x86_64-linux-gnu/libCoin.so.80c
#2  0x00007ffff17d9bb3 in SoGroup::addChild(SoNode*) () at /usr/lib/x86_64-linux-gnu/libCoin.so.80c
#3  0x00007fffc9d0502e in  () at /usr/lib/python3/dist-packages/pivy/_coin.cpython-36m-x86_64-linux-gnu.so
#4  0x00007ffff403e53b in _PyCFunction_FastCallDict (func_obj=
    <built-in method SoGroup_addChild of module object at remote 0x7fffcae97228>, args=0x7fffb4800e18, nargs=<optimized out>, kwargs=<optimized out>) at ../Objects/methodobject.c:234
#5  0x00007ffff3fa71ec in call_function (pp_stack=0x7fffffffac00, oparg=<optimized out>, kwnames=0x0) at ../Python/ceval.c:4851
#6  0x00007ffff3fad303 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:3335
#7  0x00007ffff3fa5803 in _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=2, globals=globals@entry={'__name__': 'pivy.coin', '__doc__': '\nPivy is a Coin binding for Python. Coin is a high-level 3D graphics\nlibrary with a C++ Application Programming Interface. Coin uses\nscene-graph data structures to render real-time graphics suitable for\nmostly all kinds of scientific and engineering visualization\napplications.\n', '__package__': 'pivy', '__loader__': <SourceFileLoader(name='pivy.coin', path='/usr/lib/python3/dist-packages/pivy/coin.py') at remote 0x7fffcb7fe710>, '__spec__': <ModuleSpec(name='pivy.coin', loader=<...>, origin='/usr/lib/python3/dist-packages/pivy/coin.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/usr/lib/python3/dist-packages/pivy/__pycache__/coin.cpython-36.pyc', _initializing=False) at remote 0x7fffcb7fe748>, '__file__': '/usr/lib/python3/dist-packages/pivy/coin.py', '__cached__': '/usr/lib/python3/dist-packages/pivy/__pycache__/coin.cpython-36.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other...(truncated)) at ../Python/ceval.c:4933
#8  0x00007ffff3fa72be in fast_function (kwnames=0x0, nargs=2, stack=<optimized out>, func=<function at remote 0x7fffca9e3730>)
    at ../Python/ceval.c:4968
#9  0x00007ffff3fa72be in call_function (pp_stack=0x7fffffffadb0, oparg=<optimized out>, kwnames=0x0) at ../Python/ceval.c:4872
#10 0x00007ffff3fad303 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:3335
---Type <return> to continue, or q <return> to quit---
#11 0x00007ffff3fa5803 in _PyFunction_FastCall (co=co@entry=0x7fffcafaa150, args=<optimized out>, 
    args@entry=0x7fffffffaf50, nargs=nargs@entry=2, globals=globals@entry={'__name__': 'draftviewproviders.view_dimension', '__doc__': 'This module provides the Draft Dimensions view provider classes\n', '__package__': 'draftviewproviders', '__loader__': <SourceFileLoader(name='draftviewproviders.view_dimension', path='/opt/freecad-build-debug-vocx/Mod/Draft/draftviewproviders/view_dimension.py') at remote 0x7fffc6c36e48>, '__spec__': <ModuleSpec(name='draftviewproviders.view_dimension', loader=<...>, origin='/opt/freecad-build-debug-vocx/Mod/Draft/draftviewproviders/view_dimension.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/opt/freecad-build-debug-vocx/Mod/Draft/draftviewproviders/__pycache__/view_dimension.cpython-36.pyc', _initializing=False) at remote 0x7fffc6c36eb8>, '__file__': '/opt/freecad-build-debug-vocx/Mod/Draft/draftviewproviders/view_dimension.py', '__cached__': '/opt/freecad-build-debug-vocx/Mod/Draft/draftviewproviders/__pycache__/view_dimension.cpython-36.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in ...(truncated)) at ../Python/ceval.c:4933
#12 0x00007ffff3fa6e25 in _PyFunction_FastCallDict (func=<function at remote 0x7fffc625e730>, args=0x7fffffffaf50, nargs=2, kwargs=0x0) at ../Python/ceval.c:5035
#13 0x00007ffff4091fd1 in _PyObject_FastCallDict (func=func@entry=<function at remote 0x7fffc625e730>, args=args@entry=0x7fffffffaf50, nargs=nargs@entry=2, kwargs=kwargs@entry=0x0) at ../Objects/abstract.c:2310
#14 0x00007ffff40926fd in _PyObject_Call_Prepend (func=<function at remote 0x7fffc625e730>, obj=<optimized out>, args=
    (<Gui.ViewProviderDocumentObject at remote 0x55555b37adf8>,), kwargs=0x0) at ../Objects/abstract.c:2373
#15 0x00007ffff4092768 in PyObject_Call (func=<method at remote 0x7fffb7162d08>, args=<optimized out>, kwargs=<optimized out>)
    at ../Objects/abstract.c:2261
#16 0x00007ffff6af280a in Base::pyCall(_object*, _object*) (callable=<method at remote 0x7fffb7162d08>, args=(<Gui.ViewProviderDocumentObject at remote 0x55555b37adf8>,)) at /opt/freecad-source-vocx/src/Base/Interpreter.h:126
#17 0x00007ffff6feff51 in Gui::ViewProviderPythonFeatureImp::attach(App::DocumentObject*) (this=0x555555de0270, pcObject=
    0x55555b2ede50) at /opt/freecad-source-vocx/src/Gui/ViewProviderPythonFeature.cpp:791
#18 0x00007ffff6ff7763 in Gui::ViewProviderPythonFeatureT<Gui::ViewProviderDocumentObject>::onChanged(App::Property const*) (thi---Type <return> to continue, or q <return> to quit---
s=0x55555766c680, prop=0x55555766ca10) at /opt/freecad-source-vocx/src/Gui/ViewProviderPythonFeature.h:500
#19 0x00007ffff54f78d8 in App::Property::hasSetValue() (this=0x55555766ca10)
    at /opt/freecad-source-vocx/src/App/Property.cpp:216
#20 0x00007ffff5563fdf in App::PropertyPythonObject::Restore(Base::XMLReader&) (this=0x55555766ca10, reader=...)
    at /opt/freecad-source-vocx/src/App/PropertyPythonObject.cpp:392
#21 0x00007ffff54fc262 in App::PropertyContainer::Restore(Base::XMLReader&) (this=0x55555766c680, reader=...)
    at /opt/freecad-source-vocx/src/App/PropertyContainer.cpp:358
#22 0x00007ffff53bcc94 in App::ExtensionContainer::Restore(Base::XMLReader&) (this=0x55555766c680, reader=...)
    at /opt/freecad-source-vocx/src/App/ExtensionContainer.cpp:308
#23 0x00007ffff6fa881b in Gui::ViewProvider::Restore(Base::XMLReader&) (this=0x55555766c680, reader=...)
    at /opt/freecad-source-vocx/src/Gui/ViewProvider.cpp:795
#24 0x00007ffff6a6d1e1 in Gui::Document::RestoreDocFile(Base::Reader&) (this=0x555556c95ea0, reader=...)
    at /opt/freecad-source-vocx/src/Gui/Document.cpp:1296
#25 0x00007ffff46b995b in Base::XMLReader::readFiles(zipios::ZipInputStream&) const (this=0x7fffffffbca0, zipstream=...)
    at /opt/freecad-source-vocx/src/Base/Reader.cpp:337
#26 0x00007ffff52b0d9f in App::Document::restore(char const*, bool, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (this=0x5555570e07e0, filename=0x5555570e6520 "single_dimension.FCStd", delaySignal=true, objNames=std::set with 0 elements)
    at /opt/freecad-source-vocx/src/App/Document.cpp:2704
#27 0x00007ffff55aab33 in App::Application::openDocumentPrivate(char const*, char const*, char const*, bool, bool, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator---Type <return> to continue, or q <return> to quit---
<char> > > > const&) (this=0x5555558ee530, FileName=0x555556eb1d90 "single_dimension.FCStd", propFileName=0x555556eb1d90 "single_dimension.FCStd", label=0x555556b70540 "single_dimension", isMainDoc=true, createView=true, objNames=std::set with 0 elements)
    at /opt/freecad-source-vocx/src/App/Application.cpp:832
#28 0x00007ffff55a955c in App::Application::openDocuments(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, bool) (this=0x5555558ee530, filenames=std::vector of length 1, capacity 1 = {...}, paths=0x0, labels=0x0, errs=0x0, createView=true)
    at /opt/freecad-source-vocx/src/App/Application.cpp:655
#29 0x00007ffff55a8f73 in App::Application::openDocument(char const*, bool) (this=0x5555558ee530, FileName=0x5555584d21c0 "single_dimension.FCStd", createView=true) at /opt/freecad-source-vocx/src/App/Application.cpp:592
#30 0x00007ffff55b22d4 in App::Application::processFiles(std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (files=std::__cxx11::list = {...}) at /opt/freecad-source-vocx/src/App/Application.cpp:2103
#31 0x00007ffff706a1e3 in Gui::MainWindow::delayedStartup() (this=0x7fffffffd4c0)
    at /opt/freecad-source-vocx/src/Gui/MainWindow.cpp:1282
#32 0x00007ffff70712a6 in Gui::MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x7fffffffd4c0, _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0x5555570e6700) at /opt/freecad-build-debug-vocx/src/Gui/moc_MainWindow.cpp:310
#33 0x00007ffff29ea0c2 in QObject::event(QEvent*) (this=this@entry=0x7fffffffd4c0, e=e@entry=0x555555f18ba0)
    at kernel/qobject.cpp:1247
---Type <return> to continue, or q <return> to quit---
#34 0x00007ffff377775b in QWidget::event(QEvent*) (this=this@entry=0x7fffffffd4c0, event=event@entry=0x555555f18ba0)
    at kernel/qwidget.cpp:9346
#35 0x00007ffff388ac6b in QMainWindow::event(QEvent*) (this=0x7fffffffd4c0, event=0x555555f18ba0)
    at widgets/qmainwindow.cpp:1563
#36 0x00007ffff70677a6 in Gui::MainWindow::event(QEvent*) (this=0x7fffffffd4c0, e=0x555555f18ba0)
    at /opt/freecad-source-vocx/src/Gui/MainWindow.cpp:823
#37 0x00007ffff373883c in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=
    0x5555558b0c70, receiver=receiver@entry=0x7fffffffd4c0, e=e@entry=0x555555f18ba0) at kernel/qapplication.cpp:3722
#38 0x00007ffff3740104 in QApplication::notify(QObject*, QEvent*) (this=0x7fffffffd480, receiver=0x7fffffffd4c0, e=0x555555f18ba0) at kernel/qapplication.cpp:3481
#39 0x00007ffff6b0f556 in Gui::GUIApplication::notify(QObject*, QEvent*) (this=
    0x7fffffffd480, receiver=0x7fffffffd4c0, event=0x555555f18ba0) at /opt/freecad-source-vocx/src/Gui/GuiApplication.cpp:91
#40 0x00007ffff29ba8d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7fffffffd4c0, event=event@entry=0x555555f18ba0) at kernel/qcoreapplication.cpp:1024
#41 0x00007ffff29bd04d in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x555555f18ba0, receiver=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#42 0x00007ffff29bd04d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x5555557aea60) at kernel/qcoreapplication.cpp:1699
#43 0x00007ffff29bd5d8 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1553
#44 0x00007ffff2a14263 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x5555559625c0)
    at kernel/qeventdispatcher_glib.cpp:276
#45 0x00007fffed302417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#46 0x00007fffed302650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007fffed3026dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007ffff2a1388f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x555555a5b4a0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#49 0x00007ffff29b890a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffd300, flags=..., 
    flags@entry=...) at kernel/qeventloop.cpp:212
#50 0x00007ffff29c19b4 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1297
#51 0x00007ffff69d9182 in Gui::Application::runApplication() () at /opt/freecad-source-vocx/src/Gui/Application.cpp:2139
#52 0x000055555555c89d in main(int, char**) (argc=2, argv=0x7fffffffdee8) at /opt/freecad-source-vocx/src/Main/MainGui.cpp:301
Form FreeCAD's side the crash seems to occur in the attachment of the viewprovider.

Code: Select all

// src/Base/Interpreter.h
// Base::pyCall
inline Py::Object pyCall(PyObject *callable, PyObject *args=0) {
    PyObject *result = PyObject_CallObject(callable, args);
    if(!result)
        throw Py::Exception();
    return Py::asObject(result);
}

Code: Select all

// src/Gui/ViewProviderPythonFeature.cpp
// Gui::ViewProviderPythonFeatureImp::attach
else {
            Py::Tuple args(1);
            args.setItem(0, Py::Object(object->getPyObject(), true));
            Base::pyCall(py_attach.ptr(),args.ptr());
        }

Code: Select all

// src/Gui/ViewProviderPythonFeature.h
// Gui::ViewProviderPythonFeatureT<Gui::ViewProviderDocumentObject>::onChanged
if (!_attached) {
                    _attached = true;
                    imp->attach(ViewProviderT::pcObject);
                    ViewProviderT::attach(ViewProviderT::pcObject);
                    // needed to load the right display mode after they're known now
                    ViewProviderT::DisplayMode.touch();
                    ViewProviderT::setOverrideMode(viewerMode);
                }
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
kisolre
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Issue #4242. Crash with a single Draft Dimension

Postby kisolre » Sun May 17, 2020 8:48 pm

No problem opening the file here with freshly started FreeCAD and drag/drop opening the file with either NVidia or Intel graphics - 65.14mm.

OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21097 (Git)
Build type: Release
Branch: master
Hash: a5ab09aa0941cc945e59848897b160f8cbfc0831
Python version: 3.6.6
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Bulgarian/Bulgaria (bg_BG)

Code: Select all

>>> import pivy
>>> print(pivy.__version__)
0.6.5a1
vocx
Posts: 3974
Joined: Thu Oct 18, 2018 9:18 pm

Re: Issue #4242. Crash with a single Draft Dimension

Postby vocx » Sat May 30, 2020 7:09 am

Bump.

It may be a problem with my system only, because it seems not many people can reproduce it.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
Syres
Posts: 641
Joined: Thu Aug 09, 2018 11:14 am

Re: Issue #4242. Crash with a single Draft Dimension

Postby Syres » Sat May 30, 2020 7:53 am

vocx wrote:
Sat May 30, 2020 7:09 am
It may be a problem with my system only, because it seems not many people can reproduce it.
Confirmed but not a hard crash on Windows, here is the Report View output:

Code: Select all

Illegal storage access...
Illegal storage access! Please save your work under a new file name and restart the application!
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 486, in onChanged
    self.remove_dim_overshoot()
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 586, in remove_dim_overshoot
    self.node3d.removeChild(self.marksDimOvershoot)
<class 'AttributeError'>: 'ViewProviderLinearDimension' object has no attribute 'node3d'
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 539, in onChanged
    self.updateData(vobj.Object,"Start")
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 465, in updateData
    self.line.coordIndex.setValues(0,7,(0,1,2,-1,3,4,5))
<class 'AttributeError'>: 'NoneType' object has no attribute 'coordIndex'
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 539, in onChanged
    self.updateData(vobj.Object,"Start")
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 465, in updateData
    self.line.coordIndex.setValues(0,7,(0,1,2,-1,3,4,5))
<class 'AttributeError'>: 'NoneType' object has no attribute 'coordIndex'
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 534, in onChanged
    self.lineswitch3.whichChild = -3
<class 'AttributeError'>: 'ViewProviderLinearDimension' object has no attribute 'lineswitch3'
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 539, in onChanged
    self.updateData(vobj.Object,"Start")
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 465, in updateData
    self.line.coordIndex.setValues(0,7,(0,1,2,-1,3,4,5))
<class 'AttributeError'>: 'NoneType' object has no attribute 'coordIndex'
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 539, in onChanged
    self.updateData(vobj.Object,"Start")
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 465, in updateData
    self.line.coordIndex.setValues(0,7,(0,1,2,-1,3,4,5))
<class 'AttributeError'>: 'NoneType' object has no attribute 'coordIndex'
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 539, in onChanged
    self.updateData(vobj.Object,"Start")
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 465, in updateData
    self.line.coordIndex.setValues(0,7,(0,1,2,-1,3,4,5))
<class 'AttributeError'>: 'NoneType' object has no attribute 'coordIndex'
Traceback (most recent call last):
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 539, in onChanged
    self.updateData(vobj.Object,"Start")
  File "E:\Data\My Downloads\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\FreeCAD_0.19.21280_x64_LP_12.1.6_PY3QT5-WinVS2015\Mod\Draft\draftviewproviders\view_dimension.py", line 465, in updateData
    self.line.coordIndex.setValues(0,7,(0,1,2,-1,3,4,5))
<class 'AttributeError'>: 'NoneType' object has no attribute 'coordIndex'

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21280 (Git)
Build type: Release
Branch: master
Hash: 6f3160db3e88733536c7eaf97ad7d6ebd21baccd
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)



Edit: I was distracted by @kisolre's method and incorrectly followed it.
User avatar
Roy_043
Posts: 1224
Joined: Thu Dec 27, 2018 12:28 pm

Re: Issue #4242. Crash with a single Draft Dimension

Postby Roy_043 » Sat May 30, 2020 9:37 am

vocx wrote:
Sun May 17, 2020 8:16 pm
1. Open FreeCAD.
2. Load this file, single_dimension.FCStd. It just contains a single Draft Dimension.
3. Crash.
No crash here but FreeCAD hangs.

vocx wrote:
Sun May 17, 2020 8:16 pm
It will work as long as you
1. first create a new document (Unnamed), then
2. load the Draft Workbench.
Confirmed. But there is an error report see Syres's post.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21097 (Git)
Build type: Release
Branch: master
Hash: a5ab09aa0941cc945e59848897b160f8cbfc0831
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Dutch/Netherlands (nl_NL)