Summary: | quanta keeps crashing every 10 minutes or so | ||
---|---|---|---|
Product: | [Unmaintained] quanta | Reporter: | Tim Brouckaert <tab4by> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | p92 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Tim Brouckaert
2006-01-29 17:08:08 UTC
This might be a dupe of Bug 121280 I also have these crashing bugs when using Kubuntu with KDE 3.5.1 I have been getting the same sort of crash in Debian amd64 with KDE 3.5.1 - in my case I have virtually no info in backtrace. I do not believe it is a dupe of Bug 121280 as I have undo steps set to unlimited. I get this about 2x a day, editing php and JavaScript. Heh - it just did it again - that makes 2x in 30 mins. Here is my latest backtrace: ============================ (no debugging symbols found) Using host libthread_db library "/lib/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) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 46912601190272 (LWP 6672)] (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) 0x00002aaab05095e2 in nanosleep () from /lib/libc.so.6 #0 0x00002aaab05095e2 in nanosleep () from /lib/libc.so.6 #1 0x00002aaab0509434 in sleep () from /lib/libc.so.6 #2 0x00002aaaac690b45 in KCrash::startDrKonqi () from /usr/lib/libkdecore.so.4 #3 0x00002aaaac6b690c in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4 #4 0x00002aaab04a5ed0 in killpg () from /lib/libc.so.6 #5 0x0000000000000000 in ?? () =============================== Your crash seems to be completely independent of Quanta. Might be a: - libc bug - gcc misscompilation issue - hardware error Please compile Quanta and kdelibs with debug info enabled, otherwise the backtrace is completely useless. do you have an ASSERT message showed when quanta crashes, if you start quanta from a command line in a konsole with : $ quanta --sync if it is the same ASSERT as mine then I have a duplicate of your bug in #121280 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; |