[PATCH] artsshell crashing on logout

Waldo Bastian bastian at kde.org
Thu Nov 21 11:00:28 GMT 2002


Artsshell crashes quite reliably here on logout due to the connection object 
being deleted from underneath it in Arts::Dispatcher::connectUrl().

The following backtrace shows why (see also comment on dispatcher.cc:1030)
#8  0x4033677c in ~Connection (this=0x80551c0) at connection.cc:58
#9  0x40370347 in ~UnixConnection (this=0x80551c0) at unixconnection.cc:103
#10 0x40336b51 in Arts::Connection::_release() (this=0x80551c0) at 
connection.cc
:76
#11 0x4035e97f in Arts::Dispatcher::handleConnectionClose(Arts::Connection*) 
(th
is=0xbffff560, connection=0x80551c0)
    at dispatcher.cc:1046
#12 0x4036f0f4 in Arts::SocketConnection::notifyIO(int, int) (this=0x80551c0, 
_f
d=7, types=1) at socketconnection.cc:151
#13 0x40364505 in Arts::StdIOManager::processOneEvent(bool) (this=0x8052448, 
blo
cking=true) at iomanager.cc:315
#14 0x4035e2f6 in Arts::Dispatcher::connectUrl(std::string const&) 
(this=0xbffff
560, url=@0x805a5d0) at dispatcher.cc:944

The following patch fixes Arts::Dispatcher::connectUrl() by keeping an extra 
reference around to prevent that the connection object gets deleted while we 
use it. A similar situation exists in Arts::Dispatcher::waitForResult() which 
I have fixed likewise.

Please review.

Cheers,
Waldo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arts_connection.diff
Type: text/x-diff
Size: 1357 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021121/50cdaef7/attachment.diff>


More information about the kde-core-devel mailing list