So it is indeed time to reset the configuration with the button in the preferences. Another possibility is to delete your config files or to move them in case you want to restore them.
Ticket #4164 - Crash when opening a document using "Recent files" without creating a new document before
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Crash when opening a document using "Recent files" without creating a new document before
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Crash when opening a document using "Recent files" without creating a new document before
I guess that glglue_set_glVersion is simply inlined. In that case it doesn't appear on the stack.wmayer wrote: ↑Mon Oct 07, 2019 5:36 pm This is what I have guessed too but the only problem is that strncpy doesn't occur inside c_glglue_instance. It's used inside the function glglue_set_glVersion() which is invoked from within c_glglue_instance but then in the call stack glglue_set_glVersion() should occur, too.
Re: Crash when opening a document using "Recent files" without creating a new document before
As I already wrote in my previous mail from 6:10 PM it is indeed configuration related. So, there are three pre-conditions to reproduce the crash:chrisb wrote: ↑Mon Oct 07, 2019 5:42 pmSo it is indeed time to reset the configuration with the button in the preferences. Another possibility is to delete your config files or to move them in case you want to restore them.
- auto load module must be configured to "Part Design"
- FC must be freshly started, i.e. no document must be open
- one must use the "Recent files" menu to open a document
Re: Crash when opening a document using "Recent files" without creating a new document before
All three met here, no crash. It might be only Mac related?tom wrote: ↑Mon Oct 07, 2019 6:37 pm As I already wrote in my previous mail from 6:10 PM it is indeed configuration related. So, there are three pre-conditions to reproduce the crash:
auto load module must be configured to "Part Design"
FC must be freshly started, i.e. no document must be open
one must use the "Recent files" menu to open a document
Re: Crash when opening a document using "Recent files" without creating a new document before
Yes, that could be the case. c_glglue_instance is part of Coin's API while glglue_set_glVersion isn't and it's a global function inside the gl.cpp file.tom wrote: ↑Mon Oct 07, 2019 6:30 pmI guess that glglue_set_glVersion is simply inlined. In that case it doesn't appear on the stack.wmayer wrote: ↑Mon Oct 07, 2019 5:36 pm This is what I have guessed too but the only problem is that strncpy doesn't occur inside c_glglue_instance. It's used inside the function glglue_set_glVersion() which is invoked from within c_glglue_instance but then in the call stack glglue_set_glVersion() should occur, too.
Re: Crash when opening a document using "Recent files" without creating a new document before
I can confirm the crash with Autoload=PartDesign.
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18403 (Git)
Build type: Release
Branch: master
Hash: 0717b4fc23ef1db70964c3977d25e2fe46a739d1
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18403 (Git)
Build type: Release
Branch: master
Hash: 0717b4fc23ef1db70964c3977d25e2fe46a739d1
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 73
- Joined: Sat Feb 24, 2018 6:09 pm
Re: Crash when opening a document using "Recent files" without creating a new document before
I can also confirm the crash with Autoload=PartDesign.
OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18403 (Git)
Build type: Release
Branch: master
Hash: 0717b4fc23ef1db70964c3977d25e2fe46a739d1
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18403 (Git)
Build type: Release
Branch: master
Hash: 0717b4fc23ef1db70964c3977d25e2fe46a739d1
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
Re: Crash when opening a document using "Recent files" without creating a new document before
I compiled FC in debug configuration and started it in a debugger. Now it stops at an assertion point in QuarterWidget.cpp:889:
I think the segmentation fault in release configuration is related to that assertion since the stack trace looks quite similar:
Any ideas why the GL context is invalid here?
BR Thomas
Code: Select all
frame #4: 0x0000000100a65b25 libFreeCADGui.dylib`SIM::Coin3D::Quarter::QuarterWidget::paintEvent(this=0x0000000108bd7c00, event=0x00007ffeefbeae90) at QuarterWidget.cpp:889
886 glMatrixMode(GL_PROJECTION);
887
888 QtGLWidget* w = static_cast<QtGLWidget*>(this->viewport());
-> 889 assert(w->isValid() && "No valid GL context found!");
890 // We might have to process the delay queue here since we don't know
891 // if paintGL() is called from Qt, and we might have some sensors
892 // waiting to trigger (the redraw sensor has a lower priority than a
(lldb) p w
(CustomGLWidget *) $0 = 0x0000000130418bb0
(lldb) p *w
(QtGLWidget) $1 = {
QWidget = {
QObject = {
d_ptr = {
d = 0x0000000130418bf0
}
}
QPaintDevice = (painters = 0, reserved = 0x0000000000000000)
data = 0x0000000130418d20
}
}
(lldb)
Code: Select all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
* frame #0: 0x00007fff75e1fb66 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fff75fea080 libsystem_pthread.dylib`pthread_kill + 333
frame #2: 0x00007fff75d7b1ae libsystem_c.dylib`abort + 127
frame #3: 0x00007fff75d431ac libsystem_c.dylib`__assert_rtn + 320
frame #4: 0x0000000100a65b25 libFreeCADGui.dylib`SIM::Coin3D::Quarter::QuarterWidget::paintEvent(this=0x0000000108bd7c00, event=0x00007ffeefbeae90) at QuarterWidget.cpp:889
frame #5: 0x0000000100a70afd libFreeCADGui.dylib`SIM::Coin3D::Quarter::SoQTQuarterAdaptor::paintEvent(this=0x0000000108bd7c00, event=0x00007ffeefbeae90) at SoQTQuarterAdaptor.cpp:723
frame #6: 0x0000000104ef41c8 QtWidgets`QWidget::event(QEvent*) + 1096
frame #7: 0x0000000104f9a49d QtWidgets`QFrame::event(QEvent*) + 45
frame #8: 0x000000010520fdb7 QtWidgets`QGraphicsView::viewportEvent(QEvent*) + 1191
frame #9: 0x0000000100a65d60 libFreeCADGui.dylib`SIM::Coin3D::Quarter::QuarterWidget::viewportEvent(this=0x0000000108bd7c00, event=0x00007ffeefbeae90) at QuarterWidget.cpp:996
frame #10: 0x0000000105b816a4 QtCore`QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 148
frame #11: 0x0000000104eb87f8 QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 248
frame #12: 0x0000000104eb9c12 QtWidgets`QApplication::notify(QObject*, QEvent*) + 594
frame #13: 0x000000010046dbb6 libFreeCADGui.dylib`Gui::GUIApplication::notify(this=0x00007ffeefbfbf20, receiver=0x0000000130418bb0, event=0x00007ffeefbeae90) at GuiApplication.cpp:91
frame #14: 0x0000000105b813f4 QtCore`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
frame #15: 0x0000000104eece4f QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3135
frame #16: 0x0000000104eed5c0 QtWidgets`QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1120
frame #17: 0x0000000104eecfb7 QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3495
frame #18: 0x0000000104eed5c0 QtWidgets`QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1120
frame #19: 0x0000000104eecfb7 QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3495
frame #20: 0x0000000104eed5c0 QtWidgets`QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1120
frame #21: 0x0000000104eecfb7 QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3495
frame #22: 0x0000000104eed5c0 QtWidgets`QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1120
frame #23: 0x0000000104eecfb7 QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3495
frame #24: 0x0000000104eed5c0 QtWidgets`QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1120
frame #25: 0x0000000104eecfb7 QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3495
frame #26: 0x0000000104eed5c0 QtWidgets`QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1120
...
BR Thomas
Re: Crash when opening a document using "Recent files" without creating a new document before
Just looked at the documentation of QOpenGLWidget::isValid() and found an interesting note:
I assume that the mentioned QOpenGLWidget is the canvas for the 3D view, which is in the current scenario not visible yet. Perhaps it would be enough to show a empty canvas first before rending the opened document?bool QOpenGLWidget::isValid() const
Returns true if the widget and OpenGL resources, like the context, have been successfully initialized. Note that the return value is always false until the widget is shown.
Re: Crash when opening a document using "Recent files" without creating a new document before
Please open a ticket on the tracker for this bug. Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs