Version: unknown (using KDE 3.5.1, Gentoo) Compiler: gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8) OS: Linux (i686) release 2.6.15-suspend2-r6-justbudget hit ctrl-d instead of ctrl-s, quanta crashed Using host libthread_db library "/lib/libthread_db.so.1". `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 8862)] [KCrash handler] #6 0x0817c337 in AreaStruct (this=0xbf972fc0, area=@0x1c) at tag.h:59 #7 0x0817c17a in Tag::area (this=0x0) at tag.h:113 #8 0x0817a92b in SAParser::slotParseNodeInDetail (this=0x8580238) at saparser.cpp:896 #9 0x0817b019 in SAParser::qt_invoke (this=0x8580238, _id=4, _o=0xbf9730d0) at saparser.moc:115 #10 0xb64a46ac in QObject::activate_signal (this=0x85a76b0, clist=0x851d1a0, o=0xbf9730d0) at qobject.cpp:2355 #11 0xb64a4504 in QObject::activate_signal (this=0x85a76b0, signal=2) at qobject.cpp:2324 #12 0xb6889c64 in QTimer::timeout (this=0x85a76b0) at moc_qtimer.cpp:82 #13 0xb64d009e in QTimer::event (this=0x85a76b0, e=0xbf9733f0) at qtimer.cpp:219 #14 0xb6434235 in QApplication::internalNotify (this=0x83a3f18, receiver=0x85a76b0, e=0xbf9733f0) at qapplication.cpp:2635 #15 0xb6433478 in QApplication::notify (this=0x83a3f18, receiver=0x85a76b0, e=0xbf9733f0) at qapplication.cpp:2358 #16 0xb6c7ccff in KApplication::notify (this=0x83a3f18, receiver=0x85a76b0, event=0xbf9733f0) at kapplication.cpp:550 #17 0xb7e755e9 in QApplication::sendEvent (receiver=0x1c, event=0xbf972fc0) at qapplication.h:491 #18 0xb641f75f in QEventLoop::activateTimers (this=0x84795e0) at qeventloop_unix.cpp:556 #19 0xb63cfd5d in QEventLoop::processEvents (this=0x84795e0, flags=4) at qeventloop_x11.cpp:389 #20 0xb644b7d9 in QEventLoop::enterLoop (this=0x84795e0) at qeventloop.cpp:198 #21 0xb644b6f2 in QEventLoop::exec (this=0x84795e0) at qeventloop.cpp:145 #22 0xb64343d7 in QApplication::exec (this=0x83a3f18) at qapplication.cpp:2758 #23 0x080b3a59 in main (argc=1, argv=0xbf9737e4) at main.cpp:212
this happen very often (10 times / day) Using host libthread_db library "/lib/libthread_db.so.1". `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 10203)] [KCrash handler] #6 0x0817c337 in AreaStruct (this=0xbfada6d0, area=@0x1c) at tag.h:59 #7 0x0817c17a in Tag::area (this=0x0) at tag.h:113 #8 0x0817a92b in SAParser::slotParseNodeInDetail (this=0x84d8ee0) at saparser.cpp:896 #9 0x0817b019 in SAParser::qt_invoke (this=0x84d8ee0, _id=4, _o=0xbfada7e0) at saparser.moc:115 #10 0xb650b6ac in QObject::activate_signal (this=0x84cddf8, clist=0x858d280, o=0xbfada7e0) at qobject.cpp:2355 #11 0xb650b504 in QObject::activate_signal (this=0x84cddf8, signal=2) at qobject.cpp:2324 #12 0xb68f0c64 in QTimer::timeout (this=0x84cddf8) at moc_qtimer.cpp:82 #13 0xb653709e in QTimer::event (this=0x84cddf8, e=0xbfadab00) at qtimer.cpp:219 #14 0xb649b235 in QApplication::internalNotify (this=0x83a3f18, receiver=0x84cddf8, e=0xbfadab00) at qapplication.cpp:2635 #15 0xb649a478 in QApplication::notify (this=0x83a3f18, receiver=0x84cddf8, e=0xbfadab00) at qapplication.cpp:2358 #16 0xb6ce3cff in KApplication::notify (this=0x83a3f18, receiver=0x84cddf8, event=0xbfadab00) at kapplication.cpp:550 #17 0xb7edc5e9 in QApplication::sendEvent (receiver=0x1c, event=0xbfada6d0) at qapplication.h:491 #18 0xb648675f in QEventLoop::activateTimers (this=0x8479618) at qeventloop_unix.cpp:556 #19 0xb6436d5d in QEventLoop::processEvents (this=0x8479618, flags=4) at qeventloop_x11.cpp:389 #20 0xb64b27d9 in QEventLoop::enterLoop (this=0x8479618) at qeventloop.cpp:198 #21 0xb64b26f2 in QEventLoop::exec (this=0x8479618) at qeventloop.cpp:145 #22 0xb649b3d7 in QApplication::exec (this=0x83a3f18) at qapplication.cpp:2758 #23 0x080b3a59 in main (argc=1, argv=0xbfadaef4) at main.cpp:212
CTRL-D is the shortcut to insert a comment. Does the crash happen if you are in a certain part of the document when you press CTRL-D? Altough your backtrace is quite good, I would like to see an example file which can be used to reproduce the bug.
actually, I first notice it while pressing CTRL-D but it seems to happen after saving as well, and also while typing.... I edit .rb/.rxml/.rhtml files with Quanta, mostly.
I would really appreciate to have an example file and a way to reproduce. For some reason a pointer becomes null, which should not happen, but I am unable to trigger the bug myself.
Created attachment 14820 [details] file that I suspect make quanta crash i just deleted the three "ok" lines, and I saved. it crashed i'm not totally sure that what cause it, but its the last thing I remember having done.
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;
quanta still crash quite often while editing.... somekool@krypton ~/Sites/projeckt001 $ quanta --version Qt: 3.3.4 KDE: 3.5.2 Quanta: 3.5.2 Using host libthread_db library "/lib/libthread_db.so.1". `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 10563)] [KCrash handler] #6 0x0817f90f in AreaStruct (this=0xbf8786f0, area=@0x1c) at tag.h:59 #7 0x0817f752 in Tag::area (this=0x0) at tag.h:113 #8 0x0817df03 in SAParser::slotParseNodeInDetail (this=0x84f7798) at saparser.cpp:902 #9 0x0817e5f1 in SAParser::qt_invoke (this=0x84f7798, _id=4, _o=0xbf878800) at saparser.moc:115 #10 0xb64926ac in QObject::activate_signal (this=0x84d3da8, clist=0x84fc4c0, o=0xbf878800) at qobject.cpp:2355 #11 0xb6492504 in QObject::activate_signal (this=0x84d3da8, signal=2) at qobject.cpp:2324 #12 0xb6877c64 in QTimer::timeout (this=0x84d3da8) at moc_qtimer.cpp:82 #13 0xb64be09e in QTimer::event (this=0x84d3da8, e=0xbf878b20) at qtimer.cpp:219 #14 0xb6422235 in QApplication::internalNotify (this=0x83a9cf8, receiver=0x84d3da8, e=0xbf878b20) at qapplication.cpp:2635 #15 0xb6421478 in QApplication::notify (this=0x83a9cf8, receiver=0x84d3da8, e=0xbf878b20) at qapplication.cpp:2358 #16 0xb6c6adaf in KApplication::notify (this=0x83a9cf8, receiver=0x84d3da8, event=0xbf878b20) at kapplication.cpp:550 #17 0xb7e795e9 in QApplication::sendEvent (receiver=0x1c, event=0xbf8786f0) at qapplication.h:491 #18 0xb640d75f in QEventLoop::activateTimers (this=0x847f000) at qeventloop_unix.cpp:556 #19 0xb63bdd5d in QEventLoop::processEvents (this=0x847f000, flags=4) at qeventloop_x11.cpp:389 #20 0xb64397d9 in QEventLoop::enterLoop (this=0x847f000) at qeventloop.cpp:198 #21 0xb64396f2 in QEventLoop::exec (this=0x847f000) at qeventloop.cpp:145 #22 0xb64223d7 in QApplication::exec (this=0x83a9cf8) at qapplication.cpp:2758 #23 0x080b465d in main (argc=1, argv=0xbf878f14) at main.cpp:212
Strange that this still happens. Can you give a testcase for Quanta 3.5.2?
i'd say its hard to reproduce, the file is a big HTML file with few <%= %> tags and the base HTML has been created with dreamweaver, so its all messy.
just play by fixing the indent of an ugly HTML file,... it should make Quanta crash pretty easily.
Quanta did not crash in a long time, but it just did. running latest from KDE 3.5.2 I was replacing an h2 by an h1 in a .rhtml file. here is the backtrace. I hope it can be helpful. Using host libthread_db library "/lib/libthread_db.so.1". `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 9016)] [KCrash handler] #6 0x081768ff in Parser::rebuild (this=0x8594cb8, w=0x95578e0) at parser.cpp:1122 #7 0x080c0746 in Document::slotDelayedTextChanged (this=0x95578e0) at document.cpp:2320 #8 0x080c4e5d in Document::qt_invoke (this=0x95578e0, _id=50, _o=0xbfd3df40) at document.moc:249 #9 0xb64566ac in QObject::activate_signal (this=0x8595ff8, clist=0x95279f0, o=0xbfd3df40) at qobject.cpp:2355 #10 0xb6839b47 in QSignal::signal (this=0x8595ff8, t0=@0x8596020) at moc_qsignal.cpp:100 #11 0xb647856b in QSignal::activate (this=0x8595ff8) at qsignal.cpp:212 #12 0xb6482478 in QSingleShotTimer::event (this=0x8595fd0) at qtimer.cpp:286 #13 0xb63e6235 in QApplication::internalNotify (this=0x83a9cf8, receiver=0x8595fd0, e=0xbfd3e2a0) at qapplication.cpp:2635 #14 0xb63e5478 in QApplication::notify (this=0x83a9cf8, receiver=0x8595fd0, e=0xbfd3e2a0) at qapplication.cpp:2358 #15 0xb6c2eddf in KApplication::notify (this=0x83a9cf8, receiver=0x8595fd0, event=0xbfd3e2a0) at kapplication.cpp:550 #16 0xb7e3f5e9 in QApplication::sendEvent (receiver=0x0, event=0x955bcd0) at qapplication.h:491 #17 0xb63d175f in QEventLoop::activateTimers (this=0x847fd98) at qeventloop_unix.cpp:556 #18 0xb6381d5d in QEventLoop::processEvents (this=0x847fd98, flags=4) at qeventloop_x11.cpp:389 #19 0xb63fd7d9 in QEventLoop::enterLoop (this=0x847fd98) at qeventloop.cpp:198 #20 0xb63fd6f2 in QEventLoop::exec (this=0x847fd98) at qeventloop.cpp:145 #21 0xb63e63d7 in QApplication::exec (this=0x83a9cf8) at qapplication.cpp:2758 #22 0x080b465d in main (argc=1, argv=0xbfd3e694) at main.cpp:212
quanta crash again while editing HTML files. I think it happens more often when I replace a selection. I really often select some text and type to replace it. not just type something. I think it happens in this situation. let me submit you another Back Trace ;) by the way, apart a few bugs, Quanta is an outstanding application. I use it all the time, its excellent. Using host libthread_db library "/lib/libthread_db.so.1". `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 9948)] [KCrash handler] #6 0x0817f90f in AreaStruct (this=0xbfa8cec0, area=@0x1c) at tag.h:59 #7 0x0817f752 in Tag::area (this=0x0) at tag.h:113 #8 0x0817df03 in SAParser::slotParseNodeInDetail (this=0x85a7368) at saparser.cpp:902 #9 0x0817e5f1 in SAParser::qt_invoke (this=0x85a7368, _id=4, _o=0xbfa8cfd0) at saparser.moc:115 #10 0xb64a66ac in QObject::activate_signal (this=0x84fe8f8, clist=0x84f7178, o=0xbfa8cfd0) at qobject.cpp:2355 #11 0xb64a6504 in QObject::activate_signal (this=0x84fe8f8, signal=2) at qobject.cpp:2324 #12 0xb688bc64 in QTimer::timeout (this=0x84fe8f8) at moc_qtimer.cpp:82 #13 0xb64d209e in QTimer::event (this=0x84fe8f8, e=0xbfa8d2f0) at qtimer.cpp:219 #14 0xb6436235 in QApplication::internalNotify (this=0x83a9cf8, receiver=0x84fe8f8, e=0xbfa8d2f0) at qapplication.cpp:2635 #15 0xb6435478 in QApplication::notify (this=0x83a9cf8, receiver=0x84fe8f8, e=0xbfa8d2f0) at qapplication.cpp:2358 #16 0xb6c7eddf in KApplication::notify (this=0x83a9cf8, receiver=0x84fe8f8, event=0xbfa8d2f0) at kapplication.cpp:550 #17 0xb7e8f5e9 in QApplication::sendEvent (receiver=0x1c, event=0xbfa8cec0) at qapplication.h:491 #18 0xb642175f in QEventLoop::activateTimers (this=0x847fcf0) at qeventloop_unix.cpp:556 #19 0xb63d1d5d in QEventLoop::processEvents (this=0x847fcf0, flags=4) at qeventloop_x11.cpp:389 #20 0xb644d7d9 in QEventLoop::enterLoop (this=0x847fcf0) at qeventloop.cpp:198 #21 0xb644d6f2 in QEventLoop::exec (this=0x847fcf0) at qeventloop.cpp:145 #22 0xb64363d7 in QApplication::exec (this=0x83a9cf8) at qapplication.cpp:2758 #23 0x080b465d in main (argc=1, argv=0xbfa8d6e4) at main.cpp:212
But if I don't know how to reproduce this will be not fixed...
Unfortunately without a way to reproduce it, the chances to solve are close to 0.
Cannot reproduce...