Bug 126585 - quanta crashes with seg foult when closing all tabs
Summary: quanta crashes with seg foult when closing all tabs
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (show other bugs)
Version: 3.5
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-02 04:36 UTC by Gregory "Wolfe" Woodbury
Modified: 2006-09-02 01:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory "Wolfe" Woodbury 2006-05-02 04:36:30 UTC
Version:           3.5 (using KDE KDE 3.5.0)
Installed from:    Fedora RPMs
OS:                Linux

If there are 6 or more open file tabs in the quanta window, selecting close all causes a crash with a seq fault generic error message (no details are supplied).

Specifically, I have a website (http://wolves.homeip.net/karaoke/) that is a bunch of small pages in a frameset.  When I have more than six pages open and then select "close all tabs" from the tab context menu quanta crashes with a segv error.  It does not bring up bug reports or anything useful other than a generic message that says "you might want to report this"
Comment 1 András Manţia 2006-05-19 13:49:55 UTC
I cannot reproduce with the latest version. Does it happen every time 
you open more than 6 documents?
Try to upgrade to 3.5.2 or the upcoming 3.5.3.
And in the crash dialog request the backtrace and post here.
Comment 2 András Manţia 2006-09-02 01:05:06 UTC
SVN commit 579903 by amantia:

Don't crash when closing a document in VPL mode.
Should fix the following bugs:

BUGS: 133082, 126585, 125153

 M  +1 -0      ChangeLog  
 M  +7 -9      src/quantaview.cpp  
 M  +8 -8      src/viewmanager.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #579902:579903
@@ -7,6 +7,7 @@
       - fix Save As problems, possibly #131728
       - add some more special characters to the list [#130513, #124628]
       - crash fix in CSS editor [#131849]
+      - don't crash when closing a document in VPL mode [#133082, #126585, #125153]
 
 Version 3.5.4 (Release date: 02-08-2006; Started 24-06-2005):
  - bugfixes:
--- branches/KDE/3.5/kdewebdev/quanta/src/quantaview.cpp #579902:579903
@@ -136,6 +136,7 @@
         m_customWidget->reparent(0L, 0, QPoint(), false);
     if (!saveModified())
           return false;
+    slotSetSourceLayout();
     if (static_cast<QuantaView *>(quantaApp->activeWindow()) == this)
     {
         parser->setSAParserEnabled(false);
@@ -143,8 +144,6 @@
         delete baseNode;
         baseNode = 0L;
         kdDebug(24000) << "Node objects after delete :" << NN << " baseNode= " << baseNode << endl;
-        if (m_kafkaDocument && m_kafkaDocument->getKafkaWidget() && m_kafkaDocument->getKafkaWidget()->view())
-          m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, QPoint(), false);
     }
     if (m_document)
     {
@@ -152,8 +151,6 @@
       Project::ref()->saveBookmarks(url, dynamic_cast<KTextEditor::MarkInterface*>(m_document->doc()));
       emit eventHappened("before_close", url.url(), QString::null);
       m_currentViewsLayout = -1;
-      //slotSetSourceLayout(); //set the layout to source only, otherwise it crashes...
-     // m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, QPoint(), false);
 //      m_document->closeTempFile();
       if (!m_document->isUntitled() && url.isLocalFile())
       {
@@ -161,7 +158,7 @@
 //        kdDebug(24000) << "removeFile[mayRemove]: " << url.path() << endl;
       }
       Project::ref()->saveCursorPosition(url, dynamic_cast<KTextEditor::ViewCursorInterface*>(m_document->view()));
-    
+
       quantaApp->menuBar()->activateItemAt(-1);
       quantaApp->guiFactory()->removeClient(m_document->view());
       emit eventHappened("after_close", url.url(), QString::null);
@@ -372,6 +369,7 @@
 
 //show the document if full size
    m_splitter->hide();
+   m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, QPoint(), false);
    m_document->view()->reparent(m_documentArea, 0, QPoint(), true);
    m_document->view()->resize(m_documentArea->size());
    m_viewLayout->addWidget(m_documentArea, 1, 0);
@@ -751,20 +749,20 @@
 {
   if (m_document)
   {
-    if (m_currentFocus == QuantaView::VPLFocus || 
+    if (m_currentFocus == QuantaView::VPLFocus ||
         (m_currentFocus == QuantaView::SourceFocus && qConfig.smartTagInsertion))
       insertOutputInTheNodeTree("", "", quantaApp->showTagDialogAndReturnNode(tag, attr));
     else
     {
       QString selection;
-      if (m_document->selectionIf)  
+      if (m_document->selectionIf)
         selection = m_document->selectionIf->selection();
       TagDialog *dlg = new TagDialog(QuantaCommon::tagFromDTD(m_document->getDTDIdentifier(), tag), selection, attr, baseURL());
       if (dlg->exec())
       {
         dlg->insertTag(m_document, insertInLine);
       }
-  
+
       delete dlg;
     }
   }
@@ -996,7 +994,7 @@
        resize(width(), height());
   } else
   {
-/*    
+/*
     kdDebug(24000) << "m_documentArea->height(): " << m_documentArea->height() << endl;
     kdDebug(24000) << "ToolbarTabWidget::ref()->height(): " << ToolbarTabWidget::ref()->height() << " hidden: " << ToolbarTabWidget::ref()->isHidden() << " visible: " << ToolbarTabWidget::ref()->isVisible() << endl;
     kdDebug(24000) <<"sum: " << m_documentArea->height() + ToolbarTabWidget::ref()->height() << endl;
--- branches/KDE/3.5/kdewebdev/quanta/src/viewmanager.cpp #579902:579903
@@ -235,7 +235,7 @@
   if (w && !w->isUntitled())
   {
     emit viewActivated(w->url());
-    
+
     bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name);
     quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag);
   }
@@ -304,7 +304,7 @@
       return;  //save aborted
     }
   }
-  
+
   for (childIt = children.begin(); childIt != children.end(); ++childIt)
   {
       view = *childIt;
@@ -477,7 +477,7 @@
   disconnect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
   disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
   ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
-  
+
   for (childIt = children.begin(); childIt != children.end(); ++childIt)
   {
       view = dynamic_cast<QuantaView*>(*childIt);
@@ -525,7 +525,7 @@
       quantaApp->slotNewStatus();
   }
   emit filesClosed(true);
-  return true; 
+  return true;
 }
 
 bool ViewManager::isOneModified()
@@ -587,10 +587,10 @@
    if (m_separatorVisible)
        m_tabPopup->removeItemAt(SEPARATOR_INDEX);
    m_separatorVisible = false;
-   m_contextView = dynamic_cast<QuantaView*>(widget);   
+   m_contextView = dynamic_cast<QuantaView*>(widget);
    Document *w = 0L;
    if (m_contextView)
-    w = m_contextView->document();       
+    w = m_contextView->document();
    if (w)
    {
        if (!w->isUntitled())
@@ -620,7 +620,7 @@
    bool bookmarksFound = false;
    if (w && w->markIf)
    {
-     m_bookmarks->setDocument(w);           
+     m_bookmarks->setDocument(w);
      QPtrList<KTextEditor::Mark> m = w->markIf->marks();
      QPtrListIterator<KTextEditor::Mark> it(m);
      for(; *it; ++it)
@@ -631,7 +631,7 @@
          break;
        }
      }
-   }  
+   }
    m_tabPopup->setItemVisible(m_bookmarksMenuId, bookmarksFound);
 #ifdef ENABLE_CVSSERVICE
    if (w && w->url().isLocalFile() && !w->isUntitled() && CVSService::ref()->exists())