Bug 321708 - Crash when trying to change screen order
Summary: Crash when trying to change screen order
Alias: None
Product: KScreen
Classification: Unclassified
Component: libkscreen (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Alex Fiestas
Depends on:
Reported: 2013-06-28 12:29 UTC by mrmaffen
Modified: 2013-07-25 20:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.1


Note You need to log in before you can comment on or make changes to this bug.
Description mrmaffen 2013-06-28 12:29:25 UTC
Application: systemsettings (1.0)
KDE Platform Version: 4.10.3
Qt Version: 4.8.4
Operating System: Linux 3.8.0-25-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
- What I was doing when the application crashed:

Just before the crash occurred, I switched from a 1280/800 display to my main Samsung SyncMaster T240 (1920/1200). I noticed that the resolution didn't adapt. The Samsung monitor was still showing a resolution of 1280/800. So I wanted to switch the resolution manually. Firstly I tried to change the screen order, because that also wasn't right. After doing so and applying, the application crashed.
Now everytime I repeat this, the application crashes again and again.

- Custom settings of the application:

I've noticed before, that there is some bug happening with the Samsung Syncmaster T240 and Kubuntu. From what I could gather from different forum posts, the monitor doesn't appear to be reporting the right "density" or something similar. So on first launch of Kubuntu with the Samsung as my only monitor, I had to fix the font sizes, because they were showing as way too big. Or rather force the font sizes to the standard level.
So one could assume that this faulty "density" reporting could also affect other data.

The crash can be reproduced every time.

-- Backtrace:
Application: Systemeinstellungen (systemsettings), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f109a1037c0 (LWP 3621))]

Thread 3 (Thread 0x7f107b32f700 (LWP 3622)):
#0  0x00007f10906130ca in __GI___pthread_mutex_lock (mutex=0x7f1074000a80) at pthread_mutex_lock.c:116
#1  0x00007f109017d5c1 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f109013d34e in g_main_context_acquire () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f109013e0b4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f109013e304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f1097891036 in QEventDispatcherGlib::processEvents (this=0x7f10740008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007f109786138f in QEventLoop::processEvents (this=this@entry=0x7f107b32ed90, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f1097861618 in QEventLoop::exec (this=this@entry=0x7f107b32ed90, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f1097763410 in QThread::exec (this=this@entry=0x2a81990) at thread/qthread.cpp:542
#9  0x00007f1097842edf in QInotifyFileSystemWatcherEngine::run (this=0x2a81990) at io/qfilesystemwatcher_inotify.cpp:256
#10 0x00007f1097765bec in QThreadPrivate::start (arg=0x2a81990) at thread/qthread_unix.cpp:338
#11 0x00007f1090610f8e in start_thread (arg=0x7f107b32f700) at pthread_create.c:311
#12 0x00007f1097118e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7f107a4eb700 (LWP 3676)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f10949d9e77 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f10949d9ea9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f1090610f8e in start_thread (arg=0x7f107a4eb700) at pthread_create.c:311
#4  0x00007f1097118e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f109a1037c0 (LWP 3621)):
[KCrash Handler]
#6  KScreen::Mode::size (this=0x0) at /build/buildd/libkscreen-0.0.92/src/mode.cpp:83
#7  0x00007f107a4f6719 in XRandRConfig::applyKScreenConfig (this=0x2aa6600, config=0x2ae2c60) at /build/buildd/libkscreen-0.0.92/backends/xrandr/xrandrconfig.cpp:164
#8  0x00007f107a707fd5 in KScreen::Config::setConfig (config=0x2ae2c60) at /build/buildd/libkscreen-0.0.92/src/config.cpp:66
#9  0x00007f107a91f409 in KCMKScreen::save (this=0x2aa79d0) at /build/buildd/kscreen-0.0.92/kcm/src/kcm_kscreen.cpp:213
#10 0x00007f1099825807 in KCModuleProxy::save (this=<optimized out>) at ../../kutils/kcmoduleproxy.cpp:279
#11 0x00007f10995fd5b3 in ModuleView::moduleSave (this=<optimized out>, module=<optimized out>) at ../../../systemsettings/core/ModuleView.cpp:289
#12 0x00007f10995ff0da in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at ./ModuleView.moc:72
#13 ModuleView::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./ModuleView.moc:61
#14 0x00007f10978770ef in QMetaObject::activate (sender=sender@entry=0x296f720, m=m@entry=0x7f1098f91ca0 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fff8495ad10) at kernel/qobject.cpp:3539
#15 0x00007f1098b31c82 in QAbstractButton::clicked (this=this@entry=0x296f720, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#16 0x00007f109888523e in QAbstractButtonPrivate::emitClicked (this=this@entry=0x2971b30) at widgets/qabstractbutton.cpp:548
#17 0x00007f1098885a30 in QAbstractButtonPrivate::click (this=this@entry=0x2971b30) at widgets/qabstractbutton.cpp:541
#18 0x00007f1098885c9c in QAbstractButton::mouseReleaseEvent (this=0x296f720, e=0x7fff8495b5b0) at widgets/qabstractbutton.cpp:1123
#19 0x00007f1098513a89 in QWidget::event (this=0x296f720, event=0x7fff8495b5b0) at kernel/qwidget.cpp:8375
#20 0x00007f10984c68ec in QApplicationPrivate::notify_helper (this=this@entry=0x25a1ae0, receiver=receiver@entry=0x296f720, e=e@entry=0x7fff8495b5b0) at kernel/qapplication.cpp:4567
#21 0x00007f10984c9a33 in QApplication::notify (this=this@entry=0x7fff8495c220, receiver=receiver@entry=0x296f720, e=e@entry=0x7fff8495b5b0) at kernel/qapplication.cpp:4110
#22 0x00007f10991d3af6 in KApplication::notify (this=0x7fff8495c220, receiver=0x296f720, event=0x7fff8495b5b0) at ../../kdeui/kernel/kapplication.cpp:311
#23 0x00007f109786263e in QCoreApplication::notifyInternal (this=0x7fff8495c220, receiver=receiver@entry=0x296f720, event=event@entry=0x7fff8495b5b0) at kernel/qcoreapplication.cpp:946
#24 0x00007f10984cc933 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#25 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x296f720, event=event@entry=0x7fff8495b5b0, alienWidget=alienWidget@entry=0x296f720, nativeWidget=nativeWidget@entry=0x277ede0, buttonDown=buttonDown@entry=0x7f1098fa4308 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#26 0x00007f1098541ec4 in QETWidget::translateMouseEvent (this=this@entry=0x277ede0, event=event@entry=0x7fff8495bd30) at kernel/qapplication_x11.cpp:4631
#27 0x00007f1098540ef1 in QApplication::x11ProcessEvent (this=0x7fff8495c220, event=event@entry=0x7fff8495bd30) at kernel/qapplication_x11.cpp:3746
#28 0x00007f109856c0b2 in x11EventSourceDispatch (s=0x25a14a0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#29 0x00007f109013df05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f109013e248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f109013e304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f1097891016 in QEventDispatcherGlib::processEvents (this=0x24c2ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#33 0x00007f109856c1ae in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#34 0x00007f109786138f in QEventLoop::processEvents (this=this@entry=0x7fff8495c100, flags=...) at kernel/qeventloop.cpp:149
#35 0x00007f1097861618 in QEventLoop::exec (this=this@entry=0x7fff8495c100, flags=...) at kernel/qeventloop.cpp:204
#36 0x00007f1097866cf6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#37 0x00007f10984c4ffc in QApplication::exec () at kernel/qapplication.cpp:3828
#38 0x000000000040aa2e in main (argc=1, argv=0x7fff8495c368) at ../../../systemsettings/app/main.cpp:49

