Bug 67666 - Crash on Right Mouse Click
Summary: Crash on Right Mouse Click
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-09 16:21 UTC by na77
Modified: 2004-02-12 15:31 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 na77 2003-11-09 16:21:43 UTC
Version:           3.1.93 (using KDE 3.1.93 (CVS >= 20031028), compiled sources)
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB-athlon

While surfing in the web konqueror crashed with the following backtrace on right click with the mouse. It happens regularly but unfortunately not reproducable.


[New Thread 16384 (LWP 2356)]
0x41369cf7 in waitpid () from /lib/libpthread.so.0
#0  0x41369cf7 in waitpid () from /lib/libpthread.so.0
#1  0x4078a8d2 in KCrash::defaultCrashHandler(int) ()
   from /opt/kde3/lib/libkdecore.so.4
#2  0x41368895 in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x41774952 in KonqView::isToggleView() const (this=0x8105648)
    at konq_view.h:243
#5  0x4179f99f in KonqMainWindow::slotPopupMenu(KXMLGUIClient*, QPoint const&, QPtrList<KFileItem> const&, KParts::URLArgs const&, unsigned, bool) (
    this=0x8105648, client=0x8493d48, _global=@0xbfffe100, _items=@0xbfffdeb0, 
    _args=@0xbfffe110, itemFlags=13, showProperties=false)
    at konq_mainwindow.cc:3952
#6  0x4179f40f in KonqMainWindow::slotPopupMenu(KXMLGUIClient*, QPoint const&, KURL const&, KParts::URLArgs const&, unsigned, unsigned) (this=0x8105648, 
    client=0x8493d48, _global=@0xbfffe100, url=@0xbfffe1f0, _args=@0xbfffe110, 
    f=13, _mode=32768) at konq_mainwindow.cc:3860
#7  0x417a5b7b in KonqMainWindow::qt_invoke(int, QUObject*) (this=0x8105648, 
    _id=77, _o=0xbfffe010) at konq_mainwindow.moc:539
#8  0x40b6ce70 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#9  0x400486f2 in KParts::BrowserExtension::popupMenu(KXMLGUIClient*, QPoint const&, KURL const&, KParts::URLArgs const&, unsigned, unsigned) ()
   from /opt/kde3/lib/libkparts.so.2
#10 0x41d6ca74 in KHTMLPart::popupMenu(QString const&) ()
   from /opt/kde3/lib/libkhtml.so.4
#11 0x41d71365 in KHTMLPart::khtmlMousePressEvent(khtml::MousePressEvent*) ()
   from /opt/kde3/lib/libkhtml.so.4
#12 0x41d70e6e in KHTMLPart::customEvent(QCustomEvent*) ()
   from /opt/kde3/lib/libkhtml.so.4
#13 0x40b6aa7a in QObject::event(QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#14 0x40b11c4d in QApplication::internalNotify(QObject*, QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#15 0x40b11162 in QApplication::notify(QObject*, QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#16 0x406e1343 in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde3/lib/libkdecore.so.4
#17 0x41d3cbbc in KHTMLView::viewportMousePressEvent(QMouseEvent*) ()
   from /opt/kde3/lib/libkhtml.so.4
#18 0x40c79b02 in QScrollView::eventFilter(QObject*, QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#19 0x41d3f57c in KHTMLView::eventFilter(QObject*, QEvent*) ()
   from /opt/kde3/lib/libkhtml.so.4
#20 0x40b6ab5a in QObject::activate_filters(QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#21 0x40b6aa3a in QObject::event(QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#22 0x40ba0822 in QWidget::event(QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#23 0x40b11c4d in QApplication::internalNotify(QObject*, QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#24 0x40b1128b in QApplication::notify(QObject*, QEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#25 0x406e1343 in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde3/lib/libkdecore.so.4
#26 0x40aabe87 in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#27 0x40aa99cf in QApplication::x11ProcessEvent(_XEvent*) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#28 0x40abf024 in QEventLoop::processEvents(unsigned) ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#29 0x40b245cb in QEventLoop::enterLoop() ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#30 0x40b244b4 in QEventLoop::exec() ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#31 0x40b11e60 in QApplication::exec() ()
   from /home/noan/cvs/qt-copy/lib/libqt-mt.so.3
