Bug 75193 - Right clicking in month view in KOrganizer part crashes Kontact
Summary: Right clicking in month view in KOrganizer part crashes Kontact
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-13 23:43 UTC by Paul Sprakes
Modified: 2004-02-19 19:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Sprakes 2004-02-13 23:43:11 UTC
Version:           unknown (using KDE 3.2 BRANCH >= 20040204, compiled sources)
Compiler:          gcc version 3.3.1
OS:          Linux (i686) release 2.4.22

To reproduce: 

1. Start Kontact.
2. Click on Calendar button in left button bar.
3. Change to month view.
4. Click on Contacts or Notes in left button bar. 
5. Click back on Calendar button in left button bar.
6. Right click on month --> crash!!

(You may need to repeat 4 & 5 a couple of times).

Backtrace:

(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 25728)]

0x4143a1b7 in waitpid () from /lib/libpthread.so.0
#0  0x4143a1b7 in waitpid () from /lib/libpthread.so.0
#1  0x4096818f in KCrash::defaultCrashHandler(int) ()
   from /opt/kde-3.2/lib/libkdecore.so.4
#2  0x414388e5 in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x40e469e5 in QPopupMenu::popup(QPoint const&, int) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#5  0x42c3f50d in KOMonthView::showGeneralContextMenu() ()
   from /opt/kde-3.2/lib/libkorganizer.so.1
#6  0x42c3e054 in MonthViewCell::contextMenu(QListBoxItem*) ()
   from /opt/kde-3.2/lib/libkorganizer.so.1
#7  0x42c3aab6 in MonthViewCell::qt_invoke(int, QUObject*) ()
   from /opt/kde-3.2/lib/libkorganizer.so.1
#8  0x40d4890c in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#9  0x41089fe7 in QListBox::rightButtonPressed(QListBoxItem*, QPoint const&) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#10 0x40e17213 in QListBox::mousePressEventEx(QMouseEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#11 0x40e17026 in QListBox::mousePressEvent(QMouseEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#12 0x42c3b4fc in KNoScrollListBox::mousePressEvent(QMouseEvent*) ()
   from /opt/kde-3.2/lib/libkorganizer.so.1
#13 0x40d7e116 in QWidget::event(QEvent*) () from /opt/qt-3.3/lib/libqt-mt.so.3
#14 0x40ced06f in QApplication::internalNotify(QObject*, QEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#15 0x40cec771 in QApplication::notify(QObject*, QEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#16 0x408c6c8c in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde-3.2/lib/libkdecore.so.4
#17 0x40c846b8 in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#18 0x40c8236d in QApplication::x11ProcessEvent(_XEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#19 0x40c98f91 in QEventLoop::processEvents(unsigned) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#20 0x40cff256 in QEventLoop::enterLoop() () from /opt/qt-3.3/lib/libqt-mt.so.3
#21 0x40cff108 in QEventLoop::exec() () from /opt/qt-3.3/lib/libqt-mt.so.3
#22 0x40ced2b1 in QApplication::exec() () from /opt/qt-3.3/lib/libqt-mt.so.3
#23 0x0805893e in main ()

I'll recompile kdepim with full debug and post a better backtrace.
Comment 1 Paul Sprakes 2004-02-14 02:04:23 UTC
Some KOrganizer line numbers in this one:

(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 24987)]

0x4143b1b7 in waitpid () from /lib/libpthread.so.0
#0  0x4143b1b7 in waitpid () from /lib/libpthread.so.0
#1  0x4096918f in KCrash::defaultCrashHandler(int) ()
   from /opt/kde-3.2/lib/libkdecore.so.4
#2  0x414398e5 in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x40e479e5 in QPopupMenu::popup(QPoint const&, int) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#5  0x42c5df1d in KOMonthView::showGeneralContextMenu() (this=0x8566b60)
    at komonthview.cpp:783
#6  0x42c5cd6f in MonthViewCell::contextMenu(QListBoxItem*) (this=0x85790a8, 
    item=0x0) at komonthview.cpp:541
#7  0x42c599a6 in MonthViewCell::qt_invoke(int, QUObject*) (this=0x85790a8, 
    _id=46, _o=0xbfffeed0) at komonthview.moc:284
#8  0x40d4990c in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#9  0x4108afe7 in QListBox::rightButtonPressed(QListBoxItem*, QPoint const&) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#10 0x40e18213 in QListBox::mousePressEventEx(QMouseEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#11 0x40e18026 in QListBox::mousePressEvent(QMouseEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#12 0x42c5a46c in KNoScrollListBox::mousePressEvent(QMouseEvent*) (
    this=0x85797a0, e=0xbffff1b0) at komonthview.cpp:143
#13 0x40d7f116 in QWidget::event(QEvent*) () from /opt/qt-3.3/lib/libqt-mt.so.3
#14 0x40cee06f in QApplication::internalNotify(QObject*, QEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#15 0x40ced771 in QApplication::notify(QObject*, QEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#16 0x408c7c8c in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde-3.2/lib/libkdecore.so.4
#17 0x40c856b8 in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#18 0x40c8336d in QApplication::x11ProcessEvent(_XEvent*) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#19 0x40c99f91 in QEventLoop::processEvents(unsigned) ()
   from /opt/qt-3.3/lib/libqt-mt.so.3
#20 0x40d00256 in QEventLoop::enterLoop() () from /opt/qt-3.3/lib/libqt-mt.so.3
#21 0x40d00108 in QEventLoop::exec() () from /opt/qt-3.3/lib/libqt-mt.so.3
#22 0x40cee2b1 in QApplication::exec() () from /opt/qt-3.3/lib/libqt-mt.so.3
#23 0x0805893e in main ()
Comment 2 Tobias Koenig 2004-02-19 19:20:53 UTC
CVS commit by tokoe: 

Don't keep pointers on XMLGUI created context menus.

CCMAIL:75193-done@bugs.kde.org


  M +3 -6      komonthview.cpp   1.88
  M +0 -1      komonthview.h   1.43


--- kdepim/korganizer/komonthview.cpp  #1.87:1.88
@@ -616,5 +616,4 @@ KOMonthView::KOMonthView(Calendar *calen
 
   mEventContextMenu = eventPopup();
-  mGeneralContextMenu = 0;
 
   updateConfig();
@@ -626,5 +625,4 @@ KOMonthView::~KOMonthView()
 {
   if (mEventContextMenu) delete mEventContextMenu;
-  if (mGeneralContextMenu) delete mGeneralContextMenu;
 }
 
@@ -806,9 +804,8 @@ void KOMonthView::showEventContextMenu( 
 void KOMonthView::showGeneralContextMenu()
 {
-  if ( !mGeneralContextMenu )
-    mGeneralContextMenu = newEventPopup();
+  QPopupMenu *menu = newEventPopup();
 
-  if (mGeneralContextMenu)
-    mGeneralContextMenu->popup(QCursor::pos());
+  if ( menu )
+    menu->popup( QCursor::pos() );
 }
 

--- kdepim/korganizer/komonthview.h  #1.42:1.43
@@ -243,5 +243,4 @@ class KOMonthView: public KOEventView
 
     KOEventPopupMenu *mEventContextMenu;
-    QPopupMenu *mGeneralContextMenu;
 };