https://bugs.kde.org/show_bug.cgi?id=411586

            Bug ID: 411586
           Summary: Segfault in OptionDialog::slotApply().
           Product: kdiff3
           Version: 1.8.x
          Platform: Neon Packages
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: application
          Assignee: reeves...@gmail.com
          Reporter: bugmenot....@gmail.com
  Target Milestone: ---

SUMMARY
I simply compiled kdiff3 from the github repo then run it after running make
install. It just crashes regardless if it is called with arguments or not. I
even tried updating the whole system to see if it could be the cause.

STEPS TO REPRODUCE
1. Checkout the github repo at commit a8ff3b1997fb81a2af4c757c8d6e2fc43969519d
2. Compile.
3. make install
3. Run the program.

OBSERVED RESULT
Segmentation fault.


EXPECTED RESULT
The program runs.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION:
To be honest, I think the commit a8ff3b1997fb81a2af4c757c8d6e2fc43969519d is
the commit that causes this problem since reverting it seem to resolve the
problem.

Running in valgrind --tool=memcheck
$ valgrind --tool=memcheck ./src/kdiff3
==21322== Memcheck, a memory error detector
==21322== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==21322== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==21322== Command: ./src/kdiff3
==21322== 
==21322== Invalid read of size 8
==21322==    at 0x6FC2810: QWidgetLineControl::internalSetText(QString const&,
int, bool) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.12.3)
==21322==    by 0x6FB99CB: QLineEdit::setText(QString const&) (in
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.12.3)
==21322==    by 0x1BDAC6: OptionIntEdit::apply() (optiondialog.cpp:262)
==21322==    by 0x1BA76E: OptionDialog::slotApply() (optiondialog.cpp:1578)
==21322==    by 0x1B015B: OptionDialog::OptionDialog(bool, QWidget*)
(optiondialog.cpp:515)
==21322==    by 0x15544C: KDiff3App::KDiff3App(QWidget*, QString const&,
KDiff3Part*) (kdiff3.cpp:164)
==21322==    by 0x1516CA: KDiff3Part::KDiff3Part(QWidget*, QObject*,
QList<QVariant> const&) (kdiff3_part.cpp:64)
==21322==    by 0x14F755: KDiff3Shell::KDiff3Shell(bool) (kdiff3_shell.cpp:54)
==21322==    by 0x14DAC2: main (main.cpp:171)
==21322==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21322== 
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kdiff3 path = /home/tayo-tayo/mark/kdiff3/build/src
pid = 21322
KCrash: Arguments: /home/tayo-tayo/mark/kdiff3/build/src/kdiff3 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from
kdeinit
sock_file=/run/user/1000/kdeinit5__0

Output from the KDE crash handler
Application: KDiff3 (kdiff3), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f8c3826f800 (LWP 20975))]

Thread 3 (Thread 0x7f8c1dbfc700 (LWP 20977)):
#0  0x00007f8c3404ebf9 in __GI___poll (fds=0x7f8c18004db0, nfds=1, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8c2e5035c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8c2e5036dc in g_main_context_iteration () from
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8c34d2fdcb in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f8c34cd103a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8c34af84ca in QThread::exec() () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f8c328a0015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f8c34af9c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f8c315cf6db in start_thread (arg=0x7f8c1dbfc700) at
pthread_create.c:463
#9  0x00007f8c3405b88f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f8c26854700 (LWP 20976)):
#0  0x00007f8c3404ebf9 in __GI___poll (fds=0x7f8c26853ca8, nfds=1, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8c2de48747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f8c2de4a36a in xcb_wait_for_event () from
/usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f8c2963b578 in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f8c34af9c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8c315cf6db in start_thread (arg=0x7f8c26854700) at
pthread_create.c:463
#6  0x00007f8c3405b88f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f8c3826f800 (LWP 20975)):
[KCrash Handler]
#6  0x00007f8c35c11810 in QWidgetLineControl::internalSetText(QString const&,
int, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007f8c35c089cc in QLineEdit::setText(QString const&) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x000055f3ce7afac7 in OptionIntEdit::apply (this=0x55f3cf999eb0) at
/home/tayo-tayo/mark/kdiff3/src/optiondialog.cpp:262
#9  0x000055f3ce7ac76f in OptionDialog::slotApply (this=0x55f3cf98ddc0) at
/home/tayo-tayo/mark/kdiff3/src/optiondialog.cpp:1578
#10 0x000055f3ce7a215c in OptionDialog::OptionDialog (this=0x55f3cf98ddc0,
bShowDirMergeSettings=true, parent=0x55f3cfa92b70) at
/home/tayo-tayo/mark/kdiff3/src/optiondialog.cpp:515
#11 0x000055f3ce74744d in KDiff3App::KDiff3App (this=0x55f3cfa92b70,
pParent=0x55f3cf8c1cb0, name=..., pKDiff3Part=0x55f3cf9f98e0) at
/home/tayo-tayo/mark/kdiff3/src/kdiff3.cpp:164
#12 0x000055f3ce7436cb in KDiff3Part::KDiff3Part (this=0x55f3cf9f98e0,
parentWidget=0x55f3cf8c1cb0, parent=0x55f3cf8c1cb0, args=...,
__in_chrg=<optimized out>, __vtt_parm=<optimized out>) at
/home/tayo-tayo/mark/kdiff3/src/kdiff3_part.cpp:64
#13 0x000055f3ce741756 in KDiff3Shell::KDiff3Shell (this=0x55f3cf8c1cb0,
bCompleteInit=true, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at
/home/tayo-tayo/mark/kdiff3/src/kdiff3_shell.cpp:54
#14 0x000055f3ce73fac3 in main (argc=1, argv=0x7ffd9f4acec8) at
/home/tayo-tayo/mark/kdiff3/src/main.cpp:171

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to