View Issue Details

IDProjectCategoryView StatusLast Update
0000125FreeCADBugpublic2010-08-10 20:22
Reporteryorik Assigned Toyorik  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Fixed in Version0.11 
Summary0000125: FreeCAD crashes when exploring the contents of a Mesh object with the python class browser
DescriptionI got this interesting crash, typing this code in the python interpreter:

import Mesh
m = Mesh.Mesh()
m.

when you type "m.", the class browser appears. Navigate down with the down arrow key. When you reach the "Facets" item, the crash occurs. It also happens with other items than Facets ("Points" also, I think), but it's hard to see whithout passing on the crashing items :p but I'll try to see which items cause the crash and which not.

gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2a5cfdd in QTextLine::layout_helper(int) ()
   from /usr/lib/libQtGui.so.4
(gdb) bt
#0 0x00007ffff2a5cfdd in QTextLine::layout_helper(int) ()
   from /usr/lib/libQtGui.so.4
#1 0x00007ffff2955c96 in ?? () from /usr/lib/libQtGui.so.4
0000002 0x00007ffff2956dbe in QPainter::drawText(QRect const&, int, QString const&, QRect*) () from /usr/lib/libQtGui.so.4
0000003 0x00007ffff2b86ce6 in QCleanlooksStyle::drawItemText(QPainter*, QRect const&, int, QPalette const&, bool, QString const&, QPalette::ColorRole) const ()
   from /usr/lib/libQtGui.so.4
0000004 0x00007ffff2bfe9d1 in QLabel::paintEvent(QPaintEvent*) ()
   from /usr/lib/libQtGui.so.4
0000005 0x00007ffff283d0fd in ?? () from /usr/lib/libQtGui.so.4
0000006 0x00007ffff28521e2 in QWidget::event(QEvent*) ()
   from /usr/lib/libQtGui.so.4
0000007 0x00007ffff2bf9946 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
0000008 0x00007ffff27fc32c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/libQtGui.so.4
0000009 0x00007ffff280280b in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
0000010 0x00007ffff767f18c in Gui::GUIApplication::notify(QObject*, QEvent*) ()
   from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000011 0x00007ffff16fb15c in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/libQtCore.so.4
0000012 0x00007ffff285a7dd in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion cons---Type <return> to continue, or q <return> to quit---
t&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/libQtGui.so.4
0000013 0x00007ffff2a14a45 in ?? () from /usr/lib/libQtGui.so.4
0000014 0x00007ffff284c140 in QWidgetPrivate::syncBackingStore() ()
   from /usr/lib/libQtGui.so.4
0000015 0x00007ffff28528e5 in QWidget::event(QEvent*) ()
   from /usr/lib/libQtGui.so.4
0000016 0x00007ffff2bf9946 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
0000017 0x00007ffff27fc32c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/libQtGui.so.4
0000018 0x00007ffff280280b in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
0000019 0x00007ffff767f18c in Gui::GUIApplication::notify(QObject*, QEvent*) ()
   from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000020 0x00007ffff16fb15c in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/libQtCore.so.4
0000021 0x00007ffff16fe804 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
0000022 0x00007ffff1724bd3 in ?? () from /usr/lib/libQtCore.so.4
0000023 0x00007fffebe5a6c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
0000024 0x00007fffebe5e538 in ?? () from /lib/libglib-2.0.so.0
0000025 0x00007fffebe5e6ec in g_main_context_iteration ()
   from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
0000026 0x00007ffff1724713 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
0000027 0x00007ffff28ac14e in ?? () from /usr/lib/libQtGui.so.4
0000028 0x00007ffff16f9a82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
0000029 0x00007ffff16f9e5c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
0000030 0x00007ffff16feaeb in QCoreApplication::exec() ()
   from /usr/lib/libQtCore.so.4
0000031 0x00007ffff767b898 in Gui::Application::runApplication() ()
   from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000032 0x000000000040606c in main ()

I also got this different backtrace when changing the FreeCAD Qt style from cleanlooks to oxygen (the crash occurs too, at the same place):

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2a5cfdd in QTextLine::layout_helper(int) ()
   from /usr/lib/libQtGui.so.4
(gdb) bt
#0 0x00007ffff2a5cfdd in QTextLine::layout_helper(int) ()
   from /usr/lib/libQtGui.so.4
#1 0x00007ffff2955c96 in ?? () from /usr/lib/libQtGui.so.4
0000002 0x00007ffff29568f1 in ?? () from /usr/lib/libQtGui.so.4
0000003 0x00007ffff2a31ef8 in QFontMetrics::boundingRect(QRect const&, int, QString const&, int, int*) const () from /usr/lib/libQtGui.so.4
0000004 0x00007ffff2bff27d in ?? () from /usr/lib/libQtGui.so.4
0000005 0x00007ffff2bff5e5 in QLabel::minimumSizeHint() const ()
   from /usr/lib/libQtGui.so.4
0000006 0x00007ffff2bff6a3 in QLabel::sizeHint() const ()
   from /usr/lib/libQtGui.so.4
