Bug 295072 - Python code, paste method class, modify a little, collapse it, try to reload file, crash
Summary: Python code, paste method class, modify a little, collapse it, try to reload ...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: folding (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: VHI crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 15:32 UTC by Tomasz Narloch
Modified: 2012-03-20 19:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.2


Attachments
New crash information added by DrKonqi (8.03 KB, text/plain)
2012-02-29 16:34 UTC, Tomasz Narloch
Details
./run.sh valgrind --track-origins=yes --num-callers=25 kate 2>~/katelogs3.txt (34.16 KB, text/plain)
2012-02-29 16:35 UTC, Tomasz Narloch
Details
File that I open by fish protocol and genarate a problem on reload (3.76 KB, text/x-python)
2012-02-29 16:40 UTC, Tomasz Narloch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Narloch 2012-02-29 15:32:24 UTC
Application: kdevelop (4.2.3)
KDE Platform Version: 4.6.5 (4.6.5) (Compiled from sources)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-13-generic x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed:

Probably it is katepart problem, but I haven't tried.
I edited python code, paste a class method and change it a little, 
next collapsed it and I saw that one empty line between this and next method is collapsed too.
SO I want to editor refresh view so I tried to reopen file, then editor crashed.

The crash does not seem to be reproducible.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Aborted
[Current thread is 1 (Thread 0x7fa54e589780 (LWP 2618))]

Thread 12 (Thread 0x7fa535ffe700 (LWP 2619)):
#0  0x00007fa54ab473c4 in __pthread_mutex_lock (mutex=0xd0df38) at pthread_mutex_lock.c:61
#1  0x00007fa54614a869 in g_main_context_release () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa54614c13a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa54614c639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fa54cb98446 in QEventDispatcherGlib::processEvents (this=0xbf16d0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007fa54cb6c882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fa54cb6cabc in QEventLoop::exec (this=0x7fa535ffddd0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007fa54ca83924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#8  0x00007fa54cb4ec2f in QInotifyFileSystemWatcherEngine::run (this=0xd0cc70) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007fa54ca86175 in QThreadPrivate::start (arg=0xd0cc70) at thread/qthread_unix.cpp:320
#10 0x00007fa54ab44d8c in start_thread (arg=0x7fa535ffe700) at pthread_create.c:304
#11 0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7fa52f69d700 (LWP 2620)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216
#1  0x00007fa54ca8679e in wait (this=<value optimized out>, mutex=0x1ef3a50, time=1000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1ef3a50, time=1000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fa5490ab28b in ?? () from /usr/lib/libkdevplatformlanguage.so.3
#4  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x1ef3a30) at thread/qthread_unix.cpp:320
#5  0x00007fa54ab44d8c in start_thread (arg=0x7fa52f69d700) at pthread_create.c:304
#6  0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7fa5295ee700 (LWP 2626)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa54ca8682b in wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fa54418f0b4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x27a22c0, th=0x2792000) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fa544191723 in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x2792000) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fa54419173c in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x2792000) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007fa54419173c in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x2792000) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007fa54419053f in ThreadWeaver::ThreadRunHelper::run (this=0x7fa5295ede20, parent=0x27a22c0, th=0x2792000) at ../../../threadweaver/Weaver/Thread.cpp:87
#8  0x00007fa5441905cb in ThreadWeaver::Thread::run (this=0x2792000) at ../../../threadweaver/Weaver/Thread.cpp:142
#9  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x2792000) at thread/qthread_unix.cpp:320
#10 0x00007fa54ab44d8c in start_thread (arg=0x7fa5295ee700) at pthread_create.c:304
#11 0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fa525dc9700 (LWP 2627)):
#0  0x00007fa54614b082 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fa54614bf9d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa54614c639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa54cb98446 in QEventDispatcherGlib::processEvents (this=0x284cce0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fa54cb6c882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fa54cb6cabc in QEventLoop::exec (this=0x7fa525dc8e00, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fa54ca83924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#7  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x2848f90) at thread/qthread_unix.cpp:320
#8  0x00007fa54ab44d8c in start_thread (arg=0x7fa525dc9700) at pthread_create.c:304
#9  0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fa523aa2700 (LWP 2631)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa54393a832 in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007fa54ab44d8c in start_thread (arg=0x7fa523aa2700) at pthread_create.c:304
#3  0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fa521f56700 (LWP 2637)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa534ef42a2 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7fa53520d180) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007fa534ef42d9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7fa53521b254) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007fa54ab44d8c in start_thread (arg=0x7fa521f56700) at pthread_create.c:304
#4  0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fa521186700 (LWP 2659)):
#0  0x00007fa54cb98448 in QEventDispatcherGlib::processEvents (this=0x3c21fe0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:423
#1  0x00007fa54cb6c882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#2  0x00007fa54cb6cabc in QEventLoop::exec (this=0x7fa521185dd0, flags=...) at kernel/qeventloop.cpp:201
#3  0x00007fa54ca83924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#4  0x00007fa54cb4ec2f in QInotifyFileSystemWatcherEngine::run (this=0x3c21510) at io/qfilesystemwatcher_inotify.cpp:248
#5  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x3c21510) at thread/qthread_unix.cpp:320
#6  0x00007fa54ab44d8c in start_thread (arg=0x7fa521186700) at pthread_create.c:304
#7  0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fa51ef3e700 (LWP 2673)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa54ca8682b in wait (this=<value optimized out>, mutex=0xfbc3f0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xfbc3f0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fa54418f0b4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xf88bb0, th=0x42dcb10) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fa544191723 in ThreadWeaver::WorkingHardState::applyForWork (this=0xfbca20, th=0x42dcb10) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fa54419053f in ThreadWeaver::ThreadRunHelper::run (this=0x7fa51ef3de20, parent=0xf88bb0, th=0x42dcb10) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007fa5441905cb in ThreadWeaver::Thread::run (this=0x42dcb10) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x42dcb10) at thread/qthread_unix.cpp:320
#8  0x00007fa54ab44d8c in start_thread (arg=0x7fa51ef3e700) at pthread_create.c:304
#9  0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fa52093b700 (LWP 2678)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa54ca8682b in wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fa54418f0b4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x27a22c0, th=0x3db4d90) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fa544191723 in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x3db4d90) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fa54419053f in ThreadWeaver::ThreadRunHelper::run (this=0x7fa52093ae20, parent=0x27a22c0, th=0x3db4d90) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007fa5441905cb in ThreadWeaver::Thread::run (this=0x3db4d90) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x3db4d90) at thread/qthread_unix.cpp:320
#8  0x00007fa54ab44d8c in start_thread (arg=0x7fa52093b700) at pthread_create.c:304
#9  0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fa51fbad700 (LWP 2679)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa54ca8682b in wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fa54418f0b4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x27a22c0, th=0x42ca8f0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fa544191723 in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x42ca8f0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fa54419173c in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x42ca8f0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007fa54419173c in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x42ca8f0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007fa54419053f in ThreadWeaver::ThreadRunHelper::run (this=0x7fa51fbace20, parent=0x27a22c0, th=0x42ca8f0) at ../../../threadweaver/Weaver/Thread.cpp:87
#8  0x00007fa5441905cb in ThreadWeaver::Thread::run (this=0x42ca8f0) at ../../../threadweaver/Weaver/Thread.cpp:142
#9  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x42ca8f0) at thread/qthread_unix.cpp:320
#10 0x00007fa54ab44d8c in start_thread (arg=0x7fa51fbad700) at pthread_create.c:304
#11 0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fa51e2bf700 (LWP 2680)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa54ca8682b in wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x9c8e40, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fa54418f0b4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x27a22c0, th=0x44537f0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fa544191723 in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x44537f0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fa54419173c in ThreadWeaver::WorkingHardState::applyForWork (this=0xd37230, th=0x44537f0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007fa54419053f in ThreadWeaver::ThreadRunHelper::run (this=0x7fa51e2bee20, parent=0x27a22c0, th=0x44537f0) at ../../../threadweaver/Weaver/Thread.cpp:87
#7  0x00007fa5441905cb in ThreadWeaver::Thread::run (this=0x44537f0) at ../../../threadweaver/Weaver/Thread.cpp:142
#8  0x00007fa54ca86175 in QThreadPrivate::start (arg=0x44537f0) at thread/qthread_unix.cpp:320
#9  0x00007fa54ab44d8c in start_thread (arg=0x7fa51e2bf700) at pthread_create.c:304
#10 0x00007fa54b7bd04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa54e589780 (LWP 2618)):
[KCrash Handler]
#6  0x00007fa54b70ad05 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007fa54b70eab6 in abort () at abort.c:92
#8  0x00007fa54ca7cad4 in qt_message_output (msgType=<value optimized out>, buf=<value optimized out>) at global/qglobal.cpp:2282
#9  0x00007fa54ca7cc8f in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7fa54cbcc0a8 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fffe1c05420) at global/qglobal.cpp:2328
#10 0x00007fa54ca7ce31 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2511
#11 0x00007fa5349ddbf1 in KateCodeFoldingTree::applyFoldingState (this=0x2e29a80) at /home/tomek2/kde/kate/part/syntax/katecodefolding.cpp:1636
#12 0x00007fa5348d4c34 in KateCodeFoldingTree::qt_metacall (this=0x2e29a80, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fffe1c05680) at /home/tomek2/kde/build/part/moc_katecodefolding.cpp:106
#13 0x00007fa54cb825f8 in QMetaObject::activate (sender=0x2e34400, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffe1c05680) at kernel/qobject.cpp:3287
#14 0x00007fa54d798277 in KTextEditor::Document::reloaded (this=0x2e34400, _t1=0x2e34400) at /home/tomek2/kde/build/ktexteditor/document.moc:236
#15 0x00007fa534954281 in KateDocument::documentReload (this=0x2e34400) at /home/tomek2/kde/kate/part/document/katedocument.cpp:3972
#16 0x00007fa54da45fb5 in KDevelop::TextDocument::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdevplatformshell.so.3
#17 0x00007fa54cb825f8 in QMetaObject::activate (sender=0x42c5bb0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffe1c05be0) at kernel/qobject.cpp:3287
#18 0x00007fa54bf24122 in QAction::triggered (this=<value optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#19 0x00007fa54bf2430f in QAction::activate (this=0x42c5bb0, event=<value optimized out>) at kernel/qaction.cpp:1257
#20 0x00007fa54c3689f3 in QMenuPrivate::activateCausedStack (this=0xe234e0, causedStack=..., action=0x42c5bb0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:993
#21 0x00007fa54c36e9aa in QMenuPrivate::activateAction (this=0xe234e0, action=0x42c5bb0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1085
#22 0x00007fa54d41bbfd in KMenu::mouseReleaseEvent (this=0x7fffe1c07510, e=<value optimized out>) at ../../kdeui/widgets/kmenu.cpp:458
#23 0x00007fa54bf7bcc8 in QWidget::event (this=0x7fffe1c07510, event=0x7fffe1c06850) at kernel/qwidget.cpp:8259
#24 0x00007fa54c36fb8b in QMenu::event (this=0x7fffe1c07510, e=0x7fffe1c06850) at widgets/qmenu.cpp:2415
#25 0x00007fa54bf2a9f4 in QApplicationPrivate::notify_helper (this=0x922550, receiver=0x7fffe1c07510, e=0x7fffe1c06850) at kernel/qapplication.cpp:4462
#26 0x00007fa54bf2fdc3 in QApplication::notify (this=<value optimized out>, receiver=0x7fffe1c07510, e=0x7fffe1c06850) at kernel/qapplication.cpp:4023
#27 0x00007fa54d3556c6 in KApplication::notify (this=0x7fffe1c09110, receiver=0x7fffe1c07510, event=0x7fffe1c06850) at ../../kdeui/kernel/kapplication.cpp:311
#28 0x0000000000404bf6 in _start ()

Reported using DrKonqi
Comment 1 Milian Wolff 2012-02-29 15:43:13 UTC
can you reproduce this? please give us some code snippets that trigger this behavior

btw: kate bug
Comment 2 Dominik Haumann 2012-02-29 16:29:29 UTC
Note: compiled from soruces: so this is basically Kate from KDE 4.8.

A way to reproduce is *very* important.
Comment 3 Tomasz Narloch 2012-02-29 16:34:04 UTC
Created attachment 69187 [details]
New crash information added by DrKonqi

kate (3.6.5) on KDE Platform 4.6.5 (4.6.5) using Qt 4.7.2

- What I was doing when the application crashed:

Open file by fish protocol, collapsed one method of python class and tried to reload file, then crash

-- Backtrace (Reduced):
#11 0x00007fe6e7883bf1 in KateCodeFoldingTree::applyFoldingState (this=0x26efc00) at /home/tomek2/kde/kate/part/syntax/katecodefolding.cpp:1636
#12 0x00007fe6e777ac34 in KateCodeFoldingTree::qt_metacall (this=0x26efc00, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fffc4add7c0) at /home/tomek2/kde/build/part/moc_katecodefolding.cpp:106
[...]
#14 0x00007fe6f52d9277 in KTextEditor::Document::reloaded (this=0x26ef070, _t1=0x26ef070) at /home/tomek2/kde/build/ktexteditor/document.moc:236
#15 0x00007fe6e77fa281 in KateDocument::documentReload (this=0x26ef070) at /home/tomek2/kde/kate/part/document/katedocument.cpp:3972
#16 0x00007fe6e7893f61 in KateView::reloadFile (this=0x298a780) at /home/tomek2/kde/kate/part/view/kateview.cpp:1087
Comment 4 Tomasz Narloch 2012-02-29 16:35:47 UTC
Created attachment 69188 [details]
./run.sh valgrind --track-origins=yes --num-callers=25 kate 2>~/katelogs3.txt
Comment 5 Tomasz Narloch 2012-02-29 16:40:46 UTC
Created attachment 69189 [details]
File that I open by fish protocol and genarate a problem on reload

When I copy this file to my disk then the problem not exists.
When I use this file by fish protocol, then after click on reload => CRASH.
Comment 6 Dominik Haumann 2012-02-29 21:00:58 UTC
This is because the file loading is asynchronous:
For a certain amount of time, the document is empty. At this time, the folding tree tries to apply the saved folding state. And this hits the Q_ASSERT.

Somehow, the delay needs to be taken into account.
Comment 7 Dominik Haumann 2012-03-20 19:42:21 UTC
Git commit daf0b4b637d9a7ecf83b3c143d90b11fef53c46f by Dominik Haumann.
Committed on 20/03/2012 at 20:40.
Pushed by dhaumann into branch 'master'.

do not crash if restoring the folding state is impossible
FIXED-IN: 4.8.2

M  +6    -4    part/syntax/katecodefolding.cpp

http://commits.kde.org/kate/daf0b4b637d9a7ecf83b3c143d90b11fef53c46f
Comment 8 Dominik Haumann 2012-03-20 19:44:05 UTC
The solution is not to simply not restore the folding state, if there is a delay due to remove file loading.

This also fixes the following problem:
1. fold nodes
2. close kate
3. delete some lines of the file
4. open kate again

in 4. Kate always crashes, as it tries to restore the folds, but this is not possible, as the file changed...