Reported using DrKonqi
Comment 1 mrmaffen 2013-06-28 12:33:38 UTC
Every time I tried to change a setting in "Display  & Monitor" the application crashed. 
A restart of lightdm fixed it.
Comment 2 Alex Fiestas 2013-07-25 20:12:01 UTC
This was fixed already, please upgrade to 1.0.

If you are still able to reproduce this please, feel free to reopen the bug, this time adding:

-The output of: kscreen-console bug
-Executing kcmshell4 kcm_kscreen and providing the output

Thanks for reporting !
Comment 3 Alex Fiestas 2013-07-25 20:14:38 UTC
*** Bug 321699 has been marked as a duplicate of this bug. ***
Comment 4 Alex Fiestas 2013-07-25 20:58:23 UTC
Git commit d9b3fc64ba1bf88805478cafd0545857c0eb71be by Àlex Fiestas.
Committed on 25/07/2013 at 20:50.
Pushed by afiestas into branch 'master'.

Use the information from currentOutput, not from the unapplied config

Before this patch, we were looking for the size of the current Mode
in the Output object of the config that is passed to Config::setConfig
which either can or can't have the wanted Mode.

This has been kinda working so far because and ONLY because in
Generator (from kscreen/kded) we use the currentConfig as the base for
the config that we are generating, so all modes are included.

CCMAIL: dvratil@redhat.com
Related: bug 320537, bug 321699
FIXED-IN: 1.0.1

M  +1    -1    backends/xrandr/xrandrconfig.cpp
M  +5    -0    backends/xrandr/xrandrmode.cpp
M  +1    -0    backends/xrandr/xrandrmode.h
M  +10   -0    backends/xrandr/xrandroutput.cpp
M  +1    -0    backends/xrandr/xrandroutput.h