Bug 183124

Summary: SIGSEV signal when clicking on "Save settings system wide" check box.
Product: [Unmaintained] krandr Reporter: ivan <lagigliaivan>
Component: krandrtrayAssignee: Gustavo Pichorim Boiko <gustavo.boiko>
Status: RESOLVED FIXED    
Severity: crash CC: alfeno, andresbajotierra, anh.chick, myriam, wl
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: backtrace krandrtray
xorg.conf

Description ivan 2009-02-04 02:54:02 UTC
Version:           Qt: 4.4.3 KDE: 4.1.3 (KDE 4.1.3) Resize and Rotate: 0.5  (using KDE 4.1.3)
Compiler:           I do not know which compiler was used to do the executable. This is the output of the file command, maybe, it can help. /usr/bin/krandrtray: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped
OS:                Linux
Installed from:    Ubuntu Packages

The bug was reproduced in a sony vaio laptop with a "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)". 
At the moment of clicking on "Monitor Gamma->Save settings system wide" check box, the application receives a SIGSEV signal.

Since the application has been striped, there is not a backtrace.
Comment 1 Dario Andres 2009-02-04 19:30:59 UTC
If you can reproduce the crash at will, may you read http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports and post a complete backtrace here? 
( You may need to install the kdelibs5-dbg, kdebase-runtime-dbg, kdebase-workspace-dbg packages)
Thanks :)
Comment 2 ivan 2009-02-10 17:05:51 UTC
Hi Dario,

         I'm so sorry, I don't want to disturb you, but unfortunately I was not able to obtain the backtrace in spite of I have installed all the packages needed for that.

As I told you in my previous email, I don't know how to use the complementary information installed by the packages.  The backtrace is the same one that was obtained before.

         Could you please point me to get a useful backtrace?


Comment 3 Dario Andres 2009-02-10 17:30:09 UTC
No problem :)
You need to do the following

- Start Konsole
- Type "gdb systemsettings" and press Return
- Type "set logging on" and press Return (this will create a "gdb.txt" file in the current dir, so ensure there isn't a "gdb.txt" file already)
- Type "run" and press Return
SystemSetting will start
- Now go to Display / Gamma
- Check the "Save settings system wide" to reproduce the crash
The application should crash
- Return to the Konsole window where GDB was running
- Type "bt full" and press Return some times until there is no more backtrace
- Type "quit" and press Return to close the GDB application

Finally post the contents of the gdb.txt file here

Thanks
Comment 4 Dario Andres 2009-02-10 17:32:55 UTC
Also this may be related to bug 183682
Comment 5 ivan 2009-02-10 18:05:32 UTC
I will try it as soon as possible. 

Thanks!!

Comment 6 ivan 2009-02-11 03:53:31 UTC
Created attachment 31215 [details]
backtrace krandrtray
Comment 7 ivan 2009-02-11 03:54:54 UTC
Hi, 

I have tried following the steps of yours, but unfortunately the "SystemSetting->Display" application doesn't have the menu "Monitor gamma". 

Also I tried running "gdb krandrtray" but this application seems to fork due to it is executed into the systray. 

Finally I run gdb and I attached it to the running krandtray process, and the the backtrace (and some other information) is attached to the post .

Let me know if you need something else.

I hope it helps.



 
                   
Comment 8 Dario Andres 2009-02-11 23:38:17 UTC
Pasted backtrace from comment 6:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb61c69a0 (LWP 11810)]
0xb794fc72 in QString::operator= () from /usr/lib/libQtCore.so.4
#0  0xb794fc72 in QString::operator= () from /usr/lib/libQtCore.so.4
No symbol table info available.
#1  0xb4b4cdf7 in ?? () from /usr/lib/kde4/kcm_kgamma.so
No symbol table info available.
#2  0xb4b4cf62 in ?? () from /usr/lib/kde4/kcm_kgamma.so
No symbol table info available.
#3  0xb4b4d163 in ?? () from /usr/lib/kde4/kcm_kgamma.so
No symbol table info available.
#4  0xb7a10a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
No symbol table info available.
#5  0xb7a10e60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
No symbol table info available.
#6  0xb7598e61 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
No symbol table info available.
#7  0xb72ec199 in ?? () from /usr/lib/libQtGui.so.4
No symbol table info available.
#8  0xb72edd94 in ?? () from /usr/lib/libQtGui.so.4
No symbol table info available.
#9  0xb72ee026 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
No symbol table info available.
#10 0xb7002962 in QWidget::event () from /usr/lib/libQtGui.so.4
No symbol table info available.
#11 0xb72ec03e in QAbstractButton::event () from /usr/lib/libQtGui.so.4
No symbol table info available.
#12 0xb7303686 in QCheckBox::event () from /usr/lib/libQtGui.so.4
No symbol table info available.
#13 0xb6faa8ec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
No symbol table info available.
#14 0xb6fb30e1 in QApplication::notify () from /usr/lib/libQtGui.so.4
No symbol table info available.
#15 0xb7ecbb2d in KApplication::notify (this=0xbfe9a238, receiver=0x9477728, event=0xbfe98ab8)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
No locals.
#16 0xb79fbe61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
No symbol table info available.
#17 0xb6fb236e in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
No symbol table info available.
#18 0xb701c656 in ?? () from /usr/lib/libQtGui.so.4
No symbol table info available.
#19 0xb701b9e5 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
No symbol table info available.
#20 0xb70457aa in ?? () from /usr/lib/libQtGui.so.4
No symbol table info available.
#21 0xb68f86f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#22 0xb68fbda3 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#23 0xb68fbf61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#24 0xb7a26478 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
No symbol table info available.
#25 0xb7044ea5 in ?? () from /usr/lib/libQtGui.so.4
No symbol table info available.
#26 0xb79fa52a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
No symbol table info available.
#27 0xb79fa6ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
No symbol table info available.
#28 0xb7417987 in QDialog::exec () from /usr/lib/libQtGui.so.4
No symbol table info available.
#29 0x080556fe in _start ()
No symbol table info available.
The program is running.  Quit anyway (and detach it)? (y or n) Not confirmed.
Continuing.

