Bug 169692 - unapply difference button is crashing kompare if no difference is applied
Summary: unapply difference button is crashing kompare if no difference is applied
Status: RESOLVED FIXED
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
: 179617 182037 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-23 23:15 UTC by Kushal Das
Modified: 2009-02-19 03:43 UTC (History)
7 users (show)

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 Kushal Das 2008-08-23 23:15:51 UTC
Version:           3.5.1 (using KDE 4.1.0)
OS:                Linux
Installed from:    Fedora RPMs

Without applying any difference if you click on the unapply button twice it will crash kompare
Comment 1 Bram Schoenmakers 2008-08-23 23:34:39 UTC
Can you provide a backtrace of the crash please? Read http://techbase.kde.org/index.php?title=Development/Tutorials/Debugging/How_to_create_useful_crash_reports for more info.
Comment 2 Kushal Das 2008-08-25 08:20:52 UTC
Hope the below helps:


[kdas@d80 ~]$ gdb kompare
GNU gdb Fedora (6.8-17.fc9)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.           
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"   
and "show warranty" for details.                                             
This GDB was configured as "i386-redhat-linux-gnu"...                        
(gdb) run                                                                    
Starting program: /usr/bin/kompare                                           
[Thread debugging using libthread_db enabled]                                
[New Thread 0xb7edc770 (LWP 8671)]                                           
[New Thread 0xb6641b90 (LWP 8674)]                                           
Detaching after fork from child process 8675.                                

Program received signal SIGSEGV, Segmentation fault.
0x0027561d in Diff2::KompareModelList::slotActionUnApplyDifference (this=<value optimized out>)
    at /usr/src/debug/kdesdk-4.1.0/kompare/libdiff2/komparemodellist.cpp:1420                  
1420            if ( m_selectedDifference->applied() )                                         
Missing separate debuginfos, use: debuginfo-install OpenEXR.i386 acl.i386 attr.i386 bzip2.i386 dbus.i386 e2fsprogs.i386 expat.i386 fontconfig.i386 freetype.i386 gamin.i386 gcc.i386 glib2.i386 glibc.i686 ilmbase.i386 jasper.i386 kdebase-runtime.i386 kdelibs.i386 keyutils.i386 krb5.i386 lcms.i386 libICE.i386 libSM.i386 libX11.i386 libXau.i386 libXcursor.i386 libXdmcp.i386 libXext.i386 libXfixes.i386 libXft.i386 libXi.i386 libXinerama.i386 libXpm.i386 libXrandr.i386 libXrender.i386 libXtst.i386 libcap.i386 libjpeg.i386 libmng.i386 libpng.i386 libselinux.i386 libtiff.i386 libxcb.i386 libxml2.i386 openssl.i686 qt.i386 scim-bridge.i386 strigi.i386 zlib.i386                                                   
(gdb) thread apply all bt                                                                                                                     

Thread 2 (Thread 0xb6641b90 (LWP 8674)):
#0  0x00110416 in __kernel_vsyscall ()  
#1  0x00b97671 in select () from /lib/libc.so.6
#2  0x04d94ac7 in ?? () from /usr/lib/libQtCore.so.4
#3  0x04cc5232 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00c6432f in start_thread () from /lib/libpthread.so.0
#5  0x00b9f20e in clone () from /lib/libc.so.6             

Thread 1 (Thread 0xb7edc770 (LWP 8671)):
#0  0x0027561d in Diff2::KompareModelList::slotActionUnApplyDifference (this=<value optimized out>)
    at /usr/src/debug/kdesdk-4.1.0/kompare/libdiff2/komparemodellist.cpp:1420                      
#1  0x00279ffd in Diff2::KompareModelList::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>,
    _a=<value optimized out>) at /usr/src/debug/kdesdk-4.1.0/i386-redhat-linux-gnu/kompare/libdiff2/komparemodellist.moc:147
