Version: (using KDE KDE 3.5.6) OS: Linux When I log off a KDE session and the main juk window is visible, juk crashes. On the next login, if the tray icon was disabled, juk is running in the process list but there is no way to switch to it (well, there is: run a juk from the start menu, and only one copy remains running and visible). The problem is that, when the main (splitter) window is visible, JuK::queryExit() is invoked twice. The first time splitter is valid and it's visible state is recorded correctly. The 2nd time it's invalid (deleted in the first invokation), so it's state is saved as invisible, and "delete m_splitter;" crashes. I'm not familiar with the KDE flow control and so wrote a simple workaround that sets m_splitter to 0 after deleting it and checks if (m_splitter) at the start of queryExit(). Works for me. This is for session logouts only. I don't think it's the same bug as 70015/69986, albeit the backtrace looks similar. 87244 is also a crash on session save, but the trace is different.
Created attachment 20325 [details] backtrace
Created attachment 20327 [details] patch set m_splitter to 0 after deleting it, check for m_splitter on top of queryExit()
SVN commit 811443 by mpyne: Fix bug 144427 (JuK crashes if main window open on logout) in KDE 4.0. I was not able to reproduce but the reporter did a very good job of hunting down the cause and came up with a patch which I tweaked to fix the underlying issue. Basically, we do too much in queryExit(). We already had a slot called slotAboutToQuit() (which was similarly mislabeled) so I used the "official" means of hooking up to QCoreApplication::aboutToQuit(), and implemented the reporter's patch of setting the deleted object to 0 in case we try to delete it again somehow. CCBUG:144427 M +21 -13 juk.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=811443
SVN commit 811444 by mpyne: Forwardport fix for bug 144427 to trunk. Also a coding style fix and remove some extraneous debug calls. BUG:144427 M +22 -18 juk.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=811444
SVN commit 811447 by mpyne: Forgot to backport this to KDE 3.5, which is what bug 144427 was reported against. The bug report was so useful that I want to reward the reporter so if you're still using 3.5, it should crash less now. CCBUG:144427 M +1 -0 juk.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=811447