Debugging a "X Error of failed request: BadAlloc"

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Traumflug
Newbie
Newbie
Posts: 3
Joined: Sat Oct 01, 2011 4:34 pm

Debugging a "X Error of failed request: BadAlloc"

Post by Traumflug »

Hello all,

as an almost daily user of Wine I'd finally like to get around to use my favourite CAD application, Catia, on Wine as well. This complex application is close, simple things can be done already. Even a small Finite Elements Analysis got the right results.

My OS of choice is Ubuntu 11.04, AMD64. With Wine 1.2 from the package manager one gets far, although menus are very slow. Wine 1.3 is better with the menus, however, sometime the X sever bails out. I've found a bug which pretty much describes what I see: http://bugs.winehq.org/show_bug.cgi?id=24921

To get to the bottom of this, I compiled Wine from git sources. However, running this under a debugger isn't as simple as I thought. The best results so far I get with this patch applied:

Code: Select all

diff --git a/tools/winewrapper b/tools/winewrapper
index b324daa..1045c51 100755
--- a/tools/winewrapper
+++ b/tools/winewrapper
@@ -102,4 +102,4 @@ fi
 
 # and run the application
 
-exec "$WINELOADER" "$@"
+exec gdb --args "$WINELOADER" "$@"
This works reasonable so far. Probably I should run winedbg, but for some reason or another, no such binary is built.

The currently bigger part of the problem is, as X bails out, the program exits with a SIGPIPE ...

Code: Select all

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  53 (X_CreatePixmap)
  Value in failed request:  0x0
  Serial number of failed request:  137886
  Current serial number in output stream:  138415

Program received signal SIGPIPE, Broken pipe.
... so you end up in the signal handler instead of the buggy part of the code. Googling a lot, I tried parameters like --sync, -synchronize, ... all to no effect.

So, my question is: how whould I catch such X errors? Ideally in a way which survives forks, as this application uses sort of a binary wrapper application.
Traumflug
Newbie
Newbie
Posts: 3
Joined: Sat Oct 01, 2011 4:34 pm

Post by Traumflug »

So, my question is: how whould I catch such X errors?
To answer this part myself, there's a debug channel doing this:

WINEDEBUG=+synchronous

This makes the connection to the X server synchronous and drops you into the debugger in case of a failure.
Traumflug
Newbie
Newbie
Posts: 3
Joined: Sat Oct 01, 2011 4:34 pm

Post by Traumflug »

For those experiencing the same bug, this is the last commit which works fine:

01e12ec9f99489ecbf54b21f290dc3d633328c54
Date: Wed Jul 20 12:17:09 2011 +0200

So, if you're brave enough to compile Wine from git yourself, you can get the fast menus of Wine 1.3 and the reliability of Wine 1.2 together.
Christoph Korn

Debugging a "X Error of failed request: BadAlloc"

Post by Christoph Korn »

I don't know what this thread was about in detail but wouldn't it be clever to
report a regression in bugzilla then?

Am 04.10.2011 19:07, schrieb Traumflug:
For those experiencing the same bug, this is the last commit which works fine:

01e12ec9f99489ecbf54b21f290dc3d633328c54
Date: Wed Jul 20 12:17:09 2011 +0200

So, if you're brave enough to compile Wine from git yourself, you can get the fast menus of Wine 1.3 and the reliability of Wine 1.2 together.




User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Debugging a "X Error of failed request: BadAlloc&qu

Post by dimesio »

Christoph Korn wrote:I don't know what this thread was about in detail but wouldn't it be clever to
report a regression in bugzilla then?
It already has; that was stated in the original post.
Locked