0000007 0x00007ffff283d245 in ?? () from /usr/lib/libQtGui.so.4
0000008 0x00007ffff283dd4a in QToolTip::showText(QPoint const&, QString const&, QWidget*, QRect const&) () from /usr/lib/libQtGui.so.4
0000009 0x00007ffff283df0b in QToolTip::showText(QPoint const&, QString const&, QWidget*) () from /usr/lib/libQtGui.so.4
0000010 0x00007ffff77c865a in Gui::CallTipsList::eventFilter(QObject*, QEvent*) ()
   from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000011 0x00007ffff16fa63b in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
0000012 0x00007ffff27fc2a6 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/libQtGui.so.4
0000013 0x00007ffff2803fc5 in QApplication::notify(QObject*, QEvent*) ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/libQtGui.so.4
0000014 0x00007ffff767f18c in Gui::GUIApplication::notify(QObject*, QEvent*) ()
   from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000015 0x00007ffff16fb15c in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/libQtCore.so.4
0000016 0x00007ffff28a6d1a in ?? () from /usr/lib/libQtGui.so.4
0000017 0x00007ffff28a9291 in ?? () from /usr/lib/libQtGui.so.4
0000018 0x00007ffff2880a04 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/libQtGui.so.4
0000019 0x00007ffff28ac552 in ?? () from /usr/lib/libQtGui.so.4
0000020 0x00007fffebe5a6c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
0000021 0x00007fffebe5e538 in ?? () from /lib/libglib-2.0.so.0
0000022 0x00007fffebe5e6ec in g_main_context_iteration ()
   from /lib/libglib-2.0.so.0
0000023 0x00007ffff1724713 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
0000024 0x00007ffff28ac14e in ?? () from /usr/lib/libQtGui.so.4
0000025 0x00007ffff16f9a82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
0000026 0x00007ffff16f9e5c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
0000027 0x00007ffff16feaeb in QCoreApplication::exec() ()
   from /usr/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
0000028 0x00007ffff767b898 in Gui::Application::runApplication() ()
   from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000029 0x000000000040606c in main ()
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2010-07-15 06:37

administrator   ~0000269

Works for me under Ubuntu Lucid 64-bit and Windows using all available styles.

yorik

2010-07-15 11:34

administrator   ~0000270

Oh? Strange... I'll test on a linux machine too.
It looks like some trivial deep-inside-qt paint/boundary size thing... I'll try to dig a bit more information and if I find nothing new then we close the subject.

unauthenticated

2010-07-15 18:53

viewer   ~0000272

Under Ubuntu the Cleanlooks style causes some problems if desktop theme is Dust. When changing to Cleanlooks after startup some menu items are not visible. So, it's possible that there is also some crash but that's definitely not a FreeCAD bug, it's more likely a Qt/GTK bug.

Jriegel

2010-07-16 04:40

administrator   ~0000273

I think more Important is the Size of the MESH you use. Facets can Be reale Large List which can shurly Crash Qt if ahndet unchecked.

yorik

2010-07-17 19:58

administrator   ~0000274

Hm, just tested on ubuntu and it works fine.
I also looked, only the "Facets" and "Points" items cause the crash...
Probably it's nothing to do with FreeCAD itself, more probably some weird thing in the Qt tooltip formatting. But I'd like to see if I can solve, so I'll leave the bug open for a while okay? I'll assign it to myself...

unauthenticated

2010-07-18 09:30

viewer   ~0000275

This is IMO very likely an issue with Qt. On my Debian testing environment I first have tested it without problems but after doing a dist-upgrade which installed Qt 4.6.3 (just don't what version it was before the upgrade) I run into the same crash from time to time -- not always. But it also stops somewhere in QTextLine::layout_helper(int)

unauthenticated

2010-07-18 09:39

viewer   ~0000276

See also http://bugreports.qt.nokia.com/browse/QTBUG-5923

yorik

2010-08-10 20:22

administrator   ~0000298

fixed in r3407. Appearently, Qt tooltips don't like blank lines... I just removed the empty lines in 2 method descriptions.

Issue History

Date Modified Username Field Change
2010-07-14 11:59 yorik New Issue
2010-07-15 06:37 wmayer Note Added: 0000269
2010-07-15 06:37 wmayer Resolution open => unable to reproduce
2010-07-15 11:34 yorik Note Added: 0000270
2010-07-15 18:53 unauthenticated Note Added: 0000272
2010-07-16 04:40 Jriegel Note Added: 0000273
2010-07-17 19:58 yorik Note Added: 0000274
2010-07-17 19:58 yorik Status new => assigned
2010-07-17 19:58 yorik Assigned To => yorik
2010-07-18 09:30 unauthenticated Note Added: 0000275
2010-07-18 09:39 unauthenticated Note Added: 0000276
2010-08-10 20:22 yorik Note Added: 0000298
2010-08-10 20:22 yorik Status assigned => resolved
2010-08-10 20:22 yorik Fixed in Version => 0.11
2010-08-10 20:22 yorik Resolution unable to reproduce => fixed
2010-08-10 20:22 yorik Status resolved => feedback
2010-08-10 20:22 yorik Resolution fixed => reopened
2010-08-10 20:22 yorik Status feedback => closed
2010-08-10 20:22 yorik Resolution reopened => fixed