Wine breaks window decorations for all applications (gtk-window-decorator crashes)

Bug #993265 reported by Paddy Landau
250
This bug affects 50 people
Affects Status Importance Assigned to Milestone
Compiz
Incomplete
High
Daniel van Vugt
Compiz Core
Incomplete
High
Unassigned
compiz (Ubuntu)
Incomplete
High
Unassigned

Bug Description

Running certain programs under Wine breaks window decorations for all applications, even those that are not Wine.

Specifically, when starting the program, either immediately or after a very short while all applications lose their window decorations (e.g. titlebar, close button).

The only thing that can be done is to close all windows with Ctrl-F4 and log out and in again.

When it happens, it happens consistently.

This has been tried with Unity, Unity 2D, Classic (with and without effects). Some programs work under 2D or Classic without effects, whereas other programs still have problems.

This was discussed (briefly) in Ubuntu Forums:
http://ubuntuforums.org/showthread.php?t=1970697

Examples of problematic programs: Quicken, ImgBurn

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: wine 1.4-0ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Wed May 2 14:24:25 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120301)
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: wine1.4
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Paddy Landau (paddy-landau) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wine1.4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Dngrsone (dngrsone) wrote :

It also happens with ExpressSCH running in Wine 1.5.3 on 12.04-desktop-amd64.

BTW, you can hit ALT+F2 and type in unity --replace to restore your decorations for a while.

Revision history for this message
Romcheg (romcheg-prihod) wrote :

I confirm it happens for Ubuntu 12.04 x86

Revision history for this message
Paddy Landau (paddy-landau) wrote :

Well, here's a new thing.

This has just happened to me again this morning -- but I have not used Wine at all since starting my machine today.

So ... it's not only Wine, but Wine seems to reliably trigger the problem.

Revision history for this message
Konrad Hofer (konrad.hofer) wrote :
Revision history for this message
Paddy Landau (paddy-landau) wrote :

@Konrad: Duplicate marked.

Revision history for this message
jacobika (jacobtstewart) wrote :

Same bug here running Unity3D on a 64-bit Ubuntu 12.04 install. I'm running a program called Igor Pro for doing data analysis work.

Revision history for this message
Tweed1 (john-tweed1) wrote :

If it helps, I have had this problem running normally (3D?) but I am currenlty running a 2D session of a 64 bit 12.04 install on a laptop with Intel graphics so that I can successfully drive a second monitor (another problem!!!).
Started Quicken (a very old copy from 2000) in Wine (XP) and the window decoration is fine.

Revision history for this message
Paddy Landau (paddy-landau) wrote :

@Tweed1: I have just run Quicken 2000 on Unity 2D.

The window decorations remained, but the panel and Launcher become 100% transparent -- so I could not see anything there. Even the shut-down dialogue (Restart, Cancel or Shut Down) was completely invisible.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Paddy, all, could you please check if gtk-window-decorator is running both before and after the decorations disappear?

You can check using this command:
pidof gtk-window-decorator

It will return a process ID if it's running. Or nothing otherwise.

Changed in compiz-core:
status: New → Incomplete
Changed in compiz (Ubuntu):
status: Confirmed → Incomplete
Changed in wine1.4 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Paddy Landau (paddy-landau) wrote :

Daniel, in my case gtk-window-decorator is running before I start the Wine program; but after the program has started, gtk-window-decorator is no longer running.

If there is anything I can do to help diagnose this, let me know.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. That's all we needed.

summary: - Wine breaks window decorations for all applications
+ Wine breaks window decorations for all applications (gtk-window-
+ decorator crashes)
no longer affects: wine1.4 (Ubuntu)
Changed in compiz-core:
status: Incomplete → Confirmed
Changed in compiz (Ubuntu):
status: Incomplete → Confirmed
Changed in compiz-core:
importance: Undecided → High
Changed in compiz (Ubuntu):
importance: Undecided → High
Changed in compiz-core:
milestone: none → 0.9.8.0
Revision history for this message
jacobika (jacobtstewart) wrote :

I can also confirm that gtk-window-decorator is no longer running after starting the Wine program.

Revision history for this message
Eugene Romanenko (eros2) wrote :

