Bug #2540: Crash on startup

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Bug #2540: Crash on startup

Post by Kunda1 »

issue #2540: Crash on startup
Please read the ticket thread starting from: http://freecadweb.org/tracker/view.php?id=2540#c7959
OS: "Gentoo Base System release 2.3"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9795 (Git)
Build type: Debug
Branch: master
Hash: d9dda3fa1d26915bef1508c4bc31f3a7ef270dfe
Python version: 2.7.12
Qt version: 4.8.6
Coin version: 3.1.3
OCC version: 6.9.0
OP says that:
If I comment out this line, it works.

Code: Select all

Index: freecad-9999/src/Gui/Splashscreen.cpp
===================================================================
--- freecad-9999.orig/src/Gui/Splashscreen.cpp
+++ freecad-9999/src/Gui/Splashscreen.cpp
@@ -134,7 +134,7 @@ public:
                 return;
         }

- splash->showMessage(msg.replace(QLatin1String("\n"), QString()), alignment, textColor);
+ //splash->showMessage(msg.replace(QLatin1String("\n"), QString()), alignment, textColor);
         QMutex mutex;
         QMutexLocker ml(&mutex);
         QWaitCondition().wait(&mutex, 50);
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
smellyfis
Posts: 2
Joined: Tue Jan 24, 2017 4:28 pm

Re: Bug #2540: Crash on startup

Post by smellyfis »

I am having similar issues

attaching my gdb bt since i can't register for the bug tracker
Attachments
freecad_0.16_bt_full.txt
(5.71 KiB) Downloaded 54 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2540: Crash on startup

Post by Kunda1 »

smellyfis wrote:I am having similar issues

attaching my gdb bt since i can't register for the bug tracker
@smellyfis can you please also post the Help > About FreeCAD > Copy to clipboard data ?

I added the BT here for more convenience:

Code: Select all

Reading symbols from FreeCAD...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/FreeCAD
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
FreeCAD 0.16, Libs: 0.16RUnknown
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
  #####                 ####  ###   ####
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

              using visual class 4, id 63

              Program received signal SIGSEGV, Segmentation fault.
              0x00007ffff5893748 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
              (gdb) bt full
#0  0x00007ffff5893748 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#1  0x00007ffff5a639f2 in ?? () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#2  0x00007ffff5886250 in QWidgetPrivate::syncBackingStore() () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#3  0x00007ffff5899448 in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#4  0x00007ffff5ca0d32 in QSplashScreen::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#5  0x00007ffff58415ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#6  0x00007ffff5848676 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#7  0x00007ffff71cd385 in Gui::GUIApplication::notify(QObject*, QEvent*) () from /usr/lib64/libFreeCADGui.so
              No symbol table info available.
#8  0x00007ffff531611d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
              No symbol table info available.
#9  0x00007ffff5a653c4 in ?? () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#10 0x00007ffff5888b45 in QWidget::repaint(QRect const&) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#11 0x00007ffff5888ba3 in QWidget::repaint() () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#12 0x00007ffff5ca0589 in QSplashScreen::repaint() () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#13 0x00007ffff74561d4 in Gui::SplashObserver::Log(char const*) () from /usr/lib64/libFreeCADGui.so
              No symbol table info available.
#14 0x00007ffff67d2b55 in Base::ConsoleSingleton::NotifyLog(char const*) () from /usr/lib64/libFreeCADBase.so
              No symbol table info available.
#15 0x00007ffff67d2c5a in Base::ConsoleSingleton::Log(char const*, ...) () from /usr/lib64/libFreeCADBase.so
              No symbol table info available.
#16 0x00007ffff51f61f6 in qt_message_output(QtMsgType, char const*) () from /usr/lib64/qt4/libQtCore.so.4
              No symbol table info available.
#17 0x00007ffff343d45d in QGLWindowSurface::hijackWindow(QWidget*) () from /usr/lib64/qt4/libQtOpenGL.so.4
              No symbol table info available.