#32 0x4174a8dd in kdemain (argc=2, argv=0x805fb40) at konq_main.cc:162
#33 0x408918e0 in kdeinitmain () from /opt/kde3/lib/kde3/konqueror.so
#34 0x0804cf40 in launch(int, char const*, char const*, char const*, int, char const*, bool, char const*, bool, char const*) ()
#35 0x0804dd2b in handle_launcher_request(int) ()
#36 0x0804e278 in handle_requests(int) ()
#37 0x0804f156 in main ()
#38 0x414c88ae in __libc_start_main () from /lib/libc.so.6






(gdb) f 4
#4  0x41774952 in KonqView::isToggleView() const (this=0x8105648) at konq_view.h:243
243       bool isToggleView() const { return m_bToggleView; }
Current language:  auto; currently c++
(gdb) p m_bToggleView
$1 = 1
(gdb) f 5
#5  0x4179f99f in KonqMainWindow::slotPopupMenu(KXMLGUIClient*, QPoint const&, QPtrList<KFileItem> const&, KParts::URLArgs const&, unsigned, bool) (this=0x8105648, client=0x8493d48,
    _global=@0xbfffe100, _items=@0xbfffdeb0, _args=@0xbfffe110, itemFlags=13,
    showProperties=false) at konq_mainwindow.cc:3952
3952      KURL viewURL = m_currentView->isToggleView() ? KURL() : m_currentView->url();
(gdb) list
3947
3948      // Don't set the view URL for a toggle view.
3949      // (This is a bit of a hack for the directory tree....)
3950      // ## should use the new m_currentView->isHierarchicalView() instead?
3951      // Would this be correct for the konqlistview tree view?
3952      KURL viewURL = m_currentView->isToggleView() ? KURL() : m_currentView->url();
3953
3954      bool openedForViewURL = false;
3955      bool dirsSelected = false;
3956
(gdb) p m_currentView
$2 = {priv = 0x8112148}

(gdb) f 6
#6  0x4179f40f in KonqMainWindow::slotPopupMenu(KXMLGUIClient*, QPoint const&, KURL const&, KParts::URLArgs const&, unsigned, unsigned) (this=0x8105648, client=0x8493d48,
    _global=@0xbfffe100, url=@0xbfffe1f0, _args=@0xbfffe110, f=13, _mode=32768)
    at konq_mainwindow.cc:3860
3860      slotPopupMenu( client, _global, items, _args, f, false ); //BE CAREFUL WITH sender()
(gdb) list
3855    void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global, const KURL &url, const KParts::URLArgs &_args, KParts::BrowserExtension::PopupFlags f, mode_t _mode )
3856    {
3857      KFileItem item( url, _args.serviceType, _mode );
3858      KFileItemList items;
3859      items.append( &item );
3860      slotPopupMenu( client, _global, items, _args, f, false ); //BE CAREFUL WITH sender() !
3861    }
3862
3863    void KonqMainWindow::slotPopupMenu( const QPoint &_global, const KFileItemList &_items )
3864    {
(gdb) p client
$3 = (struct KXMLGUIClient *) 0x8493d48
(gdb) p _global
$4 = (const QPoint &) @0xbfffe100: {xp = 368, yp = 514}
(gdb) p items
$5 = {<> = {<No data fields>}, <No data fields>}
(gdb) p _args
$6 = (const struct URLArgs &) @0xbfffe110: <incomplete type>
(gdb) p f
$7 = 13
(gdb)
Comment 1 Stephan Kulow 2003-11-09 18:20:23 UTC
hmm, never seen that. Can you run browse while using valgrind?
Comment 2 na77 2003-11-10 21:24:30 UTC
Ok, here it is.
I can't imagine this helps much - maybe it is a problem with my libraries/compiler (I'm running SuSE 8.2 with only additional security patches)

