Bug 238568 - Restoring an session containing a file from an unreachable network causes a crash
Summary: Restoring an session containing a file from an unreachable network causes a c...
Status: RESOLVED DUPLICATE of bug 203774
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: VHI normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-23 11:52 UTC by riksweeney
Modified: 2010-05-27 00:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
A session file that crashes Kate immediately (2.60 KB, application/octet-stream)
2010-05-26 10:11 UTC, riksweeney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description riksweeney 2010-05-23 11:52:32 UTC
Version:           3.4.2 (using 4.4.2 (KDE 4.4.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.32-22-generic-pae

To reproduce:

Open Kate and ensure that Load previous session or Manually Choose Session is selected (Configure Kate -> Sessions). Open a text file on a networked computer. Close and and disconnect from the network so that the file is no longer reachable.

When Kate is reopened, it will complain that it cannot load the file, however, it has left an invisible file in the Documents list. Clicking close on that Document will crash Kate. The only way to fix this is to change the settings to something apart from Load last-used Session, closing Kate, restarting with a new Session and then removing the problem session using Manage Sessions.

Perhaps Kate should simply forget about the file if it cannot load it (that is, cleanly remove it).
Comment 1 Dominik Haumann 2010-05-23 12:24:23 UTC
Please provide the backtrace of your crash. Thanks.
Comment 2 riksweeney 2010-05-24 22:10:14 UTC
Here is the backtrace from the KDE Crash Handler. I added two files from a remote machine, closed Kate, disconnected the remote machine and restarted Kate (with load previous session selected). Kate crashed immediately (no window appeared).

Application: Kate (kdeinit4), signal: Segmentation fault
[KCrash Handler]
#6  0xb38e49de in ?? () from /usr/lib/libkateinterfaces.so.4
#7  0xb38e55c4 in ?? () from /usr/lib/libkateinterfaces.so.4
#8  0xb38b8d25 in ?? () from /usr/lib/libkateinterfaces.so.4
#9  0xb3899d62 in KateApp::newMainWindow(KConfig*, QString const&) () from /usr/lib/libkateinterfaces.so.4
#10 0xb38cfabf in ?? () from /usr/lib/libkateinterfaces.so.4
#11 0xb38d5ba4 in ?? () from /usr/lib/libkateinterfaces.so.4
#12 0xb389b78c in KateApp::startupKate() () from /usr/lib/libkateinterfaces.so.4
#13 0xb389bb70 in KateApp::initKate() () from /usr/lib/libkateinterfaces.so.4
#14 0xb389bda9 in KateApp::KateApp(KCmdLineArgs*) () from /usr/lib/libkateinterfaces.so.4
#15 0xb3ec16a5 in kdemain () from /usr/lib/libkdeinit4_kate.so
#16 0x0804e133 in _start ()


This doesn't look very helpful unfortunately. I'll see if I can get a better trace.
Comment 3 Dominik Haumann 2010-05-24 22:18:57 UTC
Thanks. Unfortunately, the backtrace still does not contain debug informagion in libkateinterfaces.so. Either install the *-devel packages of kdelibs/kate, or build the newest Kate locally according to this howto:
http://gitorious.org/kate/pages/Building%20Kate

Building kate locally won't touch your global kde installation, so it's safe to try this out. Can you still reproduce the crash here? If so, you'll get a much better backtrace.
Comment 4 riksweeney 2010-05-25 10:35:06 UTC
I hope this trace is better. Kate had only two files in its list, both from a remote computer. Even after verifying that I could reconnect to the remote computer Kate still crashed instantly on startup.

Running

run.sh kate -s <anything>

will cause kate to start an empty session and then I can remove the troublesome session via manage sessions.

Application: Kate (kate), signal: Aborted
[KCrash Handler]
#6  0xb7899430 in __kernel_vsyscall ()
#7  0xb5d5a651 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb5d5da82 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb603c2dc in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#10 0xb603c4aa in ?? () from /usr/lib/libQtCore.so.4
#11 0xb603c5b9 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#12 0xb603c5fc in qt_assert_x(char const*, char const*, char const*, int) () from /usr/lib/libQtCore.so.4
#13 0xb78510da in QList<int>::operator[] (this=0x990c740, i=1) at /usr/include/qt4/QtCore/qlist.h:447
#14 0xb78702c6 in KateViewDocumentProxyModel::sort (this=0x990c718) at /home/rik/temp/kate/kate/app/kateviewdocumentproxymodel.cpp:639
#15 0xb787061e in KateViewDocumentProxyModel::readSessionConfig (this=0x990c718, config=0x966e140, name=...) at /home/rik/temp/kate/kate/app/kateviewdocumentproxymodel.cpp:671
#16 0xb784295f in KateMainWindow (this=0x9718a48, sconfig=0x966e140, sgroup=..., __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>)
    at /home/rik/temp/kate/kate/app/katemainwindow.cpp:203
#17 0xb782b657 in KateApp::newMainWindow (this=0xbfea2514, sconfig_=0x966e140, sgroup_=...) at /home/rik/temp/kate/kate/app/kateapp.cpp:390
#18 0xb785d35d in KateSessionManager::activateSession (this=0x9713830, session=..., closeLast=false, saveLast=false, loadNew=true) at /home/rik/temp/kate/kate/app/katesession.cpp:341
#19 0xb785dea0 in KateSessionManager::chooseSession (this=0x9713830) at /home/rik/temp/kate/kate/app/katesession.cpp:452
#20 0xb782a29d in KateApp::startupKate (this=0xbfea2514) at /home/rik/temp/kate/kate/app/kateapp.cpp:182
#21 0xb7829cc7 in KateApp::initKate (this=0xbfea2514) at /home/rik/temp/kate/kate/app/kateapp.cpp:135
#22 0xb782930e in KateApp (this=0xbfea2514, args=0x9525598) at /home/rik/temp/kate/kate/app/kateapp.cpp:72
#23 0xb7891a2b in kdemain (argc=1, argv=0xbfea2b74) at /home/rik/temp/kate/kate/app/katemain.cpp:373
#24 0x080486c9 in main (argc=1, argv=0xbfea2b74) at /home/rik/temp/build/kate/app/kate_dummy.cpp:3
Comment 5 Dominik Haumann 2010-05-25 23:42:28 UTC
Yes, very useful backtrace now. Can you please attach the .katesession file that makes Kate crash? You can find it in ~/.kde4/share/apps/kate/sessions/ (or maybe ~/.kde/... without the 4). I hope that I can then reproduce it as well.
Comment 6 Dominik Haumann 2010-05-26 00:19:38 UTC
Related: bug #203774
Comment 7 riksweeney 2010-05-26 10:11:29 UTC
Created attachment 43902 [details]
A session file that crashes Kate immediately
Comment 8 riksweeney 2010-05-26 10:12:26 UTC
I've added the session file now, hope it helps.
Comment 9 Dominik Haumann 2010-05-27 00:14:28 UTC
Fixed for KDE >= 4.4.4. If you want, you can `git pull` and recompile with `make install`, then the crash should be fixed.

*** This bug has been marked as a duplicate of bug 203774 ***