Summary: | Konsole and other KDE Apps Crash during KWindowSystemPrivateX11::viewportToDesktop | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kwindowsystem | Reporter: | matt |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | kdelibs-bugs, matt, st.vater |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
New crash information added by DrKonqi |
Description
matt
2015-06-23 01:37:25 UTC
Created attachment 93315 [details]
New crash information added by DrKonqi
konsole (15.04.0) using Qt 5.4.1
- What I was doing when the application crashed:
Just before this, I unplugged two external monitors. During the regeneration of the screen, Konsole crashed. It does this frequently, particularly when monitor readjustment occurs. Probably why it often seems to happen when resuming from sleep.
-- Backtrace (Reduced):
#6 KWindowSystemPrivateX11::viewportToDesktop (this=0x22eb560, p=...) at ../../src/kwindowsystem_x11.cpp:1103
#7 0x00007f667fe3e728 in KWindowSystemPrivateX11::currentDesktop (this=0x22eb560) at ../../src/kwindowsystem_x11.cpp:486
#8 0x00007f667fe3ce4a in NETEventFilter::nativeEventFilter (this=0x242b6b0, ev=0x7f66680070b0) at ../../src/kwindowsystem_x11.cpp:194
#9 0x00007f667d2f5510 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
[...]
#12 0x00007f667d32a73a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
Created attachment 93335 [details]
New crash information added by DrKonqi
konsole (15.04.0) using Qt 5.4.1
- What I was doing when the application crashed:
I suspended the laptop, then resumed. This happens almost every time I suspend/resume. This time I was running in Unity, but the same happens when running within KDE.
-- Backtrace (Reduced):
#6 KWindowSystemPrivateX11::viewportToDesktop (this=0x1a04990, p=...) at ../../src/kwindowsystem_x11.cpp:1103
#7 0x00007fd7baf0f728 in KWindowSystemPrivateX11::currentDesktop (this=0x1a04990) at ../../src/kwindowsystem_x11.cpp:486
#8 0x00007fd7baf0de4a in NETEventFilter::nativeEventFilter (this=0x18ce930, ev=0x7fd7a0007370) at ../../src/kwindowsystem_x11.cpp:194
#9 0x00007fd7b83c6510 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
[...]
#12 0x00007fd7b83fb73a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
This also happens on my machine with OpenSUSE Tumbleweed, KDE Applications 15.08, Frameworks 15.12. Very annoying! I do not know how to add additional information, since I only observe that konsole has gone after resume. It seems that Konsole is not the only app that crashes upon suspend/resume (and sometimes plugging in or unplugging external monitors). kwin_x11 and plasmashell also crash during these events. None of them crash all the time, but it's clearly tied to these events. It seems like the renegotiating of desktop space or display configuration is causing the apps to crash. Could it be that some resource is temporarily unavailable that these apps are trying to talk to? KDE does take a long time to reorient when monitors are plugged/unplugged. It's possible this is some sort of race condition during the reconfiguring of desktop space (which would make sense to also happen during suspend/resume). What's going on at this point to cause the crashes? #6 KWindowSystemPrivateX11::viewportToDesktop (this=0x22eb560, p=...) at ../../src/kwindowsystem_x11.cpp:1103 Help? Assuming "apt-get source kwindowsystem" gave me the right source, the crash is happening here: int KWindowSystemPrivateX11::viewportToDesktop(const QPoint &p) { init(INFO_BASIC); NETEventFilter *const s_d = s_d_func(); NETSize s = s_d->desktopGeometry(); QSize vs = qApp->desktop()->size(); ///// RIGHT HERE int xs = s.width / vs.width(); /////// ^^^^^^^^ int x = p.x() < 0 ? 0 : p.x() >= s.width ? xs - 1 : p.x() / vs.width(); int ys = s.height / vs.height(); int y = p.y() < 0 ? 0 : p.y() >= s.height ? ys - 1 : p.y() / vs.height(); return y * xs + x + 1; } If by chance this is being called while vs.width() returns 0 (which seems a possibility while the system is resuming from sleep or renegotiating Desktop size with multiple monitors), this would cause a Floating point exception as indicated by DrKonqi. Help please? I'm new to the codebase. When would vs.width() return 0? Perhaps while an object (possibly qApp-desktop() ? ) is being initialized/setup with real values? Perhaps in an exception mode where 0 is returned? I'm able to reproduce this reliably on my box. * start i3wm * start konsole in scratchpad * with konsole displayed, from konsole tab, call # xrandr --output eDP1 --off; sleep 3; xrandr --output eDP1 --auto (turning off/on my only display) The crash does not happen when konsole is in tiling or floating mode (not in scratchpad mode) Core was generated by `konsole -name konsole_scratchpad'. Program terminated with signal SIGFPE, Arithmetic exception. #0 KWindowSystemPrivateX11::viewportToDesktop (this=0x19da3c0, p=...) at /var/tmp/portage/kde-frameworks/kwindowsystem-5.15.0/work/kwindowsystem-5.15.0/src/platforms/xcb/kwindowsystem.cpp:1095 1095 /var/tmp/portage/kde-frameworks/kwindowsystem-5.15.0/work/kwindowsystem-5.15.0/src/platforms/xcb/kwindowsystem.cpp: No such file or directory. [Current thread is 1 (Thread 0x7f1d1d3687c0 (LWP 6450))] (gdb) bt #0 KWindowSystemPrivateX11::viewportToDesktop (this=0x19da3c0, p=...) at /var/tmp/portage/kde-frameworks/kwindowsystem-5.15.0/work/kwindowsystem-5.15.0/src/platforms/xcb/kwindowsystem.cpp:1095 #1 0x00007f1d0a9c2ec8 in KWindowSystemPrivateX11::currentDesktop (this=0x19da3c0) at /var/tmp/portage/kde-frameworks/kwindowsystem-5.15.0/work/kwindowsystem-5.15.0/src/platforms/xcb/kwindowsystem.cpp:486 #2 0x00007f1d0a9c0e6c in NETEventFilter::nativeEventFilter (this=0x1a20540, ev=0x7f1d04005280) at /var/tmp/portage/kde-frameworks/kwindowsystem-5.15.0/work/kwindowsystem-5.15.0/src/platforms/xcb/kwindowsystem.cpp:194 #3 0x00007f1d19a7994c in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7f1d04005280, result=result@entry=0x7ffd60c6fb18) at kernel/qabstracteventdispatcher.cpp:460 #4 0x00007f1d0ccec7a5 in QXcbConnection::handleXcbEvent (this=this@entry=0x19a5960, event=event@entry=0x7f1d04005280) at qxcbconnection.cpp:1020 #5 0x00007f1d0ccee8cb in QXcbConnection::processXcbEvents (this=0x19a5960) at qxcbconnection.cpp:1502 #6 0x00007f1d19aa4e9a in QObject::event (this=0x19a5960, e=<optimized out>) at kernel/qobject.cpp:1239 #7 0x00007f1d1a2cd69c in QApplicationPrivate::notify_helper (this=this@entry=0x199a2e0, receiver=receiver@entry=0x19a5960, e=e@entry=0x7f1d04005490) at kernel/qapplication.cpp:3716 #8 0x00007f1d1a2d2b10 in QApplication::notify (this=0x7ffd60c70270, receiver=0x19a5960, e=0x7f1d04005490) at kernel/qapplication.cpp:3499 #9 0x00007f1d19a7bb9d in QCoreApplication::notifyInternal (this=0x7ffd60c70270, receiver=0x19a5960, event=event@entry=0x7f1d04005490) at kernel/qcoreapplication.cpp:965 #10 0x00007f1d19a7e973 in QCoreApplication::sendEvent (event=0x7f1d04005490, receiver=<optimized out>) at kernel/qcoreapplication.h:224 #11 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1956410) at kernel/qcoreapplication.cpp:1593 #12 0x00007f1d19a7ef38 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451 #13 0x00007f1d19ac9523 in postEventSourceDispatch (s=0x19c80d0) at kernel/qeventdispatcher_glib.cpp:271 #14 0x00007f1d13e558fd in g_main_dispatch (context=0x7f1d04002450) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3122 #15 g_main_context_dispatch (context=context@entry=0x7f1d04002450) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3737 #16 0x00007f1d13e55be0 in g_main_context_iterate (context=context@entry=0x7f1d04002450, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3808 #17 0x00007f1d13e55c8c in g_main_context_iteration (context=0x7f1d04002450, may_block=1) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3869 #18 0x00007f1d19ac9597 in QEventDispatcherGlib::processEvents (this=0x19c4130, flags=...) at kernel/qeventdispatcher_glib.cpp:418 #19 0x00007f1d19a7a7ba in QEventLoop::exec (this=this@entry=0x7ffd60c70130, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #20 0x00007f1d19a81b9c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229 #21 0x00007f1d19da032c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1527 #22 0x00007f1d1a2c92d5 in QApplication::exec () at kernel/qapplication.cpp:2976 #23 0x00007f1d1d1250eb in kdemain (argc=3, argv=0x7ffd60c703b8) at /var/tmp/portage/kde-apps/konsole-15.08.2/work/konsole-15.08.2/src/main.cpp:113 #24 0x00007f1d1cd87630 in __libc_start_main (main=0x400790 <main(int, char**)>, argc=3, argv=0x7ffd60c703b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd60c703a8) at libc-start.c:289 #25 0x00000000004007c9 in _start () If you need any more information, I'll be happy to provide it. still getting this on mine as well. Help? I can't reproduce here but that code has a lot of possible " / 0" issues. I'll try to get more help. I am still able to reproduce this issue. It actually breaks my workflow, so I am heavily interested in getting this fixed. If I can help, please tell me how. I have full debugging symbols on my box. Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone! Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |