Bug 172678 - All koffice components (kword, krita, kspread, kpresenter...) crash at start-up application
Summary: All koffice components (kword, krita, kspread, kpresenter...) crash at start-...
Status: RESOLVED FIXED
Alias: None
Product: kword
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Thomas Zander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-12 20:37 UTC by Gianluca
Modified: 2008-10-19 02:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gianluca 2008-10-12 20:37:29 UTC
Version:           Koffice  svn (using Devel)
Compiler:          Cmake, gcc from Intrepid repository 
OS:                Linux
Installed from:    Compiled sources

First of all, excuse me for my bad English. When i try to start a component of the koffice suite, it crashes. This is the backtrace: 


Applicazione: KWord (kword), segnale SIGSEGV

Thread 1 (Thread 0xb57e06c0 (LWP 25598)):
[KCrash Handler]
#6  0xb681e4a9 in KFileWidget::showEvent () from /opt/kde4/lib/libkfile.so.4
#7  0xb74937d9 in QWidget::event () from /usr/lib/libQtGui.so.4
#8  0xb743b8ec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#9  0xb744383a in QApplication::notify () from /usr/lib/libQtGui.so.4
#10 0xb716cb5d in KApplication::notify () from /opt/kde4/lib/libkdeui.so.5
#11 0xb6db6e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#12 0xb7496913 in QWidgetPrivate::show_helper () from /usr/lib/libQtGui.so.4
#13 0xb7496eb3 in QWidget::setVisible () from /usr/lib/libQtGui.so.4
#14 0xb7496c88 in QWidgetPrivate::showChildren () from /usr/lib/libQtGui.so.4
#15 0xb7496821 in QWidgetPrivate::show_helper () from /usr/lib/libQtGui.so.4
#16 0xb7496eb3 in QWidget::setVisible () from /usr/lib/libQtGui.so.4
#17 0xb7496c88 in QWidgetPrivate::showChildren () from /usr/lib/libQtGui.so.4
#18 0xb7496821 in QWidgetPrivate::show_helper () from /usr/lib/libQtGui.so.4
#19 0xb7496eb3 in QWidget::setVisible () from /usr/lib/libQtGui.so.4
#20 0xb7837917 in QSplitter::childEvent () from /usr/lib/libQtGui.so.4
#21 0xb6dc6527 in QObject::event () from /usr/lib/libQtCore.so.4
#22 0xb7493044 in QWidget::event () from /usr/lib/libQtGui.so.4
#23 0xb7837604 in QSplitter::event () from /usr/lib/libQtGui.so.4
#24 0xb743b8ec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#25 0xb744383a in QApplication::notify () from /usr/lib/libQtGui.so.4
#26 0xb716cb5d in KApplication::notify () from /opt/kde4/lib/libkdeui.so.5
#27 0xb6db6e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#28 0xb7486465 in QWidget::ensurePolished () from /usr/lib/libQtGui.so.4
#29 0xb74690c4 in QLayout::totalMinimumSize () from /usr/lib/libQtGui.so.4
#30 0xb7483c76 in QWidget::minimumSizeHint () from /usr/lib/libQtGui.so.4
#31 0xb746b491 in qSmartMinSize () from /usr/lib/libQtGui.so.4
#32 0xb783338e in ?? () from /usr/lib/libQtGui.so.4
#33 0xb7834e0e in ?? () from /usr/lib/libQtGui.so.4
#34 0xb74937bd in QWidget::event () from /usr/lib/libQtGui.so.4
#35 0xb7837604 in QSplitter::event () from /usr/lib/libQtGui.so.4
#36 0xb743b8ec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#37 0xb744383a in QApplication::notify () from /usr/lib/libQtGui.so.4
#38 0xb716cb5d in KApplication::notify () from /opt/kde4/lib/libkdeui.so.5
#39 0xb6db6e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#40 0xb74ccbae in QWidgetPrivate::setGeometry_sys () from /usr/lib/libQtGui.so.4
#41 0xb748e568 in QWidget::setGeometry () from /usr/lib/libQtGui.so.4
#42 0xb7878aa0 in ?? () from /usr/lib/libQtGui.so.4
#43 0xb77bc83d in ?? () from /usr/lib/libQtGui.so.4
#44 0xb77e9772 in ?? () from /usr/lib/libQtGui.so.4
#45 0xb77ea54a in ?? () from /usr/lib/libQtGui.so.4
#46 0xb77ea7f8 in ?? () from /usr/lib/libQtGui.so.4
#47 0xb746926c in QLayoutPrivate::doResize () from /usr/lib/libQtGui.so.4
#48 0xb74693a5 in QLayout::activate () from /usr/lib/libQtGui.so.4
#49 0xb746a952 in QLayout::widgetEvent () from /usr/lib/libQtGui.so.4
#50 0xb743b8b7 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#51 0xb744383a in QApplication::notify () from /usr/lib/libQtGui.so.4
#52 0xb716cb5d in KApplication::notify () from /opt/kde4/lib/libkdeui.so.5
#53 0xb6db6e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#54 0xb6db7ae5 in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#55 0xb6db7cdd in QCoreApplication::sendPostedEvents () from /usr/lib/libQtCore.so.4
#56 0xb6de182f in ?? () from /usr/lib/libQtCore.so.4
#57 0xb5faf6f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#58 0xb5fb2da3 in ?? () from /usr/lib/libglib-2.0.so.0
#59 0xb5fb2f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#60 0xb6de1478 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#61 0xb74d5ee5 in ?? () from /usr/lib/libQtGui.so.4
#62 0xb6db552a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#63 0xb6db56ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#64 0xb626c43b in KIO::NetAccess::enter_loop () from /opt/kde4/lib/libkio.so.5
#65 0xb626caff in KIO::NetAccess::synchronousRunInternal () from /opt/kde4/lib/libkio.so.5
#66 0xb626d1b1 in KIO::NetAccess::synchronousRun () from /opt/kde4/lib/libkio.so.5
#67 0xb6829611 in KFileWidget::KFileWidget () from /opt/kde4/lib/libkfile.so.4
#68 0xb7cd0ffc in KoExistingDocumentPane::KoExistingDocumentPane () from /opt/kde4/lib/libkomain.so.5
#69 0xb7cbc4fb in KoOpenPane::initExistingFilesPane () from /opt/kde4/lib/libkomain.so.5
#70 0xb7cbd407 in KoOpenPane::KoOpenPane () from /opt/kde4/lib/libkomain.so.5
#71 0xb7c40da3 in KoDocument::createOpenPane () from /opt/kde4/lib/libkomain.so.5
#72 0xb7c445b4 in KoDocument::showStartUpWidget () from /opt/kde4/lib/libkomain.so.5
#73 0xb3fe5f07 in KWDocument::showStartUpWidget () from /opt/kde4/lib/libkwordprivate.so.5
#74 0xb7c6e17a in KoApplication::start () from /opt/kde4/lib/libkomain.so.5
#75 0xb7f63e6f in kdemain () from /opt/kde4/lib/libkdeinit4_kword.so
#76 0x08048692 in main ()
Comment 1 Thomas Zander 2008-10-12 20:51:18 UTC

