Bug 121280 - quanta asserts and crash during php editing
Summary: quanta asserts and crash during php editing
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
: 122959 122979 123488 124162 124860 125038 130378 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-03 11:58 UTC by Pascal Cavy
Modified: 2007-05-12 11:51 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
file causing problem (54.73 KB, application/x-httpd-php)
2006-02-03 14:50 UTC, Pascal Cavy
Details
simpler test file (3.57 KB, text/plain)
2006-02-08 18:19 UTC, p92
Details
crash due to a memory corrution ? (4.82 KB, text/plain)
2006-02-08 18:46 UTC, p92
Details
after some editing, quanta asserts (2.86 KB, text/plain)
2006-02-08 19:11 UTC, p92
Details
assert with full debug trace (2.72 KB, text/plain)
2006-02-09 13:21 UTC, Pascal Cavy
Details
Quanta 3.5.5 gdb output from crash (1.50 KB, text/plain)
2006-11-18 20:12 UTC, Tyler
Details
Quantas stack trace after crashing while selecting lines of comments. (2.17 KB, text/plain)
2007-05-12 09:14 UTC, Sam Arthur Allen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Cavy 2006-02-03 11:58:28 UTC
Version:           3.5.1 (using KDE 3.5.1, Kubuntu Package 4:3.5.1-0ubuntu0breezy1 )
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-10-686

