Bug 302029

Summary: Workspace appearance kcm crashed
Product: [Plasma] kwin Reporter: Paul Mendez <paulestebanms>
Component: decorationsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: barraca13, cfeck, daniel.zwinkmann, paulestebanms, smday26
Priority: NOR    
Version: 4.8.90   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Paul Mendez 2012-06-17 00:23:10 UTC
Application: systemsettings (1.0)
KDE Platform Version: 4.8.90 (4.8.90)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-25-generic x86_64
Distribution: Ubuntu 12.04 LTS

-- Information about the crash:
- What I was doing when the application crashed: Workspace appearance kcm crash every time Í try to open it (KDE 4.9 beta 2). I only can see how the decorations lists begin to populate. I am using QtCurve as decoration.

- Custom settings of the application: Using QtCurve, dekorator installed too.

The crash can be reproduced every time.

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

Thread 3 (Thread 0x7fc49dd7f700 (LWP 9760)):
#0  0x00007fc4b27c2836 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fc4b27c2f5b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc4b27c3164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc4b97f1426 in QEventDispatcherGlib::processEvents (this=0x7fc4980008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007fc4b97c0c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fc4b97c0ed7 in QEventLoop::exec (this=0x7fc49dd7ecd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007fc4b96bffa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007fc4b97a09ff in QInotifyFileSystemWatcherEngine::run (this=0x11010c0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fc4b96c2fcb in QThreadPrivate::start (arg=0x11010c0) at thread/qthread_unix.cpp:298
#9  0x00007fc4ae088ae4 in ?? () from /usr/lib/nvidia-current/libGL.so.1
#10 0x00007fc4b2c8fe9a in start_thread (arg=0x7fc49dd7f700) at pthread_create.c:308
#11 0x00007fc4b907c4bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fc49d126700 (LWP 9762)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fc4b6eb6222 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007fc4b6eb6259 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007fc4ae088ae4 in ?? () from /usr/lib/nvidia-current/libGL.so.1
#4  0x00007fc4b2c8fe9a in start_thread (arg=0x7fc49d126700) at pthread_create.c:308
#5  0x00007fc4b907c4bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fc4bc0d27c0 (LWP 9759)):
[KCrash Handler]
#6  0x00007fc48d398300 in KDecorationOptions::showTooltips() const () from /usr/lib/libkdecorations.so.4
#7  0x00007fc48d3983a7 in KDecoration::createMainWidget(QFlags<Qt::WindowType>) () from /usr/lib/libkdecorations.so.4
#8  0x00007fc48d5b7813 in ?? () from /usr/lib/kde4/kwin3_crystal.so
#9  0x00007fc49d366e32 in KDecorationPreview::recreateDecoration (this=0x1279f30, plugins=0x1279e80) at ../../../../kwin/kcmkwin/kwindecoration/preview.cpp:77
#10 0x00007fc49d368e95 in KWin::DecorationModel::regeneratePreview (this=0x1279d50, index=..., size=...) at ../../../../kwin/kcmkwin/kwindecoration/decorationmodel.cpp:311
#11 0x00007fc49d3691f5 in KWin::DecorationModel::regenerateNextPreview (this=0x1279d50) at ../../../../kwin/kcmkwin/kwindecoration/decorationmodel.cpp:262
#12 0x00007fc4b97db446 in QObject::event (this=0x1279d50, e=<optimized out>) at kernel/qobject.cpp:1195
#13 0x00007fc4ba439894 in notify_helper (e=0x19c0c60, receiver=0x1279d50, this=0xac16c0) at kernel/qapplication.cpp:4559
#14 QApplicationPrivate::notify_helper (this=0xac16c0, receiver=0x1279d50, e=0x19c0c60) at kernel/qapplication.cpp:4531
#15 0x00007fc4ba43e713 in QApplication::notify (this=0x7fffaa87f760, receiver=0x1279d50, e=0x19c0c60) at kernel/qapplication.cpp:4420
#16 0x00007fc4bb1739e6 in KApplication::notify (this=0x7fffaa87f760, receiver=0x1279d50, event=0x19c0c60) at ../../kdeui/kernel/kapplication.cpp:311
#17 0x00007fc4b97c1e9c in QCoreApplication::notifyInternal (this=0x7fffaa87f760, receiver=0x1279d50, event=0x19c0c60) at kernel/qcoreapplication.cpp:876
#18 0x00007fc4b97c5c6a in sendEvent (event=0x19c0c60, receiver=0x1279d50) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9fe1f0) at kernel/qcoreapplication.cpp:1500
#20 0x00007fc4b97f0f93 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#21 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#22 0x00007fc4b27c2d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fc4b27c30a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007fc4b27c3164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007fc4b97f13bf in QEventDispatcherGlib::processEvents (this=0x9ffad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#26 0x00007fc4ba4e1d5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#27 0x00007fc4b97c0c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#28 0x00007fc4b97c0ed7 in QEventLoop::exec (this=0x7fffaa87f6f0, flags=...) at kernel/qeventloop.cpp:204
#29 0x00007fc4b97c5f67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#30 0x000000000040a9e5 in main (argc=5, argv=0x7fffaa87fa28) at ../../../systemsettings/app/main.cpp:49