Comment 9 Dario Andres 2009-02-11 23:39:26 UTC
@Ivan: can you install the "kdegraphics-dbg" package and try to generate the backtrace again ? Thanks
Comment 10 ivan 2009-02-13 02:17:51 UTC
Hi,

I installed kdegraphics-dbg and here you have the new backtrace!



Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb60939a0 (LWP 12651)]        
0xb781cc72 in QString::operator= () from /usr/lib/libQtCore.so.4
(gdb) backtrace 
#0  0xb781cc72 in QString::operator= () from /usr/lib/libQtCore.so.4
#1  0xb495cdf7 in KGamma::loadSystemSettings (this=0xa1a4738) at /build/buildd/kdegraphics-4.1.3/kgamma/kcmkgamma/kgamma.cpp:501
#2  0xb495cf62 in KGamma::changeConfig (this=0xa1a4738) at /build/buildd/kdegraphics-4.1.3/kgamma/kcmkgamma/kgamma.cpp:533
#3  0xb495d163 in KGamma::qt_metacall (this=0xa1a4738, _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0xbfc670ec)
    at /build/buildd/kdegraphics-4.1.3/obj-i486-linux-gnu/kgamma/kcmkgamma/kgamma.moc:70
#4  0xb78dda60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#5  0xb78dde60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#6  0xb7465e61 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
#7  0xb71b9199 in ?? () from /usr/lib/libQtGui.so.4
#8  0xb71bad94 in ?? () from /usr/lib/libQtGui.so.4
#9  0xb71bb026 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#10 0xb6ecf962 in QWidget::event () from /usr/lib/libQtGui.so.4
#11 0xb71b903e in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#12 0xb71d0686 in QCheckBox::event () from /usr/lib/libQtGui.so.4
#13 0xb6e778ec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#14 0xb6e800e1 in QApplication::notify () from /usr/lib/libQtGui.so.4
#15 0xb7d98b2d in KApplication::notify (this=0xbfc69008, receiver=0xa1bf080, event=0xbfc676c8)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#16 0xb78c8e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#17 0xb6e7f36e in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
#18 0xb6ee9656 in ?? () from /usr/lib/libQtGui.so.4
#19 0xb6ee89e5 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#20 0xb6f127aa in ?? () from /usr/lib/libQtGui.so.4
#21 0xb67c56f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0xb67c8da3 in ?? () from /usr/lib/libglib-2.0.so.0
#23 0xb67c8f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0xb78f3478 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#25 0xb6f11ea5 in ?? () from /usr/lib/libQtGui.so.4
#26 0xb78c752a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#27 0xb78c76ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#28 0xb72e4987 in QDialog::exec () from /usr/lib/libQtGui.so.4
#29 0x080556fe in _start ()