Since I move to kde 3.5.1 quanta ASSERTS and crashes while I edit some of my php files. This PREVENTED me from using quanta right now :( until 
I found that the crash only occurs when I configure quanta editor with a finite undo count.

- try setting undo count from 'unlimited' to '2'
- then open a large php file
a- just add blank lines
b- then undo 
- play with a b until the ASSERT comes (quite immediately)

Console trace :

$ quanta --sync
ASSERT: "tag" in /root/kde351/kdewebdev/kdewebdev-3.5.1/./quanta/parsers/node.cpp (55)
KCrash: Application 'quanta' crashing...


Crash debug:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1240676672 (LWP 10013)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0x080f5532 in QValueList<KMdiChildView*>::detachInternal ()
#7  0x080f5583 in QValueList<KMdiChildView*>::detachInternal ()
#8  0x08166f95 in SAGroupParser::staticMetaObject ()
#9  0x08169280 in SAGroupParser::staticMetaObject ()
#10 0x081692d9 in SAGroupParser::staticMetaObject ()
#11 0x082e924d in htmlDocumentProperties::staticMetaObject ()
#12 0x081670f5 in SAGroupParser::staticMetaObject ()
#13 0x0817b25a in SAGroupParser::staticMetaObject ()
#14 0x080a0f7d in ?? ()
#15 0x0853b338 in ?? ()
#16 0x08c91d20 in ?? ()
#17 0xbfc9deb0 in ?? ()
#18 0x00000032 in ?? ()
#19 0xb623d2ca in free () from /lib/tls/i686/cmov/libc.so.6
#20 0x080e8060 in ?? ()
#21 0x08c91d20 in ?? ()
#22 0x00000000 in ?? ()
#23 0xbfc9df38 in ?? ()
#24 0x080e7e61 in ?? ()
#25 0x084e0db0 in ?? ()
#26 0xb73d1460 in ?? () from /usr/lib/libqt-mt.so.3
#27 0xbfc9df28 in ?? ()
#28 0xb6f5ca14 in QPtrVector<QConnectionList>::at ()
   from /usr/lib/libqt-mt.so.3
#29 0xb6f5b929 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#30 0xb72bae92 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#31 0xb6f79344 in QSignal::activate () from /usr/lib/libqt-mt.so.3
#32 0xb6f80e88 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3
#33 0xb6ef2f80 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#34 0xb6ef3172 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#35 0xb763d0cc in KApplication::notify () from /usr/lib/libkdecore.so.4
#36 0xb6e83db7 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#37 0xb6ee499b in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#38 0xb6e97a84 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#39 0xb6f0acfb in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#40 0xb6f0ac1e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#41 0xb6ef1c13 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#42 0x080f1b35 in ?? ()
#43 0x083a9420 in ?? ()
#44 0xb756a138 in KApplication::disableAutoDcopRegistration ()
   from /usr/lib/libkdecore.so.4
#45 0xb61eeea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#46 0x0808b951 in ?? ()
Comment 1 Pascal Cavy 2006-02-03 12:17:43 UTC
correction:  the assert/crash happens also with  unlimited undo count but is simply longer to trigger.

Comment 2 Pascal Cavy 2006-02-03 14:50:30 UTC
Created attachment 14527 [details]
file causing problem

try to correct line 510 joining 511 so that 509 looks like :

$iswritableef ? sprintf("<div align='center'><input type='submit' name='%s'
value='%s'></div>", $name, $label) : ''

==> ASSERT and crash
Comment 3 Pascal Cavy 2006-02-03 14:52:09 UTC
this file is part of a project (in a local directory) and is opened through the project file lister (second icon on the left bar)
Comment 4 András Manţia 2006-02-08 16:05:12 UTC
I tried to reproduce the bug, but I couldn't, even with your test file. 
Actually it was not clear what I have to do with the file, but I tried 
to join the lines 509-510 and undo the joining. I also added new lines 
in the beginning of the files and undo them: no crash. 
Any hint how may I reproduce?
Comment 5 p92 2006-02-08 18:17:25 UTC
ok I did some more experiment to simplifiy the problem.
- it crashes with a fresh kde user environnement
- no need for a project, a single file is needed

can you remove 'if a limited undo count is configured' from the subject of this bug report please.

Following is a simpler file that crashed quanta 4 times while editing it. Quanta was stable for me in kde 3.5.0, it is now very unstable in 3.5.1 like it was on 3.4.1. I really hope you can reproduce this bug because it renders quanta absolutely unusable now.

The crash seems random or time dependent, the only way to trigger it, is to play with the file as if you would like to develop php code. Try typing some php variable assignments inside the existing php code 'if' structures such as :

 $a=1;
 $b=1;
 $c=A<backspace>"toto";
 $d="titititi";

do some selection + ctrl C + ctrl V somewhere else
then redo some php typing elsewhere as above

etc.. until quanta crashes. It can be seconds or minutes.
Comment 6 p92 2006-02-08 18:19:06 UTC
Created attachment 14609 [details]
simpler test file

open directly with file open  and try suggested action in previous comment
Comment 7 p92 2006-02-08 18:37:59 UTC
my crashes seem similar to #120983
Comment 8 p92 2006-02-08 18:46:56 UTC
Created attachment 14610 [details]
crash due to a memory corrution ?

in one of my experiments I noticed this message in .xsession-errors just before
the crash :
*** glibc detected *** malloc(): memory corruption (fast): 0x092535ff ***
KCrash: Application 'quanta' crashing...

this is the related crash debug file. (might be another problem anyway)
Comment 9 András Manţia 2006-02-08 18:53:27 UTC
No luck, it doesn't crash with a new user and your test files. This is 
SuSE 10.0 with both the stock 3.5.1 RPM and a self compile KDE/Quanta. 
I'm going to try now on Kubuntu as luckily I have it installed on a 
machine.
Comment 10 p92 2006-02-08 19:11:57 UTC
Created attachment 14612 [details]
after some editing, quanta asserts

I tried to reproduce it now and it took me more than 10 minutes of editing to
have it, so be patient. 

herein the konsole messages, .xinit-errors messages and debug trace
Comment 11 András Manţia 2006-02-08 19:13:15 UTC
Ok, I was able to reproduce with Kubuntu. The backtace is what you 
pasted in, but unfortunately it is useless. While I will try to 
reproduce on my main developing machine, please download the source 
tarball for kdewebdev and compile it (pass --enable-debug=full 
for ./configure),  install it and try to reproduce with that one. If it 
will crash as well, we will get a better backtrace. If it doesn't 
crash, the problem is in the binary package.
Comment 12 András Manţia 2006-02-08 23:24:48 UTC
Even better, please try the following:
- compile from source with --enable-debug=full (apt-src install 
kdewebdev should get everything you need if you have the deb-src line 
in sources.list)
- install valgrind (apt-get install valgrind)
- enable the debug output for Quanta (kdebugdialog, unselect everything 
aside of the Quanta areas)
- run the just compiled quanta inside valgrind: 
"valgrind --tool=memcheck quanta" 
or if you are in kdewebdev/quanta/src use 
"valgrind --tool=memcheck ./quanta" 
- try to reproduce the crash and when it crashes, send me the whole 
valgrind log (in a compressed form)

Why I cannot do it? Well:
- on the laptop with Kubuntu, valgrind is very slow as the machine is 
slow with small RAM (550Mhz/192MB)
- the desktop machin has SuSE and does not show the problem
Comment 13 Pascal Cavy 2006-02-09 13:21:41 UTC
Created attachment 14617 [details]
assert with full debug trace

First thanks for the debugging explanations (that kind of doc could be in the
kde dev wiki).

After long long minutes I managed to make quanta asserts again.
Strangely, I have the feeling that quanta is hugely more performant (responds
very quickly) since I recompile it.

I have to try with valgrind again, because it is so slow that I cannot make it
crash.
Comment 14 Tuomas 2006-02-10 11:53:46 UTC
For me exactly the same crash occurs, but occasionally. I just write code and suddenly quanta crashes and it reports in konsole:
ASSERT: "tag" in /home/sid-user/kdewebdev/kdewebdev-3.5.1/./quanta/parsers/node.cpp (55)

This happened with both quanta 3.5.0 and 3.5.1 on Debian (kernel 2.6.14). I use at home Fedora Core 4 and quanta seems to work there just fine, so this bug has something to do with the distribution...

Comment 15 András Manţia 2006-02-10 12:00:20 UTC
The crash itself might be distribution specific as it is a Q_ASSERT 
line. Q_ASSERT does not crash on a normal Qt build, but you can build 
Qt in a way that those are translated to "assert" and it will crash.
It might worth a try to comment out the line 55 of node.cpp in 
quanta/parsers and see if it will crash in other way or not. It 
shouldn't crash, but of course this will be more of hiding the problem 
than finding the real solution. Still might be a saver for many, so if 
you have a chance, please try it.
Comment 16 András Manţia 2006-02-10 12:01:25 UTC
On Thursday 09 February 2006 14:21, Pascal Cavy wrote:
> assert with full debug trace

This backtrace is much more useful. As I suspected the crash is caused 
by the undo/redo code which was not written by me (and the original 
developer exited the project). Still, I will try to find a solution.
Comment 17 Austin 2006-02-13 19:25:44 UTC
Thanks András - We really do appreciate your efforts.  
Comment 18 Daniel Duris 2006-02-17 14:43:21 UTC
another crash:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1240896736 (LWP 3710)]
[KCrash handler]
#5  0x0818e45e in QMapPrivate<QString, bool>::clear ()
#6  0x080ba830 in QMemArray<char>::detach ()
#7  0x080af3aa in QMemArray<char>::detach ()
#8  0x080c0847 in QMemArray<char>::detach ()
#9  0xb68ae166 in QObject::activate_signal ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#10 0xb5c56942 in KateDocument::charactersInteractivelyInserted ()
   from /opt/kde/lib/kde3/libkatepart.so
#11 0xb5c67882 in KateDocument::typeChars ()
   from /opt/kde/lib/kde3/libkatepart.so
#12 0xb5cd50be in KateViewInternal::keyPressEvent ()
   from /opt/kde/lib/kde3/libkatepart.so
#13 0xb5cd4610 in KateViewInternal::eventFilter ()
   from /opt/kde/lib/kde3/libkatepart.so
#14 0xb68abb1e in QObject::activate_filters ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#15 0xb68aba4c in QObject::event () from /usr/lib/qt/lib/libqt-mt.so.3
#16 0xb68e456f in QWidget::event () from /usr/lib/qt/lib/libqt-mt.so.3
#17 0xb685195f in QApplication::internalNotify ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#18 0xb6851454 in QApplication::notify () from /usr/lib/qt/lib/libqt-mt.so.3
#19 0xb6e985c5 in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#20 0xb67e9300 in QETWidget::translateKeyEvent ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#21 0xb67e4fe2 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#22 0xb67fbe54 in QEventLoop::processEvents ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#23 0xb6863d18 in QEventLoop::enterLoop () from /usr/lib/qt/lib/libqt-mt.so.3
#24 0xb6863bc8 in QEventLoop::exec () from /usr/lib/qt/lib/libqt-mt.so.3
#25 0xb6851bb1 in QApplication::exec () from /usr/lib/qt/lib/libqt-mt.so.3
#26 0x080a95ff in QPtrList<char>::deleteItem ()
#27 0xb60fffcb in __libc_start_main () from /lib/tls/libc.so.6
#28 0x0808f951 in ?? ()
Comment 19 S. Burmeister 2006-02-19 13:53:28 UTC
I use SuSE 10 and the latest 3.5.1 packages and got a crash. I had a PHP-file, pasted some HTML into it and wanted to exlude it with ?><?.

after I typed ?> in front of the pasted text, quanta crashed:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 1105204768 (LWP 13138)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0x080fb606 in QValueList<KMdiChildView*>::detachInternal ()
#7  0x080fb66f in QValueList<KMdiChildView*>::detachInternal ()
#8  0x08176963 in SAGroupParser::staticMetaObject ()
#9  0x08178bde in SAGroupParser::staticMetaObject ()
#10 0x08178c2f in SAGroupParser::staticMetaObject ()
#11 0x08178c2f in SAGroupParser::staticMetaObject ()
#12 0x08178c12 in SAGroupParser::staticMetaObject ()
#13 0x08178c2f in SAGroupParser::staticMetaObject ()
#14 0x08178c2f in SAGroupParser::staticMetaObject ()
#15 0x08178c2f in SAGroupParser::staticMetaObject ()
#16 0x08178c2f in SAGroupParser::staticMetaObject ()
#17 0x08178c2f in SAGroupParser::staticMetaObject ()
#18 0x08178c2f in SAGroupParser::staticMetaObject ()
#19 0x08178c2f in SAGroupParser::staticMetaObject ()
#20 0x08178c2f in SAGroupParser::staticMetaObject ()
#21 0x08178c2f in SAGroupParser::staticMetaObject ()
#22 0x08178c2f in SAGroupParser::staticMetaObject ()
#23 0x08178c2f in SAGroupParser::staticMetaObject ()
#24 0x08178c2f in SAGroupParser::staticMetaObject ()
#25 0x08178c2f in SAGroupParser::staticMetaObject ()
#26 0x08178c2f in SAGroupParser::staticMetaObject ()
#27 0x08178c2f in SAGroupParser::staticMetaObject ()
#28 0x08178c2f in SAGroupParser::staticMetaObject ()
#29 0x08178c2f in SAGroupParser::staticMetaObject ()
#30 0x08178c2f in SAGroupParser::staticMetaObject ()
#31 0x08178c2f in SAGroupParser::staticMetaObject ()
#32 0x08178c2f in SAGroupParser::staticMetaObject ()
#33 0x08178c2f in SAGroupParser::staticMetaObject ()
#34 0x08178c2f in SAGroupParser::staticMetaObject ()
#35 0x08178c2f in SAGroupParser::staticMetaObject ()
#36 0x08178c2f in SAGroupParser::staticMetaObject ()
#37 0x08178c2f in SAGroupParser::staticMetaObject ()
#38 0x08178c12 in SAGroupParser::staticMetaObject ()
#39 0x08178c2f in SAGroupParser::staticMetaObject ()
#40 0x08178c2f in SAGroupParser::staticMetaObject ()
#41 0x08178c2f in SAGroupParser::staticMetaObject ()
#42 0x08178c2f in SAGroupParser::staticMetaObject ()
#43 0x08178c2f in SAGroupParser::staticMetaObject ()
#44 0x08178c2f in SAGroupParser::staticMetaObject ()
#45 0x08178c2f in SAGroupParser::staticMetaObject ()
#46 0x08178c2f in SAGroupParser::staticMetaObject ()
#47 0x08178c2f in SAGroupParser::staticMetaObject ()
#48 0x08178c2f in SAGroupParser::staticMetaObject ()
#49 0x08178c2f in SAGroupParser::staticMetaObject ()
#50 0x08178c2f in SAGroupParser::staticMetaObject ()
#51 0x08178c2f in SAGroupParser::staticMetaObject ()
#52 0x08178c2f in SAGroupParser::staticMetaObject ()
#53 0x08178c2f in SAGroupParser::staticMetaObject ()
#54 0x08319739 in htmlDocumentProperties::staticMetaObject ()
#55 0x08176a86 in SAGroupParser::staticMetaObject ()
#56 0x0818b43a in SAGroupParser::staticMetaObject ()
#57 0x080a2cdf in ?? ()
#58 0x084f1da8 in ?? ()
#59 0x0906f728 in ?? ()
#60 0x00000000 in ?? ()
#61 0x00000000 in ?? ()
#62 0x00000000 in ?? ()
#63 0x419938a0 in mp_ () from /lib/tls/libc.so.6
#64 0x0000000c in ?? ()
#65 0x419876e8 in __libc_ptyname1 () from /lib/tls/libc.so.6
#66 0x00000000 in ?? ()
#67 0x00000000 in ?? ()
#68 0x095cfd68 in ?? ()
#69 0xbfd53d58 in ?? ()
#70 0x418db1f4 in free () from /lib/tls/libc.so.6
#71 0x080ed83c in ?? ()
#72 0x0906f728 in ?? ()
#73 0x00000000 in ?? ()
#74 0xbfd53e58 in ?? ()
#75 0x4122cb5d in QObject::connect () from /usr/lib/qt3/lib/libqt-mt.so.3
#76 0x41229a49 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#77 0x4156b5d2 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
#78 0x4124666b in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
#79 0x4124dfc3 in QSingleShotTimer::event ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#80 0x411c9d41 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#81 0x411ca6b9 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#82 0x40ea260e in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#83 0x411beab8 in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#84 0x41177f4f in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#85 0x411e0c53 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#86 0x411e0b36 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#87 0x411c968f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#88 0x080f7a70 in ?? ()
#89 0x083dc290 in ?? ()
#90 0x00000000 in ?? ()
#91 0x00000000 in ?? ()
#92 0x00000000 in ?? ()
#93 0x00000000 in ?? ()
#94 0x00000001 in ?? ()
#95 0x083791d0 in typeinfo name for QMemArray<char> ()
#96 0x0837615c in typeinfo name for QMemArray<char> ()
#97 0x08370306 in vtable for QGList ()
#98 0x0836fbb9 in vtable for QGList ()
#99 0x419938d8 in main_arena () from /lib/tls/libc.so.6
#100 0x419938d8 in main_arena () from /lib/tls/libc.so.6
#101 0x00000002 in ?? ()
#102 0x00000020 in ?? ()
#103 0x00000011 in ?? ()
#104 0x419938a8 in main_arena () from /lib/tls/libc.so.6
#105 0xbfd55128 in ?? ()
#106 0x00000008 in ?? ()
#107 0x0836e878 in vtable for QGList ()
#108 0xbfd543c8 in ?? ()
#109 0x418dcea6 in malloc () from /lib/tls/libc.so.6
#110 0x4188bea0 in __libc_start_main () from /lib/tls/libc.so.6
#111 0x0808b6c1 in ?? ()
Comment 20 S. Burmeister 2006-02-19 14:03:07 UTC
I just got this while holding down DEL, so I do not think that there an easy way to reproduce this, as it seems to happen randomly. It happened already in 3.5.0, but not that often.
Comment 21 mario 2006-02-19 15:44:27 UTC
*** This bug has been confirmed by popular vote. ***
Comment 22 András Manţia 2006-02-19 18:37:46 UTC
SVN commit 511378 by amantia:

At least don't crash. I have no idea why it happens (it is undo/redo code), the code will be removed in KDE4 and the bug is very hard to reproduce on my working machine (but I can see it on another one). So until I find time to debug it deeply, at list try to avoid the crash. Hopefully it will not cause more trouble in other places.

CCBUG: 121280

 M  +1 -1      node.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/parsers/node.cpp #511377:511378
@@ -52,7 +52,7 @@
   //If it has crashed here, the Node doesn't exist anymore.
   // If it has crashed the next line, it is a GroupElements bug.
   //FIXME: Andras: or it is a VPL undo/redo bug...
-  Q_ASSERT(tag);
+/*  Q_ASSERT(tag); */ //disable as on some distros it causes a real assert=crash
   if (tag)
     tag->setCleanStrBuilt(false);
 
Comment 23 Tuomas 2006-02-20 09:22:03 UTC
Hi!

On my previous bug report I mentioned that Quanta crashes on Debian but not on Fedora Core 4. Yesterday I noticed that this was wrong, Quanta 3.5.1 crashes also on Fedora. I don't know if 3.5.0 was more stable than 3.5.1 or was this just because I use Quanta much less at home than I use it at work. But at least this bug is not limited to just few distributions.

At the moment the maximum uptime for Quanta is less than 1 hour so at the moment the newest version of Quanta is totally unusable for me :(
Comment 24 András Manţia 2006-02-20 09:28:11 UTC
There was no change related to this bug between 3.5.0 and 3.5.1 that I'm 
aware of. If you have a chance, please try to compile the current 3.5 
branch from SVN and see if it crashes or does something wrong or not.
Instructions about how to do it can be found on
http://quanta.kdewebdev.org/faq.php (How can I get the SVN version? 
question).
Comment 25 András Manţia 2006-02-28 22:38:17 UTC
SVN commit 514630 by amantia:

This should finnally fix a grave crash bug in Quanta, which appeared due to a node tree corruption.The patch does other things as well:
- stop background detailed parsing if the text was changed (this caused the corruption)
- parse only once after the user stopped typing, for real. The intention was there since several versions but DID NOT work! Now this should really make typing faster.

I will mark all related bugs as fixed. Reporters, in case you still see the crash or slow typing with Quanta 3.5.2 (or a recent  - after this commit - snapshot/svn version), reopen the report or open a new one.

BUG: 121280, 122475, 122252, 120983

 M  +1 -1      parsers/node.cpp  
 M  +23 -7     parsers/parser.cpp  
 M  +1 -1      parsers/parsercommon.cpp  
 M  +2 -0      parsers/saparser.cpp  
 M  +9 -4      src/document.cpp  
 M  +1 -0      src/document.h  


--- branches/KDE/3.5/kdewebdev/quanta/parsers/node.cpp #514629:514630
@@ -52,7 +52,7 @@
   //If it has crashed here, the Node doesn't exist anymore.
   // If it has crashed the next line, it is a GroupElements bug.
   //FIXME: Andras: or it is a VPL undo/redo bug...
-/*  Q_ASSERT(tag); */ //disable as on some distros it causes a real assert=crash
+  Q_ASSERT(tag);  //disable as on some distros it causes a real assert=crash
   if (tag)
     tag->setCleanStrBuilt(false);
 
--- branches/KDE/3.5/kdewebdev/quanta/parsers/parser.cpp #514629:514630
@@ -43,8 +43,11 @@
 #include "quantacommon.h"
 #include "document.h"
 #include "qextfileinfo.h"
+
+
 #include "kafkacommon.h"
 #include "undoredo.h"
+
 #include "dtds.h"
 #include "structtreetag.h"
 
@@ -515,10 +518,12 @@
  // clearGroups();
   if (baseNode)
   {
-    delete baseNode;
-    baseNode = 0L;
-    m_node = 0L;
+     //kdDebug(24000) << "baseNode before delete = " << baseNode << endl;
+     //ParserCommon::coutTree(m_node, 2);
+     delete baseNode;
+     baseNode = 0L;
   }
+  m_node = 0L;
 
   Node *lastNode;
   write = w;
@@ -657,6 +662,7 @@
 }
 void Parser::logReparse(NodeModifsSet *modifs, Document *w)
 {
+
   NodeModif *modif;
   if (baseNode)
   {
@@ -796,6 +802,7 @@
   Node *node = firstNode;
   bool closesPrevious = false;
   NodeModif *modif;
+
   //delete all the nodes between the firstNode and lastNode
   while (node && node != lastNode )
   {
@@ -829,8 +836,11 @@
     node->parent = 0L;
     node->next = 0L;
     node->prev = 0L;
+    
+    //delete node;
     node->detachNode();
     modif->setNode(node);
+
     node = 0L;
     i = 0;
     j = 0;
@@ -936,9 +946,11 @@
 
       }
     }
+
     modif->setChildrenMovedUp(i);
     modif->setNeighboursMovedDown(j);
     modifs->addNodeModif(modif);
+
     node = nextNode;
 
  //   kdDebug(24000)<< "Node removed!" << endl;
@@ -961,7 +973,6 @@
  NodeModifsSet *modifs = new NodeModifsSet();
  NodeModif *modif;
 
-
 // kdDebug(24000)<< "Node *Parser::rebuild()" << endl;
  modifs->setIsModifiedAfter(w->isModified());
 
@@ -989,9 +1000,10 @@
         (area.eLine < area.bLine || (area.eLine == area.bLine && area.eCol <= area.bCol)) //something strange has happened, like moving text with D&D inside the editor
       )
    {
-     logReparse(modifs, w);
-     m_saParser->setParsingEnabled(saParserEnabled);
-     return parse(w);
+      logReparse(modifs, w);
+       m_saParser->setParsingEnabled(saParserEnabled);
+       Node *n = parse(w, true);
+       return n;
    }
 
    kdDebug(24000) << QString("Invalid area: %1,%2,%3,%4").arg(area.bLine).arg(area.bCol).arg(area.eLine).arg(area.eCol) << "\n";
