Bug 182792 - Kompare crashes on comparing every file pair (Qt4.5)
Summary: Kompare crashes on comparing every file pair (Qt4.5)
Status: RESOLVED FIXED
Alias: None
Product: kompare
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
: 182988 184791 185450 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-01 21:57 UTC by Alexey Chernov
Modified: 2009-03-10 20:48 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
One of files (13.85 KB, text/plain)
2009-02-01 21:59 UTC, Alexey Chernov
Details
Second file (15.00 KB, text/plain)
2009-02-01 21:59 UTC, Alexey Chernov
Details
Valgrind log (--tool=memcheck --num-callers=30) (51.82 KB, application/octet-stream)
2009-02-09 14:58 UTC, Jaroslav Reznik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Chernov 2009-02-01 21:57:54 UTC
Version:            (using KDE 4.2.0)
Compiler:          GCC 4.3.2 Target: x86_64-unknown-linux-gnu Configured with:  ../gcc-4.3.2/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++,fortran,objc,treelang --disable-multilib --enable-c99 --enable-long-long Thread model: posix
OS:                Linux
Installed from:    Compiled From Sources

Compare crashes every time on certain files. Crash report and files will follow.
Comment 1 Alexey Chernov 2009-02-01 21:58:24 UTC
Приложение: Kompare (kompare), сигнал SIGSEGV
Using host libthread_db library "/lib/libthread_db.so.1".
0x00007f303e62e671 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 4886)]

Thread 2 (Thread 0x41e5e950 (LWP 4890)):
#0  0x00007f303e655322 in select () from /lib/libc.so.6
#1  0x00007f303f0fb3f9 in QProcessManager::run (this=0x1615710) at io/qprocess_unix.cpp:300
#2  0x00007f303f008d57 in QThreadPrivate::start (arg=0x1615710) at thread/qthread_unix.cpp:184
#3  0x00007f303ee82297 in start_thread () from /lib/libpthread.so.0
#4  0x00007f303e65b70d in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7f304323f700 (LWP 4886)):
[KCrash Handler]
#5  0x00007f303f13717c in QObjectPrivate::cleanConnectionLists (this=0x0) at kernel/qobject.cpp:301
#6  0x00007f303f13d10a in QMetaObject::activate (sender=0x2312250, from_signal_index=25, to_signal_index=25, argv=0x7fff4b2799e0) at kernel/qobject.cpp:3089
#7  0x00007f303f13e5ad in QMetaObject::activate (sender=0x2312250, m=0x7f3042f5d040, local_signal_index=0, argv=0x7fff4b2799e0) at kernel/qobject.cpp:3127
#8  0x00007f3042d3a5d7 in KompareProcess::diffHasFinished (this=0x2312250, _t1=true) at /usr/src/packages/kde4/4.2.0/kdesdk-4.2.0/build/kompare/libdiff2/kompareprocess.moc:86
#9  0x00007f3042d3a829 in KompareProcess::slotFinished (this=0x2312250, exitCode=1, exitStatus=QProcess::NormalExit)
    at /usr/src/packages/kde4/4.2.0/kdesdk-4.2.0/kompare/libdiff2/kompareprocess.cpp:257
#10 0x00007f3042d3a8bf in KompareProcess::qt_metacall (this=0x2312250, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fff4b279c60)
    at /usr/src/packages/kde4/4.2.0/kdesdk-4.2.0/build/kompare/libdiff2/kompareprocess.moc:74
