Bug 73428 - Crash when creating/deleting submenu
Summary: Crash when creating/deleting submenu
Status: RESOLVED FIXED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-24 20:25 UTC by Kaleb Pederson
Modified: 2004-01-24 22:17 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 Kaleb Pederson 2004-01-24 20:25:51 UTC
Version:           0.5 (kde-3.2_rc1) (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages
Compiler:          g++ 3.2.3 
OS:          Linux

The following is reproduceable on my system:

1) Click on the first Submenu item
2) Click on File->New Submenu
3) Give it a name (Example), click OK.
4) BUG: there are now 2 copies of the submenu, one at the top of the submenu selected in 1) and one at the bottom of the submenu selected in 1)
5) Right Click on the bottom newly created submenu
6) Click on Delete
7) CRASH: click on the top newly created submenu (boom!)

In step 5) and 7) it doesn't matter which of the two newly created submenus you select.

It results in the following traceback:

(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)...[New Thread 16384 (LWP 14604)]
0x40f815b8 in waitpid ()
   from /lib/libpthread.so.0
#0  0x40f815b8 in waitpid () from /lib/libpthread.so.0
#1  0x406df10c in __JCR_LIST__ () from /usr/kde/3.2/lib/libkdecore.so.4
#2  0x40f80383 in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x40ab73c3 in QLineEditPrivate::setText(QString const&) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#5  0x40ab0f37 in QLineEdit::setText(QString const&) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#6  0x40414cab in KLineEdit::setText(QString const&) ()
   from /usr/kde/3.2/lib/libkdeui.so.4
#7  0x419bc2ac in BasicTab::setFolderInfo(MenuFolderInfo*) ()
   from /usr/kde/3.2/lib/libkdeinit_kmenuedit.so
#8  0x419ba649 in BasicTab::qt_invoke(int, QUObject*) ()
   from /usr/kde/3.2/lib/libkdeinit_kmenuedit.so
#9  0x409f3210 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#10 0x419bd360 in TreeView::entrySelected(MenuFolderInfo*) ()
   from /usr/kde/3.2/lib/libkdeinit_kmenuedit.so
#11 0x419bf25e in TreeView::itemSelected(QListViewItem*) ()
   from /usr/kde/3.2/lib/libkdeinit_kmenuedit.so
#12 0x419bd4b1 in TreeView::qt_invoke(int, QUObject*) ()
   from /usr/kde/3.2/lib/libkdeinit_kmenuedit.so
#13 0x409f3210 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#14 0x40d1eaa3 in QListView::selectionChanged(QListViewItem*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#15 0x40ad3dff in QListView::setCurrentItem(QListViewItem*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#16 0x40acfde2 in QListView::contentsMousePressEventEx(QMouseEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#17 0x40acfa36 in QListView::contentsMousePressEvent(QMouseEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#18 0x40419ea4 in KListView::contentsMousePressEvent(QMouseEvent*) ()
   from /usr/kde/3.2/lib/libkdeui.so.4
#19 0x40b0040c in QScrollView::viewportMousePressEvent(QMouseEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#20 0x40affdb4 in QScrollView::eventFilter(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#21 0x40acf508 in QListView::eventFilter(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#22 0x409f0d2e in QObject::activate_filters(QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#23 0x409f0c51 in QObject::event(QEvent*) () from /usr/qt/3/lib/libqt-mt.so.3
#24 0x40a2792c in QWidget::event(QEvent*) () from /usr/qt/3/lib/libqt-mt.so.3
#25 0x409983a5 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#26 0x40997888 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#27 0x405d4891 in KApplication::notify(QObject*, QEvent*) ()
   from /usr/kde/3.2/lib/libkdecore.so.4
#28 0x40930db8 in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#29 0x4092e549 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#30 0x40944e77 in QEventLoop::processEvents(unsigned) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#31 0x409ab606 in QEventLoop::enterLoop() () from /usr/qt/3/lib/libqt-mt.so.3
#32 0x409ab4a8 in QEventLoop::exec() () from /usr/qt/3/lib/libqt-mt.so.3
#33 0x409985f1 in QApplication::exec() () from /usr/qt/3/lib/libqt-mt.so.3
#34 0x419c43fe in kdemain () from /usr/kde/3.2/lib/libkdeinit_kmenuedit.so
#35 0x4071386e in kdeinitmain () from /usr/kde/3.2/lib/kde3/kmenuedit.so
#36 0x0804caaa in strcpy ()
#37 0x0804d6fa in strcpy ()
#38 0x0804db99 in strcpy ()
#39 0x0804e7ba in strcpy ()
#40 0x410d5dcc in __libc_start_main () from /lib/libc.so.6
Comment 1 Waldo Bastian 2004-01-24 22:17:13 UTC
Subject: kdebase/kmenuedit

CVS commit by waba: 

Make sure to open menu before inserting a new item. (Similar to r1.75) (BR73428)
CCMAIL: 73428-done@bugs.kde.org


  M +7 -7      treeview.cpp   1.81


--- kdebase/kmenuedit/treeview.cpp  #1.80:1.81
@@ -604,9 +604,9 @@ void TreeView::slotDropped (QDropEvent *
            parentItem->setOpen(true);
 
+         // update fileInfo data
          folderInfo->fullId = parentFolderInfo->fullId + folderInfo->id;
          folderInfo->setInUse(true);
          parentFolderInfo->add(folderInfo);
 
-         // create the TreeItem
          TreeItem *newItem = createTreeItem(parentItem, after, folderInfo);
 
@@ -766,4 +766,8 @@ void TreeView::newsubmenu()
    folderInfo->fullId = parentFolderInfo->fullId + folderInfo->id;
 
+   // create the TreeItem
+   if(parentItem)
+      parentItem->setOpen(true);
+
    // update fileInfo data
    parentFolderInfo->add(folderInfo);
@@ -771,8 +775,4 @@ void TreeView::newsubmenu()
    TreeItem *newItem = createTreeItem(parentItem, item, folderInfo, true);
 
-   // create the TreeItem
-   if(parentItem)
-      parentItem->setOpen(true);
-
    setSelected ( newItem, true);
    itemSelected( newItem);
@@ -831,4 +831,5 @@ void TreeView::newitem()
    MenuEntryInfo *entryInfo = new MenuEntryInfo(s, df);
 
+   // create the TreeItem
    if(parentItem)
       parentItem->setOpen(true);
@@ -837,5 +838,4 @@ void TreeView::newitem()
    parentFolderInfo->add(entryInfo);
 
-   // create the TreeItem
    TreeItem *newItem = createTreeItem(parentItem, item, entryInfo, true);
 
@@ -973,9 +973,9 @@ void TreeView::paste()
              parentItem->setOpen(true);
 
+         // update fileInfo data
          folderInfo->fullId = parentFolderInfo->fullId + folderInfo->id;
          folderInfo->setInUse(true);
          parentFolderInfo->add(folderInfo);
 
-         // create the TreeItem
          TreeItem *newItem = createTreeItem(parentItem, item, folderInfo);