@@ -1071,6 +1083,7 @@
         modif = new NodeModif();
         modif->setType(NodeModif::NodeRemoved);
         modif->setLocation(kafkaCommon::getLocation(lastNode));
+
         if(lastInserted->prev)
           lastInserted->prev->next = 0L;
         if(lastInserted->parent && lastInserted->parent->child == lastInserted)
@@ -1079,6 +1092,8 @@
         lastInserted->next = 0L;
         lastInserted->parent = 0L;
         lastInserted->child = 0L;
+//        delete lastInserted;
+
         lastInserted->detachNode();
         modif->setNode(lastInserted);
         modifs->addNodeModif(modif);
@@ -1185,6 +1200,7 @@
 /*   kdDebug(24000)<< "END"<< endl;
    ParserCommon::coutTree(baseNode,  2);
    kdDebug(24000)<< "************* End User Modification *****************" << endl;*/
+
    w->docUndoRedo->addNewModifsSet(modifs, undoRedo::SourceModif);
  }
   kdDebug(24000) << "Rebuild: " << t.elapsed() << " ms \n";
--- branches/KDE/3.5/kdewebdev/quanta/parsers/parsercommon.cpp #514629:514630
@@ -220,7 +220,7 @@
             else
                     output+= node->tag->tagStr().replace('\n'," ");
             kdDebug(24000) << output <<" (" << node->tag->type << ") at pos " <<