This bug may be a duplicate of or related to bug 301718.

Possible duplicates by query: bug 301787.

Reported using DrKonqi
Comment 1 Christoph Feck 2012-06-17 00:35:30 UTC
Depending on wether "Crystal" decoration uses stable or unstable API, this is either bug 301728 or bug 301646.
Comment 2 Paul Mendez 2012-06-17 00:52:54 UTC
Created attachment 71875 [details]
New crash information added by DrKonqi

systemsettings (1.0) on KDE Platform 4.8.90 (4.8.90) using Qt 4.8.1

- What I was doing when the application crashed:  workspace appareance crash every time I try to open it

- Custom settings of the application: Qtcurve and dekorator installed. Using a custom native kwin decoration

-- Backtrace (Reduced):
#6  0x00007f3fe15b2300 in KDecorationOptions::showTooltips() const () from /usr/lib/libkdecorations.so.4
#7  0x00007f3fe15b23a7 in KDecoration::createMainWidget(QFlags<Qt::WindowType>) () from /usr/lib/libkdecorations.so.4
[...]
#9  0x00007f3ff1b00e32 in KDecorationPreview::recreateDecoration (this=0x23325b0, plugins=0x2332500) at ../../../../kwin/kcmkwin/kwindecoration/preview.cpp:77
#10 0x00007f3ff1b02e95 in KWin::DecorationModel::regeneratePreview (this=0x23323d0, index=..., size=...) at ../../../../kwin/kcmkwin/kwindecoration/decorationmodel.cpp:311
#11 0x00007f3ff1b031f5 in KWin::DecorationModel::regenerateNextPreview (this=0x23323d0) at ../../../../kwin/kcmkwin/kwindecoration/decorationmodel.cpp:262
Comment 3 Paul Mendez 2012-06-17 01:09:06 UTC
Console output with dekorator installed:

kcmshell4 kwindecoration
kcmshell(14754)/kwin KDecorationPlugins::loadPlugin: "******

The library /usr/lib/kde4/kwin3_deKorator.so has no API version
Please use the KWIN_DECORATION or future versions of kwin will no longer load this decoration!
*******" 
KCrash: Application 'kcmshell4' crashing...

- With dekorator uninstalled:

kcmshell4 kwindecoration
kcmshell(31454)/kwin KDecorationPlugins::loadPlugin: "******

The library /usr/lib/kde4/kwin3_qtcurve.so has no API version
Please use the KWIN_DECORATION or future versions of kwin will no longer load this decoration!
*******" 
KCrash: Application 'kcmshell4' crashing...