#18 0x00007ffff343ee53 in QGLWindowSurface::updateGeometry() () from /usr/lib64/qt4/libQtOpenGL.so.4
              No symbol table info available.
#19 0x00007ffff343fe38 in QGLWindowSurface::beginPaint(QRegion const&) () from /usr/lib64/qt4/libQtOpenGL.so.4
              No symbol table info available.
#20 0x00007ffff5a63778 in ?? () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#21 0x00007ffff5886250 in QWidgetPrivate::syncBackingStore() () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#22 0x00007ffff5899448 in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#23 0x00007ffff5ca0d32 in QSplashScreen::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#24 0x00007ffff58415ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#25 0x00007ffff5848676 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#26 0x00007ffff71cd385 in Gui::GUIApplication::notify(QObject*, QEvent*) () from /usr/lib64/libFreeCADGui.so
              No symbol table info available.
#27 0x00007ffff531611d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
              No symbol table info available.
#28 0x00007ffff5a65414 in ?? () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#29 0x00007ffff5888b45 in QWidget::repaint(QRect const&) () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#30 0x00007ffff5888ba3 in QWidget::repaint() () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#31 0x00007ffff5ca0589 in QSplashScreen::repaint() () from /usr/lib64/qt4/libQtGui.so.4
              No symbol table info available.
#32 0x00007ffff74561d4 in Gui::SplashObserver::Log(char const*) () from /usr/lib64/libFreeCADGui.so
              No symbol table info available.
#33 0x00007ffff67d2b55 in Base::ConsoleSingleton::NotifyLog(char const*) () from /usr/lib64/libFreeCADBase.so
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
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Bug #2540: Crash on startup

Post by wmayer »

In your callstack this function appears:
#16 0x00007ffff51f61f6 in qt_message_output(QtMsgType, char const*) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
So, this means Qt internally writes a log message or warning after the writing text to the splash screen. It would be interesting to know what this message is about. Can you start FreeCAD in a terminal, please? If there this message doesn't appear then start FreeCAD with the option "--write-log" and go to $HOME/.FreeCAD to open the file FreeCAD.log.
smellyfis
Posts: 2
Joined: Tue Jan 24, 2017 4:28 pm

Re: Bug #2540: Crash on startup

Post by smellyfis »

Here is my log:
FreeCAD.log
(7.63 KiB) Downloaded 46 times
I cannot even open FreeCAD to get to the help>about FreeCAD

I also I am having problem finding libGL.so so I have to start with LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/libGL.so. Other wise I get the following

Code: Select all

FreeCAD 0.16, Libs: 0.16RUnknown
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
  #####                 ####  ###   ####
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
using visual class 4, id 63
Segmentation fault
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Bug #2540: Crash on startup

Post by wmayer »

Thanks for the log file. When looking into it I found a suspicious line
hijackWindow() context created for Gui::SplashScreen
which apparently comes from Qt and is raised when trying to create a GL context. I wonder why Qt tries to that for a normal widget.

According to http://stackoverflow.com/questions/8793 ... reated-for you should pass

Code: Select all

-graphicssystem=raster
on the command line when starting FreeCAD.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2540: Crash on startup

Post by Kunda1 »

wmayer wrote:Thanks for the log file. When looking into it I found a suspicious line
hijackWindow() context created for Gui::SplashScreen
which apparently comes from Qt and is raised when trying to create a GL context. I wonder why Qt tries to that for a normal widget.

According to http://stackoverflow.com/questions/8793 ... reated-for you should pass

Code: Select all

-graphicssystem=raster
on the command line when starting FreeCAD.
OP writes in http://freecadweb.org/tracker/view.php?id=2540#c7977
Yep, my default graphics system was set to opengl. If I run FC with QT_GRAPHICSSYSTEM=raster it works flawlessly! That's why FC was not crashing on my other computer, because it was set to default there.
@wmayer should we do anything more about this ?
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
Post Reply