Summary: | All koffice components (kword, krita, kspread, kpresenter...) crash at start-up application | ||
---|---|---|---|
Product: | [Unmaintained] kword | Reporter: | Gianluca <gianluca.ped> |
Component: | general | Assignee: | Thomas Zander <zander> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ereslibre |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Gianluca
2008-10-12 20:37:29 UTC
*** This bug has been marked as a duplicate of bug 167905 *** 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. 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 |