As I reported in duplicate bug #997157, when I heavily use wine application (Canon Digital Photo Professional) gtk-window-decorator regularly exits with following error message:

The program 'gtk-window-decorator' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 93198 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Compiz version: 1:0.9.7.8-0ubuntu1
Wine version: 1.4-0ubuntu4
Ubuntu version: 12.04 i386

Revision history for this message
Bryan (poli0048) wrote :

I also have this problem. It happens intermittently when running TinyCAD under wine. I am running Ubuntu 12.04 32-bit with Unity 3D.

Changed in compiz:
status: New → Confirmed
importance: Undecided → High
milestone: none → 0.9.8.0
Changed in compiz-core:
milestone: 0.9.8.0 → 0.9.7.10
Revision history for this message
Igor Korcek (korcek-igor) wrote :
Download full text (11.3 KiB)

When i try restart unity by terminal i have this output:

unity --reset
WARNING: Unity currently default profile, so switching to metacity while resetting the values
unity-panel-service: no process found
Checking if settings need to be migrated ...no
Checking if internal files need to be migrated ...no
Backend : gconf
Integration : true
Profile : unity
Adding plugins
Initializing core options...done
compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1800004

compiz (core) - Warn: failed to receive ConfigureNotify event on 0x28000ad

compiz (core) - Warn: failed to receive ConfigureNotify event on 0x300002e

compiz (core) - Warn: failed to receive ConfigureNotify event on 0x3a006dd

Initializing composite options...done
Initializing opengl options...done
Initializing decor options...done
Initializing vpswitch options...done
Initializing snap options...done
Initializing mousepoll options...done
Initializing resize options...done
Initializing place options...done
Initializing move options...done
Initializing wall options...done
Initializing grid options...done
Initializing session options...done
Initializing gnomecompat options...done
Initializing animation options...done
Initializing fade options...done
Initializing unitymtgrabhandles options...done
Initializing workarounds options...done
Initializing scale options...done
compiz (expo) - Warn: failed to bind image to texture
Initializing expo options...done
Initializing ezoom options...done

(compiz:3256): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed
Initializing unityshell options...done
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00090!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00093!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00096!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00096!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00099!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
WARN 2012-05-23 00:48:36 unity.glib-gobject <unknown>:0 invalid cast from `BamfWindow' to `BamfApplication'
ERROR 2012-05-23 00:48:36 unity <unknown>:0 bamf_application_get_desktop_file: assertion `BAMF_IS_APPLICATION (application)' failed
WARN 2012-05-23 00:48:36 unity.glib-gobject <unknown>:0 invalid cast from `BamfWindow' to `BamfApplication'
ERROR 2012-05-23 00:48:36 unity <unknown>:0 bamf_application_get_desktop_file: assertion `BAMF_IS_APPLICATION (application)' failed
WARN 2012-05-23 00:48:36 unity.glib-gobject <unknown>:0 invalid cast from `BamfWindow' to `BamfApplication'
ERROR 2012-05-23 00:48:36 unity <unknown>:0 bamf_application_get_desktop_file: assertion `BAMF_IS_APPLICATION (application)' failed
WARN 2012-05-23 00:48:36 unity.glib-gobject <unknown>:0 invalid cast from `BamfWin...

Revision history for this message
pepejose (dynamix66) wrote :

hi

i have this problem too!

ubuntu 12.04 64bit updated
unity 3D
wine v1.4
ImgBurn 2.5.7

many times, not always, but when execute ImgBurn all window border applications disappears

thanks!

Revision history for this message
Jorge M. Treviño (jorgemtrevino) wrote :
Revision history for this message
Paddy Landau (paddy-landau) wrote :

@Jorge: Thank you.

Revision history for this message
Chris Banakis (cbanakis) wrote :

Just to share...

I too am having the exact same issue, especially with photoshop CS2.

I hope there will be a fix soon, but as far as workarounds are concerned, I think I have probably found the best one.

I am using Cairo-Dock.

I added the applet "Composite Manager"

Whenever I quit photoshop, I click the applet, they click yes.
(This turns off all compiz effects)

Then, I click the applet, they click yes again.
(This turns all of the effects back on)

Seems to work everytime.

Not too terrible, but I hope it gets fixed soon.

I like to showcase my system to all my friends (who use mac and windows)

And when something doesn't work right, its a little embarassing. :(

Revision history for this message
Paddy Landau (paddy-landau) wrote :

@Chris Banakis: "I like to showcase my system to all my friends (who use mac and windows) ... And when something doesn't work right, its a little embarassing. :("

Well, why don't you get them to show you how well Linux programs work on Windows? ;) It's hardly embarrassing that Windows programs don't work perfectly on Linux! (The Linux equivalent of Photoshop is GIMP, isn't it?)

Thank you for your tip. For those of us who don't use Cairo Dock, is Composite Manager available for other desktop managers such as Unity? Jorge Treviño's workaround works well, except for the minor irritation (for me) of making the panel applets not work properly.

Revision history for this message
Paddy Landau (paddy-landau) wrote :

Thanks to FrankyG, we have a much faster workaround:

From Alt-F2 or a script:
gtk-window-decorator --replace

From the terminal:
nohup gtk-window-decorator --replace &>/dev/null &

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Happens to me as well -- running Office 2010 on Quantal Alpha 2.

Revision history for this message
Nicholas Wind (redhatnick) wrote :

Not sure if this helps but I'm currently using Evernote via Wine 1.5.8 thru PlayOnLinux. Going into wineprefs and unchecking allow window manager to decorate this window seems to make Compiz a little less glitchy, but still crashes.

Revision history for this message
Paddy Landau (paddy-landau) wrote :

"Going into wineprefs and unchecking allow window manager to decorate this window seems to make Compiz a little less glitchy, but still crashes."

I tried this but unfortunately it does not help with my set-up.

Revision history for this message
Nicholas Wind (redhatnick) wrote :

"I tried this but unfortunately it does not help with my set-up."

If your really desperate for a workaround, you'll have to give up Unity 3D (Unity is a compiz plugin). Unity 2D and GNOME Classic replace Compiz with Metacity, and if you install GNOME 3 PPA you'll get Mutter, but compiz won't be running (or crashing). Something to think about ;).

Revision history for this message
Paddy Landau (paddy-landau) wrote :

@Nicholas Wind: Even when I log into Gnome Classic (No Effects), I still get problems.

Instead, I simply use the workaround mentioned in comment #24:

gtk-window-decorator --replace

I have put this onto a keyboard shortcut, so it's just a keystroke (and less than a second) to fix.

Revision history for this message
Flittermice (flittermice) wrote :

yes, "gtk-window-decorator &" really helps...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hi all,

Could you please try running a synchronous instance of gtk-window-decorator under gdb so we can get a stack trace of the problem? To do this...

env DISPLAY=:0 gdb /usr/bin/gtk-window-decorator
(gdb) run --sync --replace

Make it crash now. And then back in gdb...

(gdb) bt

And paste the output into this bug.

Revision history for this message
Paddy Landau (paddy-landau) wrote :

@Daniel: Here are my results.

$ env DISPLAY=:0 gdb /usr/bin/gtk-window-decorator
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/gtk-window-decorator...(no debugging symbols found)...done.
(gdb) run --sync --replace
Starting program: /usr/bin/gtk-window-decorator --sync --replace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffef1a6700 (LWP 5257)]
[New Thread 0x7fffee9a5700 (LWP 5258)]
[New Thread 0x7fffe7fff700 (LWP 5907)]
The program 'gtk-window-decorator' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 28457 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
[Thread 0x7fffe7fff700 (LWP 5907) exited]
[Thread 0x7fffee9a5700 (LWP 5258) exited]
[Thread 0x7ffff7fc3940 (LWP 5254) exited]
[Inferior 1 (process 5254) exited with code 01]
(gdb) bt
No stack.
(gdb)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, that didn't work. You need a breakpoint. Try:

env DISPLAY=:0 gdb /usr/bin/gtk-window-decorator
(gdb) break gdk_x_error
(gdb) run --sync --replace

Make it crash now. And then back in gdb...

(gdb) bt

And paste the output into this bug.

Revision history for this message
Paddy Landau (paddy-landau) wrote :

Here again, but note the error with the break command. I also was not sure whether to use "y" or "n" to its question, so I used "n".