#2  0x04dca3e0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#3  0x04dca7e0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#4  0x052d5031 in QAction::triggered () from /usr/lib/libQtGui.so.4
#5  0x052d599f in QAction::activate () from /usr/lib/libQtGui.so.4
#6  0x056f9432 in QToolButton::nextCheckState () from /usr/lib/libQtGui.so.4
#7  0x0561cd63 in ?? () from /usr/lib/libQtGui.so.4
#8  0x0561d036 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#9  0x056f992c in QToolButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#10 0x053330c2 in QWidget::event () from /usr/lib/libQtGui.so.4
#11 0x0561b05e in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#12 0x056f93f4 in QToolButton::event () from /usr/lib/libQtGui.so.4
#13 0x052db30c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#14 0x052e3b21 in QApplication::notify () from /usr/lib/libQtGui.so.4
#15 0x07422ddd in KApplication::notify () from /usr/lib/libkdeui.so.5
#16 0x04db5731 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#17 0x052e2dae in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
#18 0x0534ce16 in ?? () from /usr/lib/libQtGui.so.4
#19 0x0534c185 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#20 0x053746cc in ?? () from /usr/lib/libQtGui.so.4
#21 0x005aa0d8 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#22 0x005ad783 in ?? () from /lib/libglib-2.0.so.0
#23 0x005ad941 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#24 0x04ddfea8 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#25 0x05373d95 in ?? () from /usr/lib/libQtGui.so.4
#26 0x04db3e1a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#27 0x04db3fda in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#28 0x04db6685 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#29 0x052db187 in QApplication::exec () from /usr/lib/libQtGui.so.4
#30 0x0804fb3d in main (argc=1, argv=0xbfc06604) at /usr/src/debug/kdesdk-4.1.0/kompare/main.cpp:231
Comment 3 Kevin Kofler 2008-08-25 09:55:43 UTC
m_selectedDifference is NULL because no difference has been selected. The "unapply difference" button should be disabled in that case. Apparently KompareModelList::updateModelListActions isn't being called where it's supposed to.
Comment 4 Kushal Das 2008-08-25 10:07:27 UTC
[kdas@d80 ~]$ valgrind kompare
==13149== Memcheck, a memory error detector.
==13149== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==13149== Using LibVEX rev 1804, a library for dynamic binary translation.
==13149== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.       
==13149== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==13149== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.  
==13149== For more details, rerun with: -v                                 
==13149==                                                                  
==13149== Syscall param writev(vector[...]) points to uninitialised byte(s)
==13149==    at 0xB970BC: writev (in /lib/libc-2.8.so)                     
==13149==    by 0x2D735D: (within /usr/lib/libxcb.so.1.0.0)                
==13149==    by 0x2D798D: (within /usr/lib/libxcb.so.1.0.0)                
==13149==    by 0x2D7AB8: (within /usr/lib/libxcb.so.1.0.0)                
==13149==    by 0x2D8BD5: xcb_wait_for_reply (in /usr/lib/libxcb.so.1.0.0) 
==13149==    by 0x7640E40: _XReply (in /usr/lib/libX11.so.6.2.0)           
==13149==    by 0x761DC52: XGetWindowProperty (in /usr/lib/libX11.so.6.2.0)
==13149==    by 0x761CE76: XGetWMHints (in /usr/lib/libX11.so.6.2.0)       
==13149==    by 0x5364546: QWidgetPrivate::setWindowIcon_sys(bool) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x5330C5A: QWidget::create(unsigned long, bool, bool) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x532CBF2: QWidgetPrivate::createWinId(unsigned long) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x532FF2A: QWidgetPrivate::setWindowTitle_helper(QString
const&) (in /usr/lib/libQtGui.so.4.4.1)
==13149==  Address 0x4316b1b is 6,939 bytes inside a block of size 8,556
alloc'd                                
==13149==    at 0x4004BA2: calloc (vg_replace_malloc.c:397)                     
==13149==    by 0x2D7610: xcb_connect_to_fd (in /usr/lib/libxcb.so.1.0.0)       
==13149==    by 0x2DA12E: xcb_connect (in /usr/lib/libxcb.so.1.0.0)             
==13149==    by 0x764033A: _XConnectXCB (in /usr/lib/libX11.so.6.2.0)           
==13149==    by 0x762795E: XOpenDisplay (in /usr/lib/libX11.so.6.2.0)           
==13149==    by 0x534F7AF: (within /usr/lib/libQtGui.so.4.4.1)                  
==13149==    by 0x52DFB68: QApplicationPrivate::construct(_XDisplay*, unsigned
long, unsigned long) (in /usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x52E072A: QApplication::QApplication(int&, char**, bool, int)
(in /usr/lib/libQtGui.so.4.4.1)                     
==13149==    by 0x742649D: KApplication::KApplication(bool) (in
/usr/lib/libkdeui.so.5.1.0)                                        
==13149==    by 0x804FAE2: main (main.cpp:81)                                   
==13149==                                                                       
==13149== Syscall param writev(vector[...]) points to uninitialised byte(s)     
==13149==    at 0xB97138: writev (in /lib/libc-2.8.so)                          
==13149==    by 0x2D735D: (within /usr/lib/libxcb.so.1.0.0)                     
==13149==    by 0x2D798D: (within /usr/lib/libxcb.so.1.0.0)                     
==13149==    by 0x2D7AB8: (within /usr/lib/libxcb.so.1.0.0)                     
==13149==    by 0x2D8BD5: xcb_wait_for_reply (in /usr/lib/libxcb.so.1.0.0)      
==13149==    by 0x7640E40: _XReply (in /usr/lib/libX11.so.6.2.0)                
==13149==    by 0x76341F6: XSync (in /usr/lib/libX11.so.6.2.0)                  
==13149==    by 0x533AF00: QApplication::syncX() (in
/usr/lib/libQtGui.so.4.4.1)                                                   
==13149==    by 0x533EC5C: (within /usr/lib/libQtGui.so.4.4.1)                  
==13149==    by 0x534B5FC: QApplication::x11ProcessEvent(_XEvent*) (in
/usr/lib/libQtGui.so.4.4.1)                                 
==13149==    by 0x53746CB: (within /usr/lib/libQtGui.so.4.4.1)                  
==13149==    by 0x5AA0D7: g_main_context_dispatch (in
/lib/libglib-2.0.so.0.1600.5)                                                
==13149==  Address 0x4316383 is 4,995 bytes inside a block of size 8,556
alloc'd                                                   
==13149==    at 0x4004BA2: calloc (vg_replace_malloc.c:397)                     
==13149==    by 0x2D7610: xcb_connect_to_fd (in /usr/lib/libxcb.so.1.0.0)       
==13149==    by 0x2DA12E: xcb_connect (in /usr/lib/libxcb.so.1.0.0)             
==13149==    by 0x764033A: _XConnectXCB (in /usr/lib/libX11.so.6.2.0)           
==13149==    by 0x762795E: XOpenDisplay (in /usr/lib/libX11.so.6.2.0)           
==13149==    by 0x534F7AF: (within /usr/lib/libQtGui.so.4.4.1)                  
==13149==    by 0x52DFB68: QApplicationPrivate::construct(_XDisplay*, unsigned
long, unsigned long) (in /usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x52E072A: QApplication::QApplication(int&, char**, bool, int)
(in /usr/lib/libQtGui.so.4.4.1)                     
==13149==    by 0x742649D: KApplication::KApplication(bool) (in
/usr/lib/libkdeui.so.5.1.0)                                        
==13149==    by 0x804FAE2: main (main.cpp:81)
==13149==
==13149== Invalid read of size 1
==13149==    at 0x27561D: Diff2::KompareModelList::compareDirs(QString const&,
QString const&) (komparemodellist.cpp:212)
==13149==    by 0x279FFC:
Diff2::KompareModelList::qt_metacall(QMetaObject::Call, int, void**)
(klocalizedstring.h:595)
==13149==    by 0x4DCA3DF: QMetaObject::activate(QObject*, int, int, void**)
(in /usr/lib/libQtCore.so.4.4.1)
==13149==    by 0x4DCA7DF: QMetaObject::activate(QObject*, QMetaObject const*,
int, int, void**) (in /usr/lib/libQtCore.so.4.4.1)
==13149==    by 0x52D5030: QAction::triggered(bool) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x52D599E: QAction::activate(QAction::ActionEvent) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x56F9431: QToolButton::nextCheckState() (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x561CD62: (within /usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x561D035: QAbstractButton::mouseReleaseEvent(QMouseEvent*) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x56F992B: QToolButton::mouseReleaseEvent(QMouseEvent*) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x53330C1: QWidget::event(QEvent*) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==    by 0x561B05D: QAbstractButton::event(QEvent*) (in
/usr/lib/libQtGui.so.4.4.1)
==13149==  Address 0x15 is not stack'd, malloc'd or (recently) free'd
KCrash: Application 'kompare' crashing...
sock_file=/home/kdas/.kde/socket-d80/kdeinit4__0
==13149==
==13149== ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 103 from 2)
==13149== malloc/free: in use at exit: 8,398,878 bytes in 62,220 blocks.
==13149== malloc/free: 305,590 allocs, 243,370 frees, 127,119,157 bytes
allocated.
==13149== For counts of detected errors, rerun with: -v
==13149== searching for pointers to 62,220 not-freed blocks.
==13149== checked 40,111,560 bytes.
==13149==
==13149== LEAK SUMMARY:
==13149==    definitely lost: 11,000 bytes in 433 blocks.
==13149==      possibly lost: 29,145 bytes in 1,084 blocks.
==13149==    still reachable: 8,358,733 bytes in 60,703 blocks.
==13149==         suppressed: 0 bytes in 0 blocks.
==13149== Rerun with --leak-check=full to see details of leaked memory.

  
Comment 5 Kevin Kofler 2008-08-25 10:13:32 UTC
"Address 0x15 is not stack'd, malloc'd or (recently) free'd" - that's a NULL pointer indeed (plus the offset 0x15). Valgrind points to a different source line for 0x27561D, but I'd rather believe GDB there (matching binary code to source in C++ is nontrivial), the code address of the offending access matches in any case.
Comment 6 Maciej Mrozowski 2008-12-11 02:01:02 UTC
Crashes using trunk as well. Here's my backtrace:

Application: Kompare (kompare), signal SIGSEGV
0x00007fa65ea8dde1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 13356)]

Thread 2 (Thread 0x7fa656eee950 (LWP 13357)):
#0  0x00007fa65eac4b42 in select () from /lib/libc.so.6
#1  0x00007fa65fc286b9 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fa65fb6fc04 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fa65ddf93da in start_thread () from /lib/libpthread.so.0
#4  0x00007fa65eacc40d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa661c50750 (LWP 13356)):
[KCrash Handler]
#5  0x00007fa657d6c8f4 in Diff2::Difference::applied (this=0x100000001) at /var/tmp/portage/kde-base/kompare-9999/work/kompare/kompare/libdiff2/difference.h:188
#6  0x00007fa657d66b31 in Diff2::KompareModelList::slotActionUnApplyDifference (this=0x210a3d0) at /var/tmp/portage/kde-base/kompare-9999/work/kompare/kompare/libdiff2/komparemodellist.cpp:1433
#7  0x00007fa657d6a324 in Diff2::KompareModelList::qt_metacall (this=0x210a3d0, _c=QMetaObject::InvokeMetaMethod, _id=23, _a=0x7fff69c83840)
    at /var/tmp/portage/kde-base/kompare-9999/work/kompare_build/kompare/libdiff2/komparemodellist.moc:147
#8  0x00007fa65fc57cff in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fa65f1eb685 in QAction::triggered () from /usr/lib64/qt4/libQtGui.so.4
#10 0x00007fa65f1ebcf5 in QAction::activate () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007fa65f4cc54b in ?? () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fa65f4cc76f in QAbstractButton::mouseReleaseEvent () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007fa65f580300 in QToolButton::mouseReleaseEvent () from /usr/lib64/qt4/libQtGui.so.4
#14 0x00007fa65f2398a1 in QWidget::event () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007fa65f1f05d5 in QApplicationPrivate::notify_helper () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007fa65f1f7ef8 in QApplication::notify () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007fa6605caf8e in KApplication::notify (this=0x7fff69c84e90, receiver=0x20b5220, event=0x7fff69c84190)
    at /var/tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/kernel/kapplication.cpp:307
#18 0x00007fa65fc45e55 in QCoreApplication::notifyInternal () from /usr/lib64/qt4/libQtCore.so.4
#19 0x00007fa65f1f699a in QApplicationPrivate::sendMouseEvent () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007fa65f251035 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007fa65f24fba8 in QApplication::x11ProcessEvent () from /usr/lib64/qt4/libQtGui.so.4
#22 0x00007fa65f27288b in ?? () from /usr/lib64/qt4/libQtGui.so.4
#23 0x00007fa65b7e8156 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#24 0x00007fa65b7eb345 in ?? () from /usr/lib/libglib-2.0.so.0
#25 0x00007fa65b7eb557 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#26 0x00007fa65fc69f59 in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00007fa65f272136 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#28 0x00007fa65fc44b04 in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#29 0x00007fa65fc44c82 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4
#30 0x00007fa65fc46bff in QCoreApplication::exec () from /usr/lib64/qt4/libQtCore.so.4
#31 0x000000000040b953 in main (argc=3, argv=0x7fff69c858e8) at /var/tmp/portage/kde-base/kompare-9999/work/kompare/kompare/main.cpp:233

Comment 7 Kevin Kofler 2008-12-11 03:16:27 UTC
> this=0x100000001
Huh? This looks a lot like an invalid address to me.
I'll have to check what's going on there, maybe it's using a vector of ones as a vector of pointers? (That would mean an address of 0x1 on i386, which would be consistent with Kushal's backtraces, and an address of 0x100000001 on x86_64.)
Comment 8 FiNeX 2009-01-04 17:09:39 UTC
*** Bug 179617 has been marked as a duplicate of this bug. ***
Comment 9 Paweł Prażak 2009-01-18 12:24:07 UTC
Steps to reproduce:
1. open two files
2. apply change
3. unapply (you have to do it twice to get change unapplyed - a bug?)
4. apply
it crash