-                    bLine << ":" << bCol << " - " << eLine << ":" << eCol << " This: "<< node << " Parent: " << node->parent << " Prev: " << node->prev << " Next: " << node->next << " Child: " << node->child << endl;
+                    bLine << ":" << bCol << " - " << eLine << ":" << eCol << " This: "<< node << " Parent: " << node->parent << " Prev: " << node->prev << " Next: " << node->next << " Child: " << node->child << " Tag:" << node->tag << endl;
  /*           for(j = 0; j < node->tag->attrCount(); j++)
             {
                     kdDebug(24000)<< " attr" << j << " " <<
--- branches/KDE/3.5/kdewebdev/quanta/parsers/saparser.cpp #514629:514630
@@ -734,6 +734,7 @@
         Node *n = m_lastParsedNode;
         if (m_useNext)
         {
+//           kdDebug(24000) << "m_lastParsedNode: " << m_lastParsedNode << endl;
           n->next = s_next;
           if (s_next)
             s_next->prev = n;
@@ -827,6 +828,7 @@
   {
       if (m_useNext && s_currentNode)
       {
+//           kdDebug(24000) << "s_currentNode: " << s_currentNode << endl;
         Node *n = s_currentNode;
         n->next = s_next;
         if (s_next)
--- branches/KDE/3.5/kdewebdev/quanta/src/document.cpp #514629:514630
@@ -194,6 +194,7 @@
   dtdName = Project::ref()->defaultDTD();
   reparseEnabled = true;
   repaintEnabled = true;
+  delayedTextChangedEnabled = true;
   docUndoRedo = new undoRedo(this);
 
   //each document remember wheter it has a entry in quantarc
@@ -2264,11 +2265,13 @@
 void Document::slotTextChanged()
 {
   changed = true;
-  if (reparseEnabled)
+  parser->setSAParserEnabled(false); //disable special area parsing if the text was changed.
+  if (reparseEnabled && delayedTextChangedEnabled)
   {
     kdDebug(24000) << "Delayed text changed called." << endl;
     //delay the handling, otherwise we may get wrong values for (line,column)
     QTimer::singleShot(0, this, SLOT(slotDelayedTextChanged()));
+    delayedTextChangedEnabled = false;  
   }
 }
 
@@ -2276,13 +2279,14 @@
 {
    if (!forced && typingInProgress)
    {
-    // kdDebug(24000) << "Reparsing delayed!" << endl;
+     kdDebug(24000) << "Reparsing delayed!" << endl;
      parser->setParsingNeeded(true);
      QTimer::singleShot(1000, this, SLOT(slotDelayedTextChanged()));
      reparseEnabled = false;
+     delayedTextChangedEnabled = false;	
      return;
    }
-
+	
     uint line, column;
     QString oldNodeName = "";
     Node *node;
@@ -2311,7 +2315,7 @@
         }
       }
     }
-
+    parser->setSAParserEnabled(true); //enable special area parsing, it was disabled in slotTextChanged()
     baseNode = parser->rebuild(this);
     if (qConfig.updateClosingTags && currentNode)
     {
@@ -2408,6 +2412,7 @@
       StructTreeView::ref()->slotReparse(this, baseNode , qConfig.expandLevel);
     }
     reparseEnabled = true;
+   delayedTextChangedEnabled = true;	
 }
 
 /** Returns list of values for attribute */
