Bug 420588 - hard crash on "code preview"
Summary: hard crash on "code preview"
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-25 20:00 UTC by Eric
Modified: 2020-04-26 16:04 UTC (History)
1 user (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 Eric 2020-04-25 20:00:51 UTC
SUMMARY

Version 0.7.1


STEPS TO REPRODUCE
1. make "correlation matrix plot" or calculate "descriptive stats" and submit
2. click "Run Again" in the output.html window
3. click on "code preview"
4. move your mouse into the code preview window and crash

Note: It does not crash until you move your mouse into the code preview window.

OBSERVED RESULT

Crash

EXPECTED RESULT

No crash

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: plasma 5 on Fedora 31
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION
Comment 1 Eric 2020-04-25 22:20:56 UTC
On a different linux box running Ubuntu 20.04, with everything else the same, I cannot reproduce the error.
Comment 2 Thomas Friedrichsmeier 2020-04-26 07:45:02 UTC
Thanks for reporting. One the first machine, the problem _is_ reproducible? Every time?

I assume, you did not get a backtrace? Could you
1. install gdb
2. run "gdb rkward"
3. in the gdb console, enter "start" then "cont"
4. reproduce the problem
5. in the gdb console, enter "thread apply all bt"
6. copy and paste the result into this ticket.

Thanks!
Comment 3 Eric 2020-04-26 13:44:56 UTC
Yes, it is 100% reproducible. Thank you for letting me know what to do. Here is the output from the backtrace...

Thread 9 (Thread 0x7fff933ec700 (LWP 5395)):
#0  0x00007ffff27391bd in syscall () at /lib64/libc.so.6
#1  0x00007ffff2c060c5 in QBasicMutex::lockInternal() () at /lib64/libQt5Core.so.5
#2  0x000055555571a0a1 in QtScriptBackendThread::run() ()
#3  0x00007ffff2c05e26 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#4  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#5  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 8 (Thread 0x7fff93ffd700 (LWP 5394)):
#0  0x00007ffff23f7d45 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff7d8c74a in QTWTF::TCMalloc_PageHeap::scavengerThread() () at /lib64/libQt5Script.so.5
#2  0x00007ffff7d8c76f in  () at /lib64/libQt5Script.so.5
#3  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#4  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7fffd93ff700 (LWP 5391)):
#0  0x00007ffff2733a3f in poll () at /lib64/libc.so.6
#1  0x00007ffff0d2586e in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff0d259a3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff2e0a885 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007ffff2db423b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007ffff2c04cd5 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007ffff2c05e26 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#7  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7fffdb35c700 (LWP 5390)):
#0  0x00007ffff23f7d45 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff2a1d6a0 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /lib64/libstdc++.so.6
#2  0x00007ffff70721f1 in bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() () at /lib64/libQt5WebKit.so.5
#3  0x00007ffff707232f in  () at /lib64/libQt5WebKit.so.5
#4  0x00007ffff2a233d4 in execute_native_thread_routine () at /lib64/libstdc++.so.6
#5  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#6  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7fffe4f4c700 (LWP 5381)):
#0  0x00007ffff2733a3f in poll () at /lib64/libc.so.6
#1  0x00007ffff0d2586e in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff0d259a3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff2e0a885 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007ffff2db423b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007ffff2c04cd5 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x000055555572f93a in RKFrontendTransmitter::run() ()
#7  0x00007ffff2c05e26 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#9  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7fffe574d700 (LWP 5380)):
#0  0x00007ffff23f7d45 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007fffe65d719b in util_queue_thread_func () at /usr/lib64/dri/i965_dri.so
#2  0x00007fffe65d6dab in impl_thrd_routine () at /usr/lib64/dri/i965_dri.so
#3  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#4  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7fffec9f1700 (LWP 5379)):
#0  0x00007ffff2733a3f in poll () at /lib64/libc.so.6
#1  0x00007ffff0d2586e in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff0d259a3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff2e0a885 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007ffff2db423b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007ffff2c04cd5 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007ffff35cff6a in QDBusConnectionManager::run() () at /lib64/libQt5DBus.so.5
#7  0x00007ffff2c05e26 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#9  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fffed737700 (LWP 5378)):
#0  0x00007ffff2733a3f in poll () at /lib64/libc.so.6
#1  0x00007ffff028138a in _xcb_conn_wait () at /lib64/libxcb.so.1
#2  0x00007ffff0282fea in xcb_wait_for_event () at /lib64/libxcb.so.1
#3  0x00007fffed931d48 in QXcbEventQueue::run() () at /lib64/libQt5XcbQpa.so.5
#4  0x00007ffff2c05e26 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#5  0x00007ffff23f14e2 in start_thread () at /lib64/libpthread.so.0
#6  0x00007ffff273e6a3 in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7fffeda7e900 (LWP 5374)):
#0  0x00007ffff3a54ee4 in QTabWidget::indexOf(QWidget*) const () at /lib64/libQt5Widgets.so.5
#1  0x000055555561f0c3 in RKWorkplaceView::showWindow(RKMDIWindow*) ()
#2  0x000055555561c15e in RKMDIWindow::activate(bool) ()
#3  0x000055555561d254 in RKMDIWindow::slotActivateForFocusFollowsMouse() ()
#4  0x00007ffff2ddf97b in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#5  0x00007ffff2dec2c3 in QSingleShotTimer::timerEvent(QTimerEvent*) () at /lib64/libQt5Core.so.5
6  0x00007ffff2de0795 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#7  0x00007ffff387bab6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#8  0x00007ffff3885150 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#9  0x00007ffff2db5448 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#10 0x00007ffff2e09b48 in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
#11 0x00007ffff2e0a3fc in timerSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#12 0x00007ffff0d25570 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#13 0x00007ffff0d25900 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#14 0x00007ffff0d259a3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#15 0x00007ffff2e0a885 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#16 0x00007ffff2db423b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#17 0x00007ffff2dbc116 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#18 0x00005555555e0e17 in main ()
Comment 4 Thomas Friedrichsmeier 2020-04-26 14:18:48 UTC
Git commit f32b83b3cb8a1f9913175f8793ad93321cecd888 by Thomas Friedrichsmeier.
Committed on 26/04/2020 at 14:18.
Pushed by tfry into branch 'master'.

Fix crash when mousing over code-preview-window with focus-follows-mouse enabled.

M  +1    -0    ChangeLog
M  +2    -0    rkward/misc/rkxmlguipreviewarea.cpp
M  +6    -0    rkward/windows/rkworkplace.cpp
M  +4    -0    rkward/windows/rkworkplace.h

https://commits.kde.org/rkward/f32b83b3cb8a1f9913175f8793ad93321cecd888
Comment 5 Thomas Friedrichsmeier 2020-04-26 14:20:49 UTC
Thanks!

With that info the crash was easy to track down, and fixed in the development version. The difference between your two systems is likely that on one you set RKWard to focus-follows-mouse window activation behavior, while you left the other at click to focus (Settings->Configure RKWard->General, bottom of page).
Comment 6 Eric 2020-04-26 16:04:14 UTC
Thank you for fixing this so easily! Indeed, I changed the focus setting and it won't crash if set for click to focus.