Bug 274623

Summary: XPRA fails to start when using oxygen-gtk
Product: [Plasma] Oxygen Reporter: armin.kazmi
Component: gtk2-engineAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: CLOSED FIXED    
Severity: normal CC: b7.10110111, hugo.pereira.da.costa, web
Priority: NOR    
Version: 4.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Xpra start log
Strace output of the xpra start
possible patch

Description armin.kazmi 2011-05-31 19:02:23 UTC
Created attachment 60520 [details]
Xpra start log

Version:           4.0 (using KDE 4.6.3) 
OS:                Linux

When trying to start xpra http://xpra.devloop.org.uk via "xpra start :25", xpra will spawn the Xvfb process but will exit right after that.

Attaching output and strace output

Reproducible: Always
Comment 1 armin.kazmi 2011-05-31 19:03:48 UTC
Created attachment 60521 [details]
Strace output of the xpra start
Comment 2 armin.kazmi 2011-05-31 19:06:02 UTC
Just wanted to mention.. if you change the gtk theme to something else, e.g. qtcurve, xpra will start just fine.
Comment 3 Ruslan Kabatsayev 2011-05-31 19:26:07 UTC
Could you try what is told in the first log (about X error) and get the stack trace of crash?
Comment 4 Hugo Pereira Da Costa 2011-06-01 09:57:09 UTC
@Ruslan
I suspect mismatch between GdkScreen/display for which we create some atoms, and the one associated to widgets on which we use it. I'm adding more debug info about this, but indeed the "--sync" option might help.
Comment 5 Hugo Pereira Da Costa 2011-06-01 12:05:11 UTC
Created attachment 60535 [details]
possible patch

@Ruslan, Armin

I managed to have xpra running on my system (once proper python module have been in installed; and could reproduce the crash.

Attached patch fixes it for me, but I want more testing (for other apps) before pushing.

Arlin: can you confirm that xpra starts normally if you apply the patch to oxygen-gtk ? (patch -p0 < oxygen-gtk-xpra.patch, and then recompile).

Ruslan: could you also give a shot to the patch.

The technical details: 
the X BadAtom error was generated in gtk_widget_realize, for the "dummy" widget used by us to create our RefSurface. After some playing around, I decided to get rid of this dummy widget, and use the "RootWindow" of the "default screen" to create the surface. I 'think' it is safe, and have not seen any regression on normal apps. Would be cool if you people could confirm.

Thanks in advance,

Hugo
Comment 6 Hugo Pereira Da Costa 2011-06-01 16:06:55 UTC
Git commit aa454297b5a365123ff971640d6e670f0d5117d7 by Hugo Pereira Da Costa.
Committed on 01/06/2011 at 11:57.
Pushed by hpereiradacosta into branch 'master'.

use root window of default screen to create ref surface.
CCBUG: 274623

M  +6    -8    src/oxygenstylehelper.cpp     

http://commits.kde.org/oxygen-gtk/aa454297b5a365123ff971640d6e670f0d5117d7
Comment 7 Hugo Pereira Da Costa 2011-06-01 16:08:21 UTC
ok. After talking to Ruslan, I pushed the patch. So ignore comment #5 and just give a shot at latest oxygen-gtk from git.
Comment 8 Ruslan Kabatsayev 2011-07-29 23:43:08 UTC
Since there haven't been any comments after fix, i close this.