--- branches/KDE/3.5/kdewebdev/quanta/src/document.h #514629:514630
@@ -310,6 +310,7 @@
   bool hintRequested;
   bool reparseEnabled;
   bool repaintEnabled;
+  bool delayedTextChangedEnabled;
   /** True if the document is dirty (has been modified outside). */
   bool m_dirty;
   QString m_md5sum;
Comment 26 Tuomas 2006-03-02 12:59:38 UTC
Hi!

I have been using the fresh new svn version of quanta quite many hours already and everything seems to work just fine right now!

Thanks András & others!
Comment 27 András Manţia 2006-03-02 18:03:07 UTC
*** Bug 122979 has been marked as a duplicate of this bug. ***
Comment 28 András Manţia 2006-03-03 21:27:32 UTC
*** Bug 122959 has been marked as a duplicate of this bug. ***
Comment 29 András Manţia 2006-03-12 15:35:39 UTC
*** Bug 123488 has been marked as a duplicate of this bug. ***
Comment 30 András Manţia 2006-03-24 09:44:53 UTC
*** Bug 124162 has been marked as a duplicate of this bug. ***
Comment 31 András Manţia 2006-04-04 16:31:14 UTC
*** Bug 124860 has been marked as a duplicate of this bug. ***
Comment 32 András Manţia 2006-04-06 13:53:16 UTC
*** Bug 125038 has been marked as a duplicate of this bug. ***
Comment 33 Petter 2006-04-18 14:48:37 UTC
I'm still having this crash-problem when breaking out of php, and use plain html-code with inline-php commands.