==3054== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==3054== Copyright (C) 2002, and GNU GPL'd, by Julian Seward.
==3054== Using valgrind-1.9.5pre, a program instrumentation system for x86-linux.
==3054== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==3054== 
==3054== My PID = 3054, parent PID = 2506.  Prog and args are:
==3054==    konqueror
==3054== Estimated CPU clock rate is 1111 MHz
==3054== For more details, rerun with: -v
==3054== 
==3054== Syscall param write(buf) contains uninitialised or unaddressable byte(s)
==3054==    at 0x418B03A8: __GI___libc_write (in /lib/libc.so.6)
==3054==    by 0x41618EBD: _X11TransSocketWrite (in /usr/X11R6/lib/libX11.so.6.2)
==3054==    by 0x41619AFE: _X11TransWrite (in /usr/X11R6/lib/libX11.so.6.2)
==3054==    by 0x415F8663: _XFlushInt (in /usr/X11R6/lib/libX11.so.6.2)
==3054==    Address 0x43EABDF8 is 116 bytes inside a block of size 2048 alloc'd
==3054==    at 0x401633BB: calloc (in /usr/lib/valgrind/valgrind.so)
==3054==    by 0x415E9736: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2)
==3054==    by 0x40DF9CF6: qt_init_internal(int*, char**, _XDisplay*, unsigned long, unsigned long) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054==    by 0x40DFB495: qt_init(int*, char**, QApplication::Type) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054== 
==3054== Syscall param writev(vector[...]) contains uninitialised or unaddressable byte(s)
==3054==    at 0x40175278: vgIntercept_writev (in /usr/lib/valgrind/valgrind.so)
==3054==    by 0x401752AF: __writev (in /usr/lib/valgrind/valgrind.so)
==3054==    by 0x41618F3D: _X11TransSocketWritev (in /usr/X11R6/lib/libX11.so.6.2)
==3054==    by 0x41619B5E: _X11TransWritev (in /usr/X11R6/lib/libX11.so.6.2)
==3054==    Address 0x43EABDC6 is 66 bytes inside a block of size 2048 alloc'd
==3054==    at 0x401633BB: calloc (in /usr/lib/valgrind/valgrind.so)
==3054==    by 0x415E9736: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2)
==3054==    by 0x40DF9CF6: qt_init_internal(int*, char**, _XDisplay*, unsigned long, unsigned long) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054==    by 0x40DFB495: qt_init(int*, char**, QApplication::Type) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054== 
==3054== Conditional jump or move depends on uninitialised value(s)
==3054==    at 0x40010606: strchr (in /lib/ld-2.3.2.so)
==3054== 
==3054== Conditional jump or move depends on uninitialised value(s)
==3054==    at 0x41072F95: QIconView::showEvent(QShowEvent*) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054==    by 0x40EF4A30: QWidget::event(QEvent*) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054==    by 0x40E65C4C: QApplication::internalNotify(QObject*, QEvent*) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054==    by 0x40E65161: QApplication::notify(QObject*, QEvent*) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054== 
==3054== Syscall param write(buf) contains uninitialised or unaddressable byte(s)
==3054==    at 0x418B03A8: __GI___libc_write (in /lib/libc.so.6)
==3054==    by 0x416A9D9D: _IceTransSocketWrite (in /usr/X11R6/lib/libICE.so.6.3)
==3054==    by 0x416AAB6E: _IceTransWrite (in /usr/X11R6/lib/libICE.so.6.3)
==3054==    by 0x416A154A: _IceWrite (in /usr/X11R6/lib/libICE.so.6.3)
==3054==    Address 0x43F7CF24 is 12 bytes inside a block of size 1024 alloc'd
==3054==    at 0x401633BB: calloc (in /usr/lib/valgrind/valgrind.so)
==3054==    by 0x4169E4A6: IceOpenConnection (in /usr/X11R6/lib/libICE.so.6.3)
==3054==    by 0x416933A0: SmcOpenConnection (in /usr/X11R6/lib/libSM.so.6.0)
==3054==    by 0x40E0402C: QSessionManager::QSessionManager(QApplication*, QString&, QString&) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054== 
==3054== Invalid read of size 1
==3054==    at 0x40289952: KonqView::isToggleView() const (konq_view.h:243)
==3054==    by 0x402B440E: KonqMainWindow::slotPopupMenu(KXMLGUIClient*, QPoint const&, KURL const&, KParts::URLArgs const&, unsigned, unsigned) (konq_mainwindow.cc:3860)
==3054==    by 0x402BAB7A: KonqMainWindow::qt_invoke(int, QUObject*) (konq_mainwindow.moc:539)
==3054==    by 0x40EC0E6F: QObject::activate_signal(QConnectionList*, QUObject*) (in /home/noan/cvs/qt-copy/lib/libqt-mt.so.3.2.1)
==3054==    Address 0x74 is not stack'd, malloc'd or free'd
==3054== Warning: client attempted to close Valgrind's logfile fd (3).
==3054==    Use --logfile-fd=<number> to select an alternative logfile fd.
==3054== Warning: invalid file descriptor 2 in syscall write()
==3054== Warning: invalid file descriptor 2 in syscall write()
==3054== Warning: invalid file descriptor 9 in syscall write()
==3054== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==3054== discard syms in /usr/lib/gconv/ISO8859-15.so due to munmap()
==3054== discard syms in /lib/libnss_files.so.2 due to munmap()
==3054== 
==3054== ERROR SUMMARY: 125 errors from 6 contexts (suppressed: 279 from 7)
==3054== malloc/free: in use at exit: 4772501 bytes in 103754 blocks.
==3054== malloc/free: 1025092 allocs, 921338 frees, 69271827 bytes allocated.
==3054== For a detailed leak analysis,  rerun with: --leak-check=yes
==3054== For counts of detected errors, rerun with: -v
Comment 3 Waldo Bastian 2004-02-12 15:31:29 UTC
CVS commit by waba: 

