Bug 407829

Summary: kdiff3 1.8.1 crash during scroll when comparing directories
Product: [Applications] kdiff3 Reporter: Vitaly Yermolchyk <yermolchyk>
Component: applicationAssignee: michael <reeves.87>
Status: RESOLVED FIXED    
Severity: crash CC: aaronw, grosser.meister.morti
Priority: NOR    
Version: 1.8.x   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 1.8.2

Description Vitaly Yermolchyk 2019-05-22 13:02:14 UTC
SUMMARY
kdiff3 1.8.1 release crash when I scroll to beginning or end of file list comparing any two directories.

STEPS TO REPRODUCE
I)
1. kdiff3 dir1 dir2
2. Scroll using mouse wheel or keyboard over list of files
or
II)
1. kdiff3 dir1 dir2
2. Select first file in the list
3. Press up arrow key


OBSERVED RESULT
Segmentation fault.

EXPECTED RESULT
Just stop scrolling at the end of list.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE Leap 15.1
KDE Plasma Version: 5.14.4-lp151.1.1
KDE Frameworks Version: 5.55.0-lp151.1.1
Qt Version: 5.9.7-lp151.3.1

ADDITIONAL INFORMATION
I)
Thread 1 (Thread 0x7f8025b09440 (LWP 5719)):
[KCrash Handler]
#6  0x00007f802342fba0 in QAbstractSlider::value() const () from /usr/lib64/libQt5Widgets.so.5
#7  0x000056133b8be87b in ?? ()
#8  0x00007f8023379be8 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#9  0x00007f802333b3dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f80233446c7 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007f80225918d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5

II)
Thread 1 (Thread 0x7f314c839440 (LWP 19115)):
[KCrash Handler]
#6  0x00007f314a15fba0 in QAbstractSlider::value() const () from /usr/lib64/libQt5Widgets.so.5
#7  0x000056475209185b in KDiff3App::scrollDiffTextWindow(int, int) ()
#8  0x00007f314a0aa417 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#9  0x00007f314a06b3dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f314a0741e2 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007f31492c18d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
Comment 1 michael 2019-07-04 01:08:02 UTC
Git commit 6fd52582694f5616df3ec135fe22f21fc281036d by Michael Reeves.
Committed on 04/07/2019 at 01:07.
Pushed by mreeves into branch '1.8'.

Don't try to set value unless scrollbar exists.

Mouse or key events can be sent before the scrollbars are setup properly.
FIXED-IN:1.8.2

M  +2    -2    src/kdiff3.h
M  +14   -6    src/pdiff.cpp

https://commits.kde.org/kdiff3/6fd52582694f5616df3ec135fe22f21fc281036d
Comment 2 michael 2019-07-08 00:58:27 UTC
Git commit 5a0ddef2b06164c1f7ea423dcd314975d9172a03 by Michael Reeves.
Committed on 05/07/2019 at 16:23.
Pushed by mreeves into branch 'master'.

Don't try to set value unless scrollbar exists.

Mouse or key events can be sent before the scrollbars are setup properly.
FIXED-IN:1.8.2

M  +2    -2    src/kdiff3.h
M  +14   -6    src/pdiff.cpp

https://commits.kde.org/kdiff3/5a0ddef2b06164c1f7ea423dcd314975d9172a03
Comment 3 michael 2020-02-17 00:37:21 UTC
*** Bug 417681 has been marked as a duplicate of this bug. ***