Comment 11 Dario Andres 2009-02-13 11:26:51 UTC
*** Bug 183682 has been marked as a duplicate of this bug. ***
Comment 12 Alfeno Rodrigues 2009-02-19 00:49:47 UTC
Hello for all;

I have a Fedora 10 installed in my computer with kde 4.20 and I have the same problem with krandr.
Comment 13 Dario Andres 2009-02-23 17:41:52 UTC
*** Bug 185353 has been marked as a duplicate of this bug. ***
Comment 14 Werner Lemberg 2009-04-03 21:18:22 UTC
What's the planned release for a fix?  I thought that 4.2.2 would work, but
it still crashes with exactly the same error (in kgamma.cpp:501).
Comment 15 Dario Andres 2009-04-29 21:38:32 UTC
I was trying to reproduce the bug to try to fix but I couldn't got a crash.
Comment 16 Dario Andres 2009-04-29 21:46:23 UTC
BTW: after analyzing the code. It only parses the "Gamma" option in your xorg.conf file, so, if it's crashing is probably hitting a unhandled case. 
So, can you post your Xorg.conf files here so I can test against them ?  (it should be located under /etc/X11/xorg.conf)
Thanks
Comment 17 Werner Lemberg 2009-04-29 22:49:34 UTC
Created attachment 33228 [details]
xorg.conf

Here it is.
Comment 18 Dario Andres 2009-04-29 23:04:46 UTC
Thanks, I can reproduce that crash here with the provided xorg.conf file. I'm going to investigate it
Comment 19 Dario Andres 2009-04-29 23:41:00 UTC
SVN commit 961311 by darioandres:

Prevent a crash if the config file says that we will use XF86Config, but Gamma value is not present
in the Xorg.conf file. (Also, unselect the "Save settings system wide" in this situation)

BUG: 183124


 M  +17 -14    kgamma.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=961311
Comment 20 Dario Andres 2009-04-30 00:00:28 UTC
SVN commit 961321 by darioandres:

Backport to 4.2branch of:
SVN commit 961311 by darioandres:

Prevent a crash if the config file says that we will use XF86Config, but Gamma
value is not present
in the Xorg.conf file. (Also, unselect the "Save settings system wide" in this
situation)

CCBUG: 183124



 M  +17 -14    kgamma.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=961321
Comment 21 Werner Lemberg 2009-04-30 07:54:16 UTC
Thanks for fixing.

> unselect the "Save settings system wide"

Why that?  After calling xgamma I would like to have the set gamma values
each time I start the desktop.  Or is there a different mechanism to achieve
that?  Currently (this is, without your patch) I have to call xgamma each
time I restart my system.
Comment 22 Dario Andres 2009-05-12 20:31:43 UTC
I mean.. unchecking the "Save settings system wide" because even when the kdeconfig file says we are using the system wide values, these values are invalid. And it will end up reverting to the local values. Anyways.. just reselecting that checkbox and applying the settings will fix the whole situation.
Is jut a minor detail fix to keep "coherence", but it doesn't affect the whole behaviour. Thanks
Comment 23 Werner Lemberg 2009-05-12 21:31:55 UTC
There's still a problem, however: kgamma doesn't update my xorg.conf file
but XF86Config which doesn't get used in recent X11 versions...

Note that the SaX program of OpenSuSE 11.1 (which configures X11) apparently
creates both files.  Perhaps kgamma should modify both files also?
Comment 24 Dario Andres 2009-05-12 21:57:08 UTC
Please file a new bug report and I will try to look at it. This report will remain closed as the original crash is fixed. Thanks
Comment 25 Werner Lemberg 2009-05-12 22:23:58 UTC
Done:

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