- Finally, removing QtCurve solves the problem
Comment 4 Paul Mendez 2012-06-17 01:26:48 UTC
Qtcurve version installed: kde-style-qtcurve (1.8.11-1)
Comment 5 Christoph Feck 2012-06-17 18:35:15 UTC
*** Bug 302082 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2012-06-28 01:55:51 UTC
*** Bug 302662 has been marked as a duplicate of this bug. ***
Comment 7 Martin Flöser 2012-06-28 07:44:42 UTC
do we have a solution for this issue? Would raising the .so number prevent that the library gets loaded?
Comment 8 Thomas Lübking 2012-06-28 08:13:58 UTC
we'd have to raise libkdecoration.so.4 to libkdecoration.so.5

we also could make the API check mandatory - ie. not do a relaxed load if the API version is not exported by the decoration.

pro: no crash
con: mismatching decos won't load (even if binary compatible)

the ABI break for the stable variant is likely in the removed/renamed ClientGroup classes/functions (mimetype) which back then slipped into the stable API, but compiling the bespin deco against that API and then removing them didn't crash the bespin deco (because the functions were not used, but this may relate to a compiler optimization)

i guess re-adding them as dummies should do - the skulpture bug should have them attached, but the decos inheriting the unstable API (oxygen-transparent, qtcurve, pot. crystal - Christoph can likely tell about dekorator/smaragd) would inevitably still crash (and also not recompile out of the box)

I'd preferred to have a simpler transition for Hugo, Craig and Christoph (mainly) but if all decos just crash it's likely better to do a hard cut now and require exporting the API version (not loading them and still yell the warning should do for developers + we can send a broadcsat)
Comment 9 Martin Flöser 2012-06-28 08:17:54 UTC
I would vote for the no-crash. In most cases it would just mean for the 
distributions to rebuild the packages of the decorations. By explicitly 
breaking the ABI they will notice it.
Comment 10 Christoph Feck 2012-06-28 09:57:51 UTC
Skulpture, Smaragd, DeKorator, and Domino all use the stable decoration APIs. Actually that's the reason why I never implemented tabbing - API that is marked unstable scares me :)

> By explicitly breaking the ABI they will notice it.

Not nice, honestly. Especially considering that there is no reason for breaking the API in this case.
Comment 11 Martin Flöser 2012-06-28 10:09:42 UTC
> Skulpture, Smaragd, DeKorator, and Domino all use the stable decoration
> APIs. Actually that's the reason why I never implemented tabbing - API that
> is marked unstable scares me :)
if I summarize that means the only decorations causing problems are QtCurve 
and Crystal.

In that case I will send a mail to both, inform them and ask them to do a new 
release in time for 4.9. And invite them to get their code into kwin.
Comment 12 Thomas Lübking 2012-06-28 10:15:45 UTC
We also need to figure what ultimately causes the ABI segfaults in skulpture etc. (ie. re-introduce the old ClientGroup related API to the stable API "as good as possible" - and hope for the best.
Comment 13 Thomas Lübking 2012-06-28 11:17:40 UTC
we could also* let through some decorations and enforce the API version tag for all others (or vv.) so that we can avoid crashes in QtCurve (falling back to oxygen) yet still enable skulpture or <place random legacy deco flying around on my HDD here>

*"for now" - we want to straighten and have to extend the decoration API thus a break and thus version tagging (better than the unstable class) become inevitable.

I'll write some patches later this day (there's also a crash in the kcm when a decoration plugin fails to load - somewhere int setTempButtons or so and non-loaded decos become blank space in the kcm because they're not removed from the model list on failure)
Comment 14 Thomas Lübking 2012-06-28 16:51:41 UTC
crystal uses unstable API as checked for the patches

*** This bug has been marked as a duplicate of bug 301646 ***
Comment 15 Christoph Feck 2012-07-01 23:18:25 UTC
*** Bug 302850 has been marked as a duplicate of this bug. ***