Bug 264217

Summary: fsview crashes after porting away from Qt3Support classes
Product: [Applications] konqueror Reporter: Christoph Feck <cfeck>
Component: fsviewAssignee: Josef Weidendorfer <josef.weidendorfer>
Status: RESOLVED FIXED    
Severity: crash CC: Ch.Ehrlicher
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Christoph Feck 2011-01-25 02:59:32 UTC
Version:           SVN (using Devel) 
OS:                Linux

Commit r1214769 causes Konqueror to crash when using the "File Size View" view mode.

Application: Konqueror (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0xb5754710 (LWP 23693))]

Thread 3 (Thread 0xaf6f6b70 (LWP 23696)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5e540b1 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xb6e5f2ef in QProcessManager::run (this=0xb70088d4) at /local/git/Qt/qt/src/corelib/io/qprocess_unix.cpp:245
#3  0xb6d7ace8 in QThreadPrivate::start (arg=0xb70088d4) at /local/git/Qt/qt/src/corelib/thread/qthread_unix.cpp:320
#4  0xb6cf2b25 in start_thread (arg=0xaf6f6b70) at pthread_create.c:297
#5  0xb5e5b46e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xae1d7b70 (LWP 30838)):
#0  0xb59d422b in clock_gettime (clock_id=1, tp=0xae1d6f80) at ../sysdeps/unix/clock_gettime.c:100
#1  0xb6ddc527 in do_gettime (sec=0xae1d6fc8, frac=0xae1d6fc0) at /local/git/Qt/qt/src/corelib/tools/qelapsedtimer_unix.cpp:123
#2  0xb6ddc5aa in qt_gettime () at /local/git/Qt/qt/src/corelib/tools/qelapsedtimer_unix.cpp:140
#3  0xb6ebb44b in QTimerInfoList::updateCurrentTime (this=0x8c1339c) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_unix.cpp:339
#4  0xb6ebb7b1 in QTimerInfoList::timerWait (this=0x8c1339c, tm=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_unix.cpp:442
#5  0xb6eb886d in timerSourcePrepareHelper (src=0x8c13368, timeout=0xae1d710c) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:136
#6  0xb6eb89d8 in timerSourcePrepare (source=0x8c13368, timeout=0xae1d710c) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:169
#7  0xb59270c0 in IA__g_main_context_prepare (context=0x921b230, priority=0xae1d717c) at gmain.c:2280
#8  0xb5927f22 in g_main_context_iterate (context=0x921b230, block=1, dispatch=1, self=0x875e0b8) at gmain.c:2571
#9  0xb592860e in IA__g_main_context_iteration (context=0x921b230, may_block=1) at gmain.c:2654
#10 0xb6eb93b8 in QEventDispatcherGlib::processEvents (this=0x8c36740, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:424
#11 0xb6e82ac9 in QEventLoop::processEvents (this=0xae1d7298, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#12 0xb6e82c0d in QEventLoop::exec (this=0xae1d7298, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#13 0xb6d785b3 in QThread::exec (this=0x8b86da8) at /local/git/Qt/qt/src/corelib/thread/qthread.cpp:492
#14 0xb6e640d0 in QInotifyFileSystemWatcherEngine::run (this=0x8b86da8) at /local/git/Qt/qt/src/corelib/io/qfilesystemwatcher_inotify.cpp:248
#15 0xb6d7ace8 in QThreadPrivate::start (arg=0x8b86da8) at /local/git/Qt/qt/src/corelib/thread/qthread_unix.cpp:320
#16 0xb6cf2b25 in start_thread (arg=0xae1d7b70) at pthread_create.c:297
#17 0xb5e5b46e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb5754710 (LWP 23693)):
[KCrash Handler]
#7  0xac94340b in QBasicAtomicInt::ref (this=0x746e6d2f) at /local/qt4/include/QtCore/qatomic_i386.h:120
#8  0xac95e5db in QVector<ScanFile>::QVector (this=0x96fb840, v=...) at /local/qt4/include/QtCore/qvector.h:118
#9  0xac95d8aa in ScanDir::ScanDir (this=0x96fb840) at /local/svn/kde/trunk/KDE/kdebase/apps/konq-plugins/fsview/scan.h:158
#10 0xac95e510 in QVector<ScanDir>::realloc (this=0x8b87e24, asize=44, aalloc=67) at /local/qt4/include/QtCore/qvector.h:504
#11 0xac95da18 in QVector<ScanDir>::append (this=0x8b87e24, t=...) at /local/qt4/include/QtCore/qvector.h:549
#12 0xac95cb87 in ScanDir::scan (this=0x8b87e20, si=0x8c0d130, list=..., data=3) at /local/svn/kde/trunk/KDE/kdebase/apps/konq-plugins/fsview/scan.cpp:259
#13 0xac95c21c in ScanManager::scan (this=0x861aa74, data=3) at /local/svn/kde/trunk/KDE/kdebase/apps/konq-plugins/fsview/scan.cpp:108
#14 0xac95a708 in FSView::doUpdate (this=0x861a9c8) at /local/svn/kde/trunk/KDE/kdebase/apps/konq-plugins/fsview/fsview.cpp:485
#15 0xac95af78 in FSView::qt_metacall (this=0x861a9c8, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x84f3c78) at /local/build/KDE/kdebase/apps/konq-plugins/fsview/fsview.moc:95
#16 0xb6e8c416 in QMetaObject::metacall (object=0x861a9c8, cl=QMetaObject::InvokeMetaMethod, idx=47, argv=0x84f3c78) at /local/git/Qt/qt/src/corelib/kernel/qmetaobject.cpp:237
#17 0xb6e9a475 in QMetaCallEvent::placeMetaCall (this=0x8b61d10, object=0x861a9c8) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:535
#18 0xb6e9b54b in QObject::event (this=0x861a9c8, e=0x8b61d10) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:1217
#19 0xb626b743 in QWidget::event (this=0x861a9c8, event=0x8b61d10) at /local/git/Qt/qt/src/gui/kernel/qwidget.cpp:8714
#20 0xac94cc07 in TreeMapWidget::event (this=0x861a9c8, event=0x8b61d10) at /local/svn/kde/trunk/KDE/kdebase/apps/konq-plugins/fsview/treemap.cpp:2170
#21 0xb620a26a in QApplicationPrivate::notify_helper (this=0x80f2930, receiver=0x861a9c8, e=0x8b61d10) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:4462
#22 0xb6209f9f in QApplication::notify (this=0xbfb5a918, receiver=0x861a9c8, e=0x8b61d10) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:4427
#23 0xb766673e in KApplication::notify (this=0xbfb5a918, receiver=0x861a9c8, event=0x8b61d10) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#24 0xb6e84d6b in QCoreApplication::notifyInternal (this=0xbfb5a918, receiver=0x861a9c8, event=0x8b61d10) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:731
#25 0xb6e8866d in QCoreApplication::sendEvent (receiver=0x861a9c8, event=0x8b61d10) at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:215
#26 0xb6e85e04 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x805bd60) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1372
#27 0xb6e85ac1 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1265
#28 0xb6eb9a70 in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:220
#29 0xb6eb8bd2 in postEventSourceDispatch (s=0x80f4b20) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#30 0xb5927b49 in g_main_dispatch (context=0x80f4a98) at gmain.c:1960
#31 IA__g_main_context_dispatch (context=0x80f4a98) at gmain.c:2513
#32 0xb5928350 in g_main_context_iterate (context=0x80f4a98, block=1, dispatch=1, self=0x80f2a48) at gmain.c:2591
#33 0xb592860e in IA__g_main_context_iteration (context=0x80f4a98, may_block=1) at gmain.c:2654
#34 0xb6eb9398 in QEventDispatcherGlib::processEvents (this=0x80f2a78, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:422
#35 0xb62d30a0 in QGuiEventDispatcherGlib::processEvents (this=0x80f2a78, flags=...) at /local/git/Qt/qt/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#36 0xb6e82ac9 in QEventLoop::processEvents (this=0xbfb5a80c, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#37 0xb6e82c0d in QEventLoop::exec (this=0xbfb5a80c, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#38 0xb6e85456 in QCoreApplication::exec () at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1008
#39 0xb6207798 in QApplication::exec () at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3736
#40 0xb1e9453a in kdemain (argc=2, argv=0x80b8be8) at /local/svn/kde/trunk/KDE/kdebase/apps/konqueror/src/konqmain.cpp:227
#41 0x0804de40 in launch (argc=2, _name=0x80a7a84 "/local/kde4/bin/konqueror", args=0x80a7aa7 "", cwd=0x0, envc=0, envs=0x80a7aab "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=
    0x80a7aaf "duo;1295845006;750215;29576_TIME872829234") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:730
#42 0x0804eed5 in handle_launcher_request (sock=7, who=0x8053378 "launcher") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1222
#43 0x0804f616 in handle_requests (waitForPid=0) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1415
#44 0x08050f38 in main (argc=1, argv=0xbfb5b164, envp=0xbfb5b16c) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1903


Reproducible: Always
Comment 1 Christian Ehrlicher 2011-01-25 18:03:40 UTC
SVN commit 1217079 by chehrlic:

- make sure to not realloc ScanDirVector to avoid a dangling pointer in ScanItem which can lead to a crash
- added some const + QLatin1Char

BUG: 264217

 M  +9 -9      scan.cpp  
 M  +2 -2      scan.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1217079