In KonqMainWindow::slotPopupMenu m_currentView may in some cases not yet 
point to the new currentView (See also comment in source code) (BR67666)
CCMAIL: 67666-done@bugs.kde.org


  M +6 -6      konq_mainwindow.cc   1.1274.2.5


--- kdebase/konqueror/konq_mainwindow.cc  #1.1274.2.4:1.1274.2.5
@@ -3934,5 +3934,5 @@ void KonqMainWindow::slotPopupMenu( KXML
 
   if ( _items.count() == 1 ) {
-      QString currentServiceName = m_currentView->service()->desktopEntryName();
+      QString currentServiceName = currentView->service()->desktopEntryName();
 
       // List of services for the "Preview In" submenu.
@@ -3962,7 +3962,7 @@ void KonqMainWindow::slotPopupMenu( KXML
   // Don't set the view URL for a toggle view.
   // (This is a bit of a hack for the directory tree....)
-  // ## should use the new m_currentView->isHierarchicalView() instead?
+  // ## should use the new currentView->isHierarchicalView() instead?
   // Would this be correct for the konqlistview tree view?
-  KURL viewURL = m_currentView->isToggleView() ? KURL() : m_currentView->url();
+  KURL viewURL = currentView->isToggleView() ? KURL() : currentView->url();
 
   bool openedForViewURL = false;
@@ -3998,5 +3998,5 @@ void KonqMainWindow::slotPopupMenu( KXML
   }
 
-  if (m_currentView->isHierarchicalView())
+  if (currentView->isHierarchicalView())
     itemFlags |= KParts::BrowserExtension::ShowCreateDirectory;
 
@@ -4014,10 +4014,10 @@ void KonqMainWindow::slotPopupMenu( KXML
       // This parent ensures that if the part destroys itself (e.g. KHTML redirection),
       // it will close the popupmenu
-      m_currentView->part()->widget(),
+      currentView->part()->widget(),
       kpf,
       itemFlags );
 
   if ( openedForViewURL && !viewURL.isLocalFile() )
-      pPopupMenu->setURLTitle( m_currentView->caption() );
+      pPopupMenu->setURLTitle( currentView->caption() );
 
   // We will need these if we call the newTab slot