Bug 60770 - Crash in ~QIconView - when doing find next
Summary: Crash in ~QIconView - when doing find next
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: QEditor (show other bugs)
Version: git master
Platform: RedHat Enterprise Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
: 60510 61079 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-04 22:55 UTC by Jon Smirl
Modified: 2003-11-07 00:52 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 Jon Smirl 2003-07-04 22:56:00 UTC
Version:           CVS (using KDE KDE 3.1)
Installed from:    RedHat RPMs

I was doing a find next when this happen but looking at the stack it is not obvious that it has anything to do with find. I also think I had one find already started that I had forgotten about and then started another.

[New Thread 1096328320 (LWP 10255)]
[New Thread 1116949808 (LWP 10256)]
0xffffe410 in ?? ()
#0  0xffffe410 in ?? ()
#1  0x40a1957d in KCrash::defaultCrashHandler(int) ()
   from /usr/lib/libkdecore.so.4
#2  <signal handler called>
#3  0x080bb8f0 in ?? ()
#4  0x40f466a2 in QIconView::~QIconView() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#5  0x40871c43 in KIconView::~KIconView() () from /usr/lib/libkdeui.so.4
#6  0x40635928 in KFileIconView::~KFileIconView() () from /usr/lib/libkio.so.4
#7  0x406453ca in KDirOperator::~KDirOperator() () from /usr/lib/libkio.so.4
#8  0x40ddb7c8 in QWidget::~QWidget() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#9  0x41a7d2f2 in ~KDevFileSelector (this=0x833f2b0)
    at fileselector_widget.cpp:227
#10 0x41a7aab0 in FileSelectorPart::~FileSelectorPart() ()
   from /opt/kde3/lib/kde3/libkdevfileselector.so
#11 0x408ef18e in QPtrList<QObject>::deleteItem(void*) ()
   from /usr/lib/libkdeui.so.4
#12 0x41014dce in QGList::clear() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#13 0x40a2e6c6 in KLibrary::~KLibrary() () from /usr/lib/libkdecore.so.4
#14 0x40a308cb in KLibLoader::close_pending(KLibWrapPrivate*) ()
   from /usr/lib/libkdecore.so.4
#15 0x40a2fa26 in KLibLoader::~KLibLoader() () from /usr/lib/libkdecore.so.4
#16 0x40a2f4f8 in KLibLoader::cleanUp() () from /usr/lib/libkdecore.so.4
#17 0x409b1a6b in KApplication::~KApplication() ()
   from /usr/lib/libkdecore.so.4
#18 0x0806ec5e in main (argc=1, argv=0xbffffb44) at main.cpp:125
#19 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
Comment 1 Jens Dagerbo 2003-11-06 19:04:05 UTC
I sure didn't expect it, but I _can_ reproduce this one!

1. Use QEditor, start a search
2. Start another find (menu is reachable even if shortcut isn't)
3. run a few find next with the second dialog
4. Close it and attempt find next with the first dialog
-> Crash!

An interesting thing in my backtrace is that libGL (from nvidia) seems to be involved!?

[New Thread 16384 (LWP 21357)]
[New Thread 32769 (LWP 21371)]
[New Thread 16386 (LWP 21372)]
0x419a039c in waitpid () from /lib/libpthread.so.0
#0  0x419a039c in waitpid () from /lib/libpthread.so.0
#1  0x40ef1a3e in KCrash::defaultCrashHandler(int) (sig=11) at kcrash.cpp:246
#2  0x4199f17c in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x42000009 in __nvsym16903 () from /usr/lib/libGLcore.so.1
#5  0x409ead2c in KFileIconViewItem::~KFileIconViewItem() ()
   from /opt/kde/lib/libkio.so.4
#6  0x41478bb2 in QIconView::~QIconView() ()
   from /opt/qt-3.2.1/lib/libqt-mt.so.3
#7  0x40cbb9fb in ~KIconView (this=0x833e530) at kiconview.cpp:88
#8  0x409eb973 in KFileIconView::~KFileIconView() ()
   from /opt/kde/lib/libkio.so.4
#9  0x409fdc49 in KDirOperator::~KDirOperator() ()
   from /opt/kde/lib/libkio.so.4
#10 0x428b19c3 in ~KDevDirOperator (this=0x8316c28)
    at fileselector_widget.moc:396
#11 0x412f3ef8 in QWidget::~QWidget() () from /opt/qt-3.2.1/lib/libqt-mt.so.3
#12 0x428ac8a7 in ~KDevFileSelector (this=0x830ea20)
    at fileselector_widget.cpp:229
#13 0x428a94bd in ~FileSelectorPart (this=0x830f750)
    at fileselector_part.cpp:60
#14 0x40d0049d in QPtrList<QObject>::deleteItem(void*) (this=0x830eb28, 
    d=0x830f750) at qptrlist.h:150