backtrace:

Starting program: /usr/bin/kompare test1.txt test2.txt
(no debugging symbols found)                          
(no debugging symbols found)                          
(no debugging symbols found)                          
(no debugging symbols found)                          
(no debugging symbols found)                          
[Thread debugging using libthread_db enabled]         
[New Thread 0x7fffeba7b950 (LWP 22150)]               

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79c5758 in Diff2::KompareModelList::slotActionApplyDifference() () from /usr/lib64/libkomparediff2.so.4
(gdb) bt full                                                                                                     
#0  0x00007ffff79c5758 in Diff2::KompareModelList::slotActionApplyDifference() () from /usr/lib64/libkomparediff2.so.4
No symbol table info available.                                                                                       
#1  0x00007ffff79ca2ed in Diff2::KompareModelList::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkomparediff2.so.4
No symbol table info available.                                                                                                       
#2  0x00007ffff4468454 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQtCore.so.4                         
No symbol table info available.                                                                                                       
#3  0x00007ffff4f89527 in QAction::triggered(bool) () from /usr/lib64/libQtGui.so.4                                                   
No symbol table info available.                                                                                                       
#4  0x00007ffff4f89cf0 in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQtGui.so.4                                    
No symbol table info available.                                                                                                       
#5  0x00007ffff529a5aa in ?? () from /usr/lib64/libQtGui.so.4                                                                         
No symbol table info available.                                                                                                       
#6  0x00007ffff529a845 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4                           
No symbol table info available.                                                                                                       
#7  0x00007ffff536208a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4                               
No symbol table info available.                                                                                                       
#8  0x00007ffff4fe1799 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4                                                    
No symbol table info available.                                                                                                       
#9  0x00007ffff4f8f1bd in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4                      
No symbol table info available.                                                                                                       
#10 0x00007ffff4f977fa in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4                                    
No symbol table info available.                                                                                                       
#11 0x00007ffff5d5bafb in KApplication::notify (this=0x7fffffffd5e0, receiver=0x6e0d10, event=0x7fffffffc7b0)                         
    at /usr/src/debug/kdelibs-4.1.96/kdeui/kernel/kapplication.cpp:307                                                                