$ env DISPLAY=:0 gdb /usr/bin/gtk-window-decorator
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/gtk-window-decorator...(no debugging symbols found)...done.
(gdb) break gdk_x_error
Function "gdk_x_error" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) run --sync --replace
Starting program: /usr/bin/gtk-window-decorator --sync --replace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffef1a6700 (LWP 7376)]
[New Thread 0x7fffee9a5700 (LWP 7377)]
The program 'gtk-window-decorator' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 15597 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
[Thread 0x7fffef1a6700 (LWP 7376) exited]
[Thread 0x7fffee9a5700 (LWP 7377) exited]
[Inferior 1 (process 7373) exited with code 01]
(gdb) bt
No stack.
(gdb)

Revision history for this message
Eric Ding (ericding-alum) wrote :

I'm seeing the same problem trying to get a backgrace. Even if I respond 'y' to gdb's prompt regarding gdk_x_error, I still get no break, just an exit with code 01.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Instead, please try: break _XError

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can't prove it's the same bug but we might have fixed this today in bug 1019337.

Revision history for this message
Eric Ding (ericding-alum) wrote :

OK, here's a stack trace (with breakpoint on _XError)...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Eric, that's perfect.

Although it's a different crash to bug 1019337 and might be different again to what Paddy has. So please log it as a new bug titled:
  "gtk-window-decorator crashes with BadWindow (invalid Window parameter), from XDeleteProperty() from remove_frame_window() from window_closed()"

Revision history for this message
Paddy Landau (paddy-landau) wrote :

Unfortunately, bug 1019337 has not solved my problem (I have updated and even rebooted today).

However, when I run your trace commands, the nature of the problem changes; instead of the window decorations disappearing altogether, the close, minimise and maximise buttons did. And then I cannot cause it to crash.

Still having a problem with breakpoints:
Function "_XError" not defined.
So, I just answered "y" and that gave me a "bt" (attached).

So, I'm not sure that it will give you a true reflection: without running your trace, the window decorations disappear; whereas running your trace, only the close, minimise and maximise buttons disappear.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: gtk-window-decorator crashes in XGetWindowProperty() from get_mwm_prop() from event_filter_func()

Eric, you issue is now logged as bug 1023684.

summary: - Wine breaks window decorations for all applications (gtk-window-
- decorator crashes)
+ gtk-window-decorator crashes in XGetWindowProperty() from get_mwm_prop()
+ from event_filter_func()
Changed in compiz:
status: Confirmed → Triaged
Changed in compiz-core:
status: Confirmed → Triaged
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
Changed in compiz:
assignee: nobody → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Paddy, it seems the offending function in your case ("get_mwm_prop") is already protected and handles errors correctly. So it's my instructions that are giving you the wrong stack trace.

Could you please try breaking on gdk_x_error instead?

Changed in compiz:
status: In Progress → Incomplete
Changed in compiz-core:
status: Triaged → Incomplete
Changed in compiz (Ubuntu):
status: Triaged → Incomplete
summary: - gtk-window-decorator crashes in XGetWindowProperty() from get_mwm_prop()
- from event_filter_func()
+ Wine breaks window decorations for all applications (gtk-window-
+ decorator crashes)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Paddy, sorry ignore that comment.

Breaking on gdk_x_error doesn't work at all, because the symbol is static (hence not breakable in release builds).
Breaking on _XError gives false positives, showing harmless X errors that we do actually handle and are not fatal.

The correct place to break it seems is the "exit" function:
    break exit

Sorry for the confusion.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And if that doesn't work, try:
    break _exit

:)

Revision history for this message
Paddy Landau (paddy-landau) wrote :

LOL, Daniel, you seem to be struggling to find the error.

exit did not catch anything, but _exit did (attached). I hope this gives you what you need.

Again, when I run your commands, the nature of the breakage changes. Also, when I run your commands, it usually takes longer for the window decorations to break than normal. Is this something you would expect?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Paddy.

That confirms bug 1019337 is the same as this one. However since the fixes are already being applied using that newer bug ID, I will have to make this older bug a duplicate of the new one.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And yes, running under a debugger will change the frequency of the errors. Because they're related to inter-process race conditions.

Revision history for this message
Paddy Landau (paddy-landau) wrote :

OK, thank you Daniel. I see that there are several duplicates, so this has been reported several times.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.