#15 0x41562d0e in QGList::clear() () from /opt/qt-3.2.1/lib/libqt-mt.so.3
#16 0x40d003b3 in QPtrList<QObject>::clear() (this=0x830eb28) at qptrlist.h:93
#17 0x40f0b288 in ~KLibrary (this=0x830eaf0) at klibloader.cpp:136
#18 0x40f0cec8 in KLibLoader::close_pending(KLibWrapPrivate*) (this=0x81fa7c0, 
    wrap=0x830c0e8) at klibloader.cpp:521
#19 0x40f0c385 in ~KLibLoader (this=0x81fa7c0) at klibloader.cpp:338
#20 0x40f0bcee in KLibLoader::cleanUp() () at klibloader.cpp:308
#21 0x40e5f4e9 in ~KApplication (this=0xbffff3b0) at kapplication.cpp:1487
#22 0x0806c46f in main (argc=1, argv=0xbffff534) at main.cpp:128
#23 0x41b13b47 in __libc_start_main () from /lib/libc.so.6
Comment 2 Jens Dagerbo 2003-11-06 19:15:24 UTC
OK, at least it has nothing to do with the FileSelector. Running without it, or even without any project loaded results in the same problem - KDevelop closes.

The reported crash comes, as seen in the backtrace, while KDevelop is closing down (and without a project, I didn't get a crash from this) but _why_ are we closing down?

I'm beginning to suspect the problem lies with QEditor. Changing component.
Comment 3 Jens Dagerbo 2003-11-06 20:31:50 UTC
Yes, it is QEditor, the same thing happens with the replace dialog.

The reason KDevelop closes is one consequtive call too many to kapp->exit_loop().

Will try to fix it later tonight.
Comment 4 Jens Dagerbo 2003-11-06 22:19:41 UTC
Subject: kdevelop/editors/qeditor

CVS commit by dagerbo: 

If there is already a find or replace in progress when a new is started, close the first.

CCMAIL: 60770-done@bugs.kde.org


  M +11 -1     qeditor_view.cpp   1.48


--- kdevelop/editors/qeditor/qeditor_view.cpp  #1.47:1.48
@@ -477,4 +477,9 @@ void QEditorView::doFind()
     if( m_findDialog->exec() ){
         m_options = m_findDialog->options();
+                if ( m_find )
+                {
+                        m_find->abort();
+                        delete m_find;
+                }
         m_find = new KoFind( m_findDialog->pattern(), m_findDialog->options() );
         connect( m_find, SIGNAL(highlight(const QString&,int,int,const QRect&)),
@@ -492,4 +497,9 @@ void QEditorView::doReplace()
     if( m_replaceDialog->exec() ){
         m_options = m_replaceDialog->options();
+                if ( m_replace )
+                {
+                        m_replace->abort();
+                        delete m_replace;
+                }
         m_replace = new KoReplace( m_replaceDialog->pattern(), m_replaceDialog->replacement(),
                                    m_replaceDialog->options() );


Comment 5 Jens Dagerbo 2003-11-07 00:52:06 UTC
*** Bug 60510 has been marked as a duplicate of this bug. ***
Comment 6 Jens Dagerbo 2003-11-07 00:52:53 UTC
*** Bug 61079 has been marked as a duplicate of this bug. ***