No locals.                                                                                                                            
#12 0x00007ffff4454091 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4                       
No symbol table info available.                                                                                                       
---Type <return> to continue, or q <return> to quit---                                                                                
#13 0x00007ffff4f96b98 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&) ()
   from /usr/lib64/libQtGui.so.4                                                                                                           
No symbol table info available.                                                                                                            
#14 0x00007ffff4ffb049 in ?? () from /usr/lib64/libQtGui.so.4                                                                              
No symbol table info available.                                                                                                            
#15 0x00007ffff4ff9a67 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4                                         
No symbol table info available.                                                                                                            
#16 0x00007ffff5020204 in ?? () from /usr/lib64/libQtGui.so.4                                                                              
No symbol table info available.                                                                                                            
#17 0x00007ffff01de0db in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0                                                      
No symbol table info available.                                                                                                            
#18 0x00007ffff01e18ad in ?? () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#19 0x00007ffff01e1a6b in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#20 0x00007ffff447c4ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
No symbol table info available.
#21 0x00007ffff501f9af in ?? () from /usr/lib64/libQtGui.so.4
No symbol table info available.
#22 0x00007ffff44529a2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
No symbol table info available.
#23 0x00007ffff4452b2d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
No symbol table info available.
#24 0x00007ffff4454ffd in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
No symbol table info available.
#25 0x000000000040a31d in _start ()
No symbol table info available.
Comment 10 Kevin Kofler 2009-01-26 23:31:42 UTC
*** Bug 182037 has been marked as a duplicate of this bug. ***
Comment 11 Otto Bruggeman 2009-02-11 01:24:56 UTC
I submitted a fix to trunk for this, can people try?

svn commit -m "Fixes some stupidity i left in here a couple of years ago, now applying and unapplying a single difference in a single file works the way it should. I think there was a bug in BKO about this."
Sending        kompare/libdiff2/diffmodel.cpp
Sending        kompare/libdiff2/komparemodellist.cpp
Transmitting file data ..
Committed revision 924527.
Comment 12 Kevin Kofler 2009-02-11 01:37:13 UTC
I haven't tried it yet, but from reading your changes I see that your fix to KompareModelList::prevModel also appears to fix one annoyance I was wanting to fix for weeks, but didn't get around to tracking down: moving one diff back from the first diff of a file to the last diff of the previous file did not work.

Good work!
Comment 13 Kevin Kofler 2009-02-19 01:17:42 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-19 03:43:11 UTC
FYI:
> I haven't tried it yet, but from reading your changes I see that your fix to
> KompareModelList::prevModel also appears to fix one annoyance I was wanting to
> fix for weeks, but didn't get around to tracking down: moving one diff back
> from the first diff of a file to the last diff of the previous file did not
> work.
I have verified that this is indeed the case (during my mass backport).

I have also just verified that this bug is indeed fixed, "unapply difference" is now disabled when previously it would crash.