Using Archlinux, extra/kdewebdev 3.5.2-1
Comment 34 Richard Fujimoto 2006-06-24 03:40:27 UTC
Crash has come back in quanta 3.5.3 kubuntu.
Comment 35 Richard Fujimoto 2006-10-05 08:49:53 UTC
Still present in Quanta 3.5.4 Kubuntu
Comment 36 Tyler 2006-11-18 20:12:49 UTC
Created attachment 18606 [details]
Quanta 3.5.5 gdb output from crash

Problem still exists in 3.5.5 Gentoo.

Debug output attached.

It happens for me when I have a project open, open a file, copy something,
paste, open, paste, open paste..etc
On one of the opens, it will crash.  I never know which one.  Sometimes 2,
sometimes 5.  Either way, it WILL crash no-matter what.
Comment 37 Bram Schoenmakers 2007-03-03 19:20:53 UTC
*** Bug 130378 has been marked as a duplicate of this bug. ***
Comment 38 Sam Arthur Allen 2007-05-12 09:14:58 UTC
Created attachment 20547 [details]
Quantas stack trace after crashing while selecting lines of comments.

Open a PHP file, select a few lines of comments (// Lines that start like this)
and let the crash begin.
Comment 39 Sam Arthur Allen 2007-05-12 11:01:57 UTC
Same crash happened. Again.

I simply copied a line comment (that is, a // line) by hitting home twice to get to the start of the line, and down-shift to select the line...

and...

Hello KDE Crash handler!
Comment 40 András Manţia 2007-05-12 11:51:40 UTC
Please post also the PHP file for which it happened.