#11 0x00007f303f13cedc in QMetaObject::activate (sender=0x2312250, from_signal_index=10, to_signal_index=10, argv=0x7fff4b279c60) at kernel/qobject.cpp:3055
#12 0x00007f303f13e5ad in QMetaObject::activate (sender=0x2312250, m=0x7f303f455900, local_signal_index=2, argv=0x7fff4b279c60) at kernel/qobject.cpp:3127
#13 0x00007f303f0b2395 in QProcess::finished (this=0x2312250, _t1=1, _t2=QProcess::NormalExit) at .moc/debug-shared/moc_qprocess.cpp:136
#14 0x00007f303f0b45d7 in QProcessPrivate::_q_processDied (this=0x232a7d0) at io/qprocess.cpp:713
#15 0x00007f303f0b4808 in QProcess::qt_metacall (this=0x2312250, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0x7fff4b279ef0) at .moc/debug-shared/moc_qprocess.cpp:109
#16 0x00007f303f7d5b55 in KProcess::qt_metacall (this=0x2312250, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0x7fff4b279ef0)
    at /usr/src/packages/kde4/4.2.0/kdelibs-4.2.0/build/kdecore/kprocess.moc:63
#17 0x00007f3042d3a855 in KompareProcess::qt_metacall (this=0x2312250, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0x7fff4b279ef0)
    at /usr/src/packages/kde4/4.2.0/kdesdk-4.2.0/build/kompare/libdiff2/kompareprocess.moc:68
#18 0x00007f303f13cedc in QMetaObject::activate (sender=0x2335910, from_signal_index=4, to_signal_index=4, argv=0x7fff4b279ef0) at kernel/qobject.cpp:3055
#19 0x00007f303f13e5ad in QMetaObject::activate (sender=0x2335910, m=0x7f303f458c80, local_signal_index=0, argv=0x7fff4b279ef0) at kernel/qobject.cpp:3127
#20 0x00007f303f187d66 in QSocketNotifier::activated (this=0x2335910, _t1=60) at .moc/debug-shared/moc_qsocketnotifier.cpp:83
#21 0x00007f303f1458bb in QSocketNotifier::event (this=0x2335910, e=0x7fff4b27a750) at kernel/qsocketnotifier.cpp:319
#22 0x00007f303fd54c2d in QApplicationPrivate::notify_helper (this=0x1608960, receiver=0x2335910, e=0x7fff4b27a750) at kernel/qapplication.cpp:3967
#23 0x00007f303fd54f8d in QApplication::notify (this=0x7fff4b27abb0, receiver=0x2335910, e=0x7fff4b27a750) at kernel/qapplication.cpp:3514
#24 0x00007f3040ea1773 in KApplication::notify (this=0x7fff4b27abb0, receiver=0x2335910, event=0x7fff4b27a750) at /usr/src/packages/kde4/4.2.0/kdelibs-4.2.0/kdeui/kernel/kapplication.cpp:307
#25 0x00007f303f12171b in QCoreApplication::notifyInternal (this=0x7fff4b27abb0, receiver=0x2335910, event=0x7fff4b27a750) at kernel/qcoreapplication.cpp:588
#26 0x00007f30420e170d in QCoreApplication::sendEvent () from /usr/lib/libQt3Support.so.4
#27 0x00007f303f15a6fc in socketNotifierSourceDispatch (source=0x16149b0) at kernel/qeventdispatcher_glib.cpp:104
#28 0x00007f303b92a0c1 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00007f303b92d83d in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#30 0x00007f303b92d9fb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0x00007f303f1594ea in QEventDispatcherGlib::processEvents (this=0x15d6230, flags={i = 1260890464}) at kernel/qeventdispatcher_glib.cpp:318
#32 0x00007f303fe1d99b in QGuiEventDispatcherGlib::processEvents (this=0x15d6230, flags={i = 1260890560}) at kernel/qguieventdispatcher_glib.cpp:197
#33 0x00007f303f11ddd7 in QEventLoop::processEvents (this=0x7fff4b27aa90, flags={i = 1260890672}) at kernel/qeventloop.cpp:144
#34 0x00007f303f11dfe6 in QEventLoop::exec (this=0x7fff4b27aa90, flags={i = 1260890784}) at kernel/qeventloop.cpp:195
#35 0x00007f303f122165 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:865
#36 0x00007f303fd5498a in QApplication::exec () at kernel/qapplication.cpp:3442
#37 0x000000000040b4c7 in main (argc=4, argv=0x7fff4b27b618) at /usr/src/packages/kde4/4.2.0/kdesdk-4.2.0/kompare/main.cpp:233

