[prev in list] [next in list] [prev in thread] [next in thread]
List: quanta-devel
Subject: [quanta-devel] crash after closing Quanta
From: Jens Herden <jens () kdewebdev ! org>
Date: 2005-02-21 13:02:01
Message-ID: 200502212002.01783.jens () kdewebdev ! org
[Download RAW message or body]
Hi Andras,
I see a crash if I start Quanta and immediately quit it again.
This is a real strange bug, because it does not happen if I compile Quanta on
KDE 3.3.2! Also it does not happen if the DTD toolbars are hidden. Or even
more strange if make every toolbar visible once.
What I could find out is that it is related to m_toolbarList in QuantaApp.
I find this in line 207 of quanta.cpp:
m_toolbarList.setAutoDelete(true);
And I tried to change it to false and no crash anymore.
So I digged more and found that the cause is in QuantaApp::slotRemoveToolbar.
Here you remove a toolbar from the QDict and since it is autodelete the name
is not valid later on when you reach:
emit toolbarRemoved(name);
You get the name by reference and during autodelete the references of the
string are decreased and since there is no other reference QT deletes the
QString.
If we add:
QString myName = name;
at the beginning of slotRemoveToolbar we increase the ref counter by one and
can use the string later. We just have to write:
emit toolbarRemoved(myName);
What do you think? Don't you have this crash? Shall I do the proposed changes?
Jens
_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic