deleteLater document (and view)
niko.sams at gmail.com
Tue Jun 22 18:08:19 UTC 2010
On Mon, Jun 21, 2010 at 11:35, David Nolden <zwabel at googlemail.com> wrote:
> 2010/6/20 Niko Sams <niko.sams at gmail.com>:
>> Hello all and David,
>> While working on my browser-like-tabs experiment I get crashes in the event-loop
>> when Ctrl-Clicking a function in the editor, as the currently open
>> view is closed
>> inside openDocument.
>> My guess is that it is deleted while the click event is handled.
>> deleting using deleteLater for the view would fix this.
>> But here I found a commit that changed the deletion the other way around:
>> After reverting this commit my problem is solved, and (not very
>> intensive) testing of workingsets
>> didn't result in a crash either.
>> How should I proceed?
> I'm pretty sure that the commit was required. We were talking about
> "random" crashes, which means they may be hard to reproduce.
> The question is, why is the view closed in openDocument()? Cannot you
> just schedule the closing of the document, and do it afterwards during
> event processing? (For example through QMetaObject::invokeMethod(this,
> "closeDocument", ..., Qt::QueuedConnection). However you've got to
> make sure that it doesn't crash if the document was already closed in
> the meantime when the event is processed.
That was my first idea too, but because of the "save changes?" dialog
the last view it is not that easy.
More information about the KDevelop-devel