Comment 2 Alexey Chernov 2009-02-01 21:59:11 UTC
Created attachment 30839 [details]
One of files
Comment 3 Alexey Chernov 2009-02-01 21:59:36 UTC
Created attachment 30840 [details]
Second file
Comment 4 Dario Andres 2009-02-03 13:56:19 UTC
Reporter of bug 182988 is experiencing a similar crash with every file pair. Can you reproduce your crash with any files ?
Thanks
Comment 5 Alexey Chernov 2009-02-03 14:00:58 UTC
Yes, that's true, I've test it, it crashes with every random file pair I tried.
Comment 6 Dario Andres 2009-02-03 14:01:43 UTC
*** Bug 182988 has been marked as a duplicate of this bug. ***
Comment 7 Kevin Kofler 2009-02-03 16:49:31 UTC
Is this with Qt 4.5? (I'm asking because Bug 182988 is with Qt 4.5, so if you're also using 4.5 then that's the common point.)
Comment 8 Alexey Chernov 2009-02-03 23:22:17 UTC
Yes, this is for Qt 4.5 beta 1.
Comment 9 Kevin Kofler 2009-02-09 03:28:05 UTC
Can somebody produce a Valgrind log? (I don't have Qt 4.5 yet.)
Comment 10 Jaroslav Reznik 2009-02-09 14:58:01 UTC
Created attachment 31146 [details]
Valgrind log (--tool=memcheck --num-callers=30)

Current qt-copy, valgrind log in attachment, debug log:
kompare(17060) main: Arg Count =  0                                                                            
kompare(17060)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from  "/var/tmp/kdecache-kde-devel/ksycoca4"
kompare(17060)/kdecore (trader) KMimeTypeTrader::query: query for mimeType  "text/x-patch" ,  "Kompare/ViewPart"  : returning  1  offers
kompare(17060)/kompare (shell) KompareShell::KompareShell: One kservicetype checked...                                                  
kompare(17060)/kompare (shell) KompareShell::KompareShell: "Kompare/ViewPart"                                                           
kompare(17060)/kompare (shell) KompareShell::KompareShell: "KParts/ReadWritePart"                                                       
kompare(17060)/kompare (shell) KompareShell::KompareShell: "KParts/ReadOnlyPart"                                                        
kompare(17060)/kompare (shell) KompareShell::KompareShell: "text/x-patch"                                                               
kompare(17060)/kdecore (KLibLoader) findLibraryInternal: plugins should not have a 'lib' prefix: "libkomparepart.so"                    
kompare(17060)/kompare (list view) KompareListView::setSpaces: tabToNumberOfSpaces:  4                                                  
kompare(17060)/kompare (list view) KompareListView::setSpaces: tabToNumberOfSpaces:  4                                                  
kompare(17060)/kparts KParts::ReadWritePart::setModified: ReadWritePart::setModified(  false )                                          
kompare(17060)/kdecore (KLibLoader) findLibraryInternal: plugins should not have a 'lib' prefix: "libkomparenavtreepart.so"             
kompare(17060) KomparePart::setEncoding: Encoding:  "default"                                                                           
kompare(17060) Diff2::KompareModelList::setEncoding: TextCodec:  0x9a09e40                                                              
kompare(17060)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing  "/usr/share/mime/magic"                                   
kompare(17060)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing  "/usr/local/share/mime/magic"                             
kompare(17060)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing  "/home/kde-devel/kde/share/mime/magic"                    
kompare(17060)/kompare (libs) Diff2::KompareModelList::compare: Mimetype source     :  "text/x-csrc"                                    
kompare(17060)/kompare (libs) Diff2::KompareModelList::compare: Mimetype destination:  "text/x-csrc"                                    
kompare(17060)/kompare (libs) Diff2::KompareModelList::compare: Comparing source with destination                                       
kompare(17060)/kompare (nav view) KompareNavTreePart::slotModelsChanged: Models ( 0x0 ) have changed... scanning the models...          
kompare(17060)/kompare (libs) KompareProcess::writeCommandLine: Using the first diff in the path...                                     
kompare(17060)/kompare (libs) KompareProcess::start: ""diff" "-U" "3" "-H" "-d" "-r" "-N" "--" "/home/kde-devel/Documents/articlelistview.cpp" "/home/kde-devel/Documents/articlelistview(2).cpp" "                                                                                                                                                                     
kompare(17060)/kompare (libs) KompareProcess::slotFinished: Exited with exit code :  1                                                                                              
kompare(17060)/kompare (libs) Diff2::KompareModelList::parseDiffOutput: KompareModelList::parseDiffOutput                                                                           
kompare(17060)/kompare (libs) Diff2::Parser::determineGenerator: We'll assume it is a diff Diff                                                                                     
kompare(17060)/kompare (libs) Diff2::Parser::parse: Cleaned up  0  line(s) of crap from the diff...                                                                                 
kompare(17060)/kompare (libs) Diff2::Parser::parse: It is a diff generated diff...                                                                                                  
kompare(17060)/kompare (libs) Diff2::DiffParser::determineFormat: Determining the format of the diff Diff                                                                           
kompare(17060)/kompare (libs) Diff2::DiffParser::determineFormat: "--- /home/kde-devel/Documents/articlelistview.cpp    2009-02-09 14:35:00.000000000 +0100                         
"                                                                                                                                                                                   
kompare(17060)/kompare (libs) Diff2::DiffParser::determineFormat: Difflines are from a Unified diff...                                                                              
kompare(17060)/kompare (libs) Diff2::DiffParser::determineFormat: Determining the format of the diff Diff
kompare(17060)/kompare (libs) Diff2::DiffParser::determineFormat: "--- /home/kde-devel/Documents/articlelistview.cpp    2009-02-09 14:35:00.000000000 +0100
"
kompare(17060)/kompare (libs) Diff2::DiffParser::determineFormat: Difflines are from a Unified diff...
kompare(17060)/kompare (libs) Diff2::DiffModel::splitSourceInPathAndFileName: "/home/kde-devel/Documents/articlelistview.cpp"  was split into  "/home/kde-devel/Documents/"  and  "articlelistview.cpp"
kompare(17060)/kompare (libs) Diff2::DiffModel::splitDestinationInPathAndFileName: "/home/kde-devel/Documents/articlelistview(2).cpp"  was split into  "/home/kde-devel/Documents/" and  "articlelistview(2).cpp"
kompare(17060)/kompare (libs) Diff2::Parser::parse: Modelcount:  1
kompare(17060)/kompare (libs) Diff2::Parser::parse: Hunkcount:   6
kompare(17060)/kompare (libs) Diff2::Parser::parse: Diffcount:   11
kompare(17060)/kompare (libs) Diff2::KompareModelList::firstModel: KompareModelList::firstModel()
kompare(17060)/kompare (libs) Diff2::KompareModelList::firstModel: m_modelIndex =  0
kompare(17060)/kompare (libs) Diff2::KompareModelList::parseDiffOutput: Ok there are differences...
kompare(17060)/kompare (libs) Diff2::DiffModel::firstDifference: DiffModel::firstDifference()
kompare(17060)/kompare (libs) Diff2::DiffModel::firstDifference: m_diffIndex =  0
kompare(17060)/kompare (shell) KompareShell::slotUpdateStatusBar: KompareShell::updateStatusBar()
kompare(17060) Diff2::KompareModelList::slotDiffProcessFinished: Blend this crap please and do not give me any conflicts...
kompare(17060) Diff2::KompareModelList::blendOriginalIntoModelList: Hurrah we are blending...
kompare(17060) Diff2::KompareModelList::blendOriginalIntoModelList: Blend File
kompare(17060)/kompare (libs) Diff2::KompareModelList::blendOriginalIntoModelList: Reading from:  "/home/kde-devel/Documents/articlelistview.cpp"
kompare(17060) Diff2::KompareModelList::readFile: Codec =  0x9a09e40
kompare(17060)/kompare (libs) Diff2::KompareModelList::blendFile: Hunks in hunklist:  6
kompare(17060)/kompare (libs) Diff2::KompareModelList::firstModel: KompareModelList::firstModel()
kompare(17060)/kompare (libs) Diff2::KompareModelList::firstModel: m_modelIndex =  0
kompare(17060)/kompare (libs) Diff2::DiffModel::firstDifference: DiffModel::firstDifference()
kompare(17060)/kompare (libs) Diff2::DiffModel::firstDifference: m_diffIndex =  0
kompare(17060) Diff2::KompareModelList::blendOriginalIntoModelList: End of Blend File
kompare(17060)/kompare (libs) Diff2::KompareModelList::hasPrevModel: KompareModelList::hasPrevModel()
kompare(17060)/kompare (libs) Diff2::KompareModelList::hasNextModel: KompareModelList::hasNextModel()
kompare(17060)/kompare (libs) Diff2::KompareModelList::hasPrevModel: KompareModelList::hasPrevModel()
kompare(17060) Diff2::KompareModelList::show: KompareModelList::Show Number of models =  1
kompare(17060)/kompare (nav view) KompareNavTreePart::slotModelsChanged: Models ( 0x1149d608 ) have changed... scanning the models...
kompare(17060)/kompare (nav view) KompareNavTreePart::buildTreeInMemory: BuildTreeInMemory called
kompare(17060)/kompare (nav view) KompareNavTreePart::buildTreeInMemory: srcPath  =  "/home/kde-devel/Documents/"
kompare(17060)/kompare (nav view) KompareNavTreePart::buildTreeInMemory: destPath =  "/home/kde-devel/Documents/"
kompare(17060)/kompare (nav view) KompareNavTreePart::slotSetSelection: KompareNavTreePart::slotSetSelection model =  Diff2::DiffModel(0x113c61f8) , diff =  0x111db728
kompare(17060)/kompare (nav view) KompareNavTreePart::setSelectedDir: Manually setting selection in srcdirtree with currentDir =  0xf210260
kompare(17060)/kompare (nav view) KompareNavTreePart::setSelectedDir: Manually setting selection in destdirtree with currentDir =  0x110ad860
kompare(17060)/kompare (nav view) KompareNavTreePart::setSelectedFile: Manually setting selection in filelist
kompare(17060)/kompare (nav view) KompareNavTreePart::setSelectedDifference: Manually setting selection in changeslist to  0xf20fb00
kompare(17060)/kompare (list view) KompareListView::slotSetSelection: KompareListView::slotSetSelection( const DiffModel* model, const Difference* diff )
kompare(17060)/kompare (list view) KompareListView::slotSetSelection: KompareListView::slotSetSelection( const Difference* diff )
kompare(17060)/kompare (list view) KompareListView::setSelectedDifference: KompareListView::setSelectedDifference( 0x111db728 ,  true )
kompare(17060)/kompare (list view) KompareListViewDiffItem::setSelected: KompareListViewDiffItem::setSelected(  true  )
kompare(17060)/kompare (list view) KompareListView::slotSetSelection: KompareListView::slotSetSelection( const DiffModel* model, const Difference* diff )
kompare(17060)/kompare (list view) KompareListView::slotSetSelection: KompareListView::slotSetSelection( const Difference* diff )
kompare(17060)/kompare (list view) KompareListView::setSelectedDifference: KompareListView::setSelectedDifference( 0x111db728 ,  true )
kompare(17060)/kompare (list view) KompareListViewDiffItem::setSelected: KompareListViewDiffItem::setSelected(  true  )
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kompare path = <unknown> pid = 17060
Comment 11 Kevin Kofler 2009-02-11 01:43:43 UTC
SVN commit 924539 by kkofler:

Use deleteLater() to delete the process (which is a QObject) from its own slot - should fix the crash with Qt 4.5.
Please test - if the fix works, I'll backport it to 4.2.x.

BUG: 182792

 M  +1 -1      komparemodellist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=924539
Comment 12 Kevin Kofler 2009-02-18 17:02:32 UTC
*** Bug 184791 has been marked as a duplicate of this bug. ***
Comment 13 Kevin Kofler 2009-02-19 01:17:53 UTC
SVN commit 928150 by kkofler:

Mass backport of Kompare bugfixes for KDE 4.2.1 (should not touch any translatable strings): backport revisions 913308, 913309, 922431 (Kompare only), 924527, 924539, 924540, 924880, 924959, 924960, 925266, 926028, 926131, 926143, 926225, 928082 (minus i18n string changes), 928141, 928146 from trunk.
CCBUG: 176804
CCBUG: 169692
CCBUG: 182792
CCBUG: 176797
CCBUG: 175251
CCBUG: 75794
CCBUG: 89781
CCBUG: 145956
CCBUG: 107489
CCBUG: 165421
CCBUG: 174924
CCBUG: 103651
CCBUG: 102800
CCMAIL: bruggie@gmail.com

Bump Kompare version from 3.5.2 to 3.5.3 (trunk is 4.0.0).

Tested on Fedora 9 i386, KDE 4.2.0.

Note: skipped revision 926198 because it introduces a string and #124121 is more a user error than a bug anyway.

 M  +34 -30    kompare_shell.cpp  
 M  +18 -3     komparenavtreepart/komparenavtreepart.cpp  
 M  +15 -12    komparepart/kompare_part.cpp  
 M  +2 -2      komparepart/kompare_part.h  
 M  +9 -6      komparepart/kompareconnectwidget.cpp  
 M  +80 -31    komparepart/komparelistview.cpp  
 M  +26 -5     komparepart/komparelistview.h  
 M  +2 -2      komparepart/kompareprefdlg.cpp  
 M  +4 -1      komparepart/kompareprefdlg.h  
 M  +1 -1      komparepart/komparesplitter.cpp  
 M  +2 -1      libdialogpages/diffpage.cpp  
 M  +4 -3      libdialogpages/diffpage.h  
 M  +14 -4     libdialogpages/filespage.cpp  
 M  +4 -4      libdialogpages/filespage.h  
 M  +10 -8     libdiff2/difference.cpp  
 M  +5 -2      libdiff2/difference.h  
 M  +2 -1      libdiff2/diffhunk.cpp  
 M  +2 -2      libdiff2/diffhunk.h  
 M  +5 -30     libdiff2/diffmodel.cpp  
 M  +3 -6      libdiff2/diffmodel.h  
 M  +1 -1      libdiff2/diffmodellist.cpp  
 M  +4 -2      libdiff2/diffmodellist.h  
 M  +34 -31    libdiff2/komparemodellist.cpp  
 M  +3 -1      libdiff2/komparemodellist.h  
 M  +2 -1      libdiff2/kompareprocess.cpp  
 M  +53 -17    libdiff2/levenshteintable.cpp  
 M  +5 -1      libdiff2/parserbase.cpp  
 M  +21 -26    main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=928150
Comment 14 Kevin Kofler 2009-02-24 17:38:00 UTC
*** Bug 185450 has been marked as a duplicate of this bug. ***
Comment 15 Nadav Kavalerchik 2009-03-10 18:35:24 UTC
seem to be fixed for kde 4.2.1 and qt 4.5 (debian experimental)
Comment 16 Otto Bruggeman 2009-03-10 18:49:24 UTC
If it works then closing as fixed. You can always reopen if there are other cases where Kompare fails.
Comment 17 Kevin Kofler 2009-03-10 20:48:05 UTC
I already closed this. :-) And yes, this is fixed in 4.2.1, see comment #13.