*** This bug has been marked as a duplicate of bug 167905 ***
Comment 2 Rafael Fernández López 2008-10-19 02:35:50 UTC
After some analysis it is clear what is going on. On showEvent() method what is clear is that 'd' is not 0, what is 0 is d->ops. Why ? What is going on ? On the constructor of KFileWidget we are doing a synchronousRun (just before KDirOperator is created !). This synchronousRun will execute the event loop which will send the show event to the widget, which will try to access to d-ªops before being assigned.

Way of easily check this:
1) Add an assertion just before the synchronousRun (Q_ASSERT(0))
2) Add an assertion just after the synchronousRun
3) Add an assertion of the type: Q_ASSERT(d->ops) on showEvent method.

You will see that you get the assertion 1). Now remove it.
You will see that you don't hit 2), but 3).

That's because (yes, is strange) while being on the constructor (not finished yet, just before doing 'd->url = getStatUrl' we have executed the showEvent method).

I am working on a proper fix.
Comment 3 Rafael Fernández López 2008-10-19 02:43:55 UTC
SVN commit 873189 by ereslibre:

Fix crash on KOffice (well, and any component using directly KFileWidget). The main problem was that synchronousRun does make the event loop being executed (specially those events which are graphical,
for making the GUI not look 'stalled'). This produces the showEvent() method being called while the constructor of KFileWidget hasn't been finished yet (specially d->ops not being assigned yet, thus,
d->ops was a perfect 0). showEvent() method was being called _before_ d->ops was being assigned, and of course, it was crashing. The fix is to create the dir operator with a null url, and after we have
initializated all the needed components, we can run the synchronousRun method.

BUG: 172678


 M  +15 -13    kfilewidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=873189