Bug 358317 - xembedsniproxy crashes when clicking on empty fcitx icon
Summary: xembedsniproxy crashes when clicking on empty fcitx icon
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: XembedSNIProxy (show other bugs)
Version: 5.5.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL: https://bugzilla.opensuse.org/show_bu...
Keywords:
: 358546 (view as bug list)
Depends on: 358227
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-21 16:17 UTC by Wolfgang Bauer
Modified: 2016-02-01 05:52 UTC (History)
4 users (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 Wolfgang Bauer 2016-01-21 16:17:23 UTC
+++ This bug was initially created as a clone of Bug #358227 +++

While the original crash is fixed now, we noticed a new problem:
When fcitx is installed/active, a new, empty, icon now shows up in the system tray (this probably caused the original crash already) in addition to fcitx's normal icon (which seems to be SNI as it is also shown when xembedsniproxy is not running).

If you click on this icon, xembedsniproxy crashes again.

Konsole output:
kde.xembedsniproxy: trying to dock window  12582932
kde.xembedsniproxy: adding damage watch for  12582932
kde.xembedsniproxy: Resizing window 12582932 "" from w*h QSize(-1, -1)
QXcbConnection: XCB error: 3 (BadWindow), sequence: 850, resource id: 12582932, major code: 2 (ChangeWindowAttributes), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 856, resource id: 12582932, major code: 7 (ReparentWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 857, resource id: 12582932, major code: 142 (Unknown), minor code: 1
QXcbConnection: XCB error: 3 (BadWindow), sequence: 858, resource id: 12582932, major code: 6 (ChangeSaveSet), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 859, resource id: 12582932, major code: 25 (SendEvent), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 860, resource id: 12582932, major code: 12 (ConfigureWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 864, resource id: 12582932, major code: 12 (ConfigureWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 865, resource id: 12582932, major code: 8 (MapWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 866, resource id: 12582932, major code: 61 (ClearArea), minor code: 0
kde.xembedsniproxy: No xembed icon for 12582932 ""
kde.xembedsniproxy: Received click 1 with passed x*y 1008 998

Program received signal SIGSEGV, Segmentation fault.

Backtrace:
#0  0x000000000040eaf8 in SNIProxy::sendClick(unsigned char, int, int) (this=0x62a6e0, mouseButton=mouseButton@entry=1 '\001', x=1008, y=998)
    at /usr/src/debug/plasma-workspace-5.5.3/xembed-sni-proxy/sniproxy.cpp:438
#1  0x000000000040eb6e in SNIProxy::Activate(int, int) (this=<optimized out>, x=<optimized out>, y=<optimized out>)
    at /usr/src/debug/plasma-workspace-5.5.3/xembed-sni-proxy/sniproxy.cpp:384
#2  0x0000000000410d2d in StatusNotifierItemAdaptor::Activate(int, int) (this=<optimized out>, x=<optimized out>, y=<optimized out>)
    at /usr/src/debug/plasma-workspace-5.5.3/build/xembed-sni-proxy/statusnotifieritemadaptor.cpp:81
#3  0x0000000000411231 in StatusNotifierItemAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x71dfb0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=6, _a=_a@entry=0x7fffffffd2e0)
    at /usr/src/debug/plasma-workspace-5.5.3/build/xembed-sni-proxy/statusnotifieritemadaptor.moc:166
#4  0x00000000004117ab in StatusNotifierItemAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0x71dfb0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fffffffd2e0)
    at /usr/src/debug/plasma-workspace-5.5.3/build/xembed-sni-proxy/statusnotifieritemadaptor.moc:266
#5  0x00007ffff7b7fda4 in  () at /usr/lib64/libQt5DBus.so.5
#6  0x00007ffff7b84372 in  () at /usr/lib64/libQt5DBus.so.5
#7  0x00007ffff7b84e83 in  () at /usr/lib64/libQt5DBus.so.5
#8  0x00007ffff7b8692e in  () at /usr/lib64/libQt5DBus.so.5
#9  0x00007ffff618c4f6 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#10 0x00007ffff615bc2d in QCoreApplication::notify(QObject*, QEvent*) ()
    at /usr/lib64/libQt5Core.so.5
#11 0x00007ffff615b935 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
    at /usr/lib64/libQt5Core.so.5
#12 0x00007ffff615daf7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5
#13 0x00007ffff61b3303 in  () at /usr/lib64/libQt5Core.so.5
#14 0x00007ffff26cba04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#15 0x00007ffff26cbc48 in  () at /usr/lib64/libglib-2.0.so.0
#16 0x00007ffff26cbcec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#17 0x00007ffff61b277c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#18 0x00007ffff6159803 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQt5Core.so.5
#19 0x00007ffff6161396 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#20 0x000000000040a9da in main(int, char**) (argc=1, argv=<optimized out>)
    at /usr/src/debug/plasma-workspace-5.5.3/xembed-sni-proxy/main.cpp:68


I'm wondering whether xembedsniproxy should not just ignore that (apparently invalid) XEmbed icon completely instead of showing it as empty...
KDE4 e.g. doesn't show it at all, and I think it makes no sense to show an empty icon that you cannot interact with.
Comment 1 Wolfgang Bauer 2016-01-21 16:30:19 UTC
It seems the original fix was not enough.

(In reply to Wolfgang Bauer from comment #0)
> #0  0x000000000040eaf8 in SNIProxy::sendClick(unsigned char, int, int)
> (this=0x62a6e0, mouseButton=mouseButton@entry=1 '\001', x=1008, y=998)
>     at
> /usr/src/debug/plasma-workspace-5.5.3/xembed-sni-proxy/sniproxy.cpp:438

This line still uses clientGeom without checking for null.
If clientGeom was null in SNIProxy::SNIProxy() (which caused the original crash, that was fixed by adding a check in line 163), it will also be null here.
Comment 2 David Edmundson 2016-01-21 16:41:41 UTC
Urgh, thanks.
Comment 3 David Edmundson 2016-01-25 00:21:58 UTC
Fixed with 988a7bef7e84a4a2fc6a2f6ec6145e093dfb84f8
Comment 4 David Edmundson 2016-01-25 18:14:46 UTC
*** Bug 358546 has been marked as a duplicate of this bug. ***
Comment 5 Pulfer 2016-02-01 05:52:09 UTC
(In reply to David Edmundson from comment #3)
> Fixed with 988a7bef7e84a4a2fc6a2f6ec6145e093dfb84f8

Perhaps this commit should be pushed to master branch as well? It's still only in Plasma/5.5.