"Xlib: unexpected async reply (sequence 0xf4)!"?

Has anyone else seen this when running an SDL program under X? I see
this occasionally and when it happens, my application no longer sees
mouse events or keyboard events.

I’m not sure that the number after the word “sequence” is always the
same. I haven’t yet had much time to track this one down.

This is under 1.0.4. I am not yet using the pre-release of 1.0.5. I
could switch to that if it would help.

Cliff Matthews <@Clifford_T_Matthews>

Has anyone else seen this when running an SDL program under X? I see
this occasionally and when it happens, my application no longer sees
mouse events or keyboard events.

This happens on libc5 systems when using threaded events.

I’m not sure that the number after the word “sequence” is always the
same. I haven’t yet had much time to track this one down.

It’s not - it’s random X breakage.

This is under 1.0.4. I am not yet using the pre-release of 1.0.5. I
could switch to that if it would help.

In SDL_x11video.c:
/* X11 based SDL video driver implementation.
Note: This implementation does not currently need X11 thread locking,
since the event thread uses a separate X connection and any
additional locking necessary is handled internally. However,
if full locking is neccessary, take a look at XInitThreads().
*/

Try adding XInitThreads() to the top of X11_VideoInit(), just after
SDL_Display is opened. I haven’t tried this solution on libc5 systems.

Remember, since automake doesn’t properly generate .la dependencies, you
need to run:
rm -fv find . -name '*.la'
after editing a file in the SDL tree.

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

What program were you running?
It might help us figure out what is going on.

daveOn Thu, 17 Feb 2000, Clifford T. Matthews wrote:

Has anyone else seen this when running an SDL program under X? I see
this occasionally and when it happens, my application no longer sees
mouse events or keyboard events.

I’m not sure that the number after the word “sequence” is always the
same. I haven’t yet had much time to track this one down.

This is under 1.0.4. I am not yet using the pre-release of 1.0.5. I
could switch to that if it would help.

Cliff Matthews

“Sam” == Sam Lantinga writes:

Has anyone else seen this when running an SDL program under X? I
see this occasionally and when it happens, my application no
longer sees mouse events or keyboard events.

Sam> This happens on libc5 systems when using threaded events.

And it happens on RH 6.1 systems over here. If I don’t set
SDL_INIT_EVENTTHREAD when I call SDL_Init, I don’t get the mystery
wedge.

I’m not sure that the number after the word “sequence” is always
the same. I haven’t yet had much time to track this one down.

Sam> It’s not - it’s random X breakage.

Yup, I’ve confirmed that the number changes. I also get lockups
without that message appearing. No lockups if I don’t use
SDL_INIT_EVENTTHREAD.

This is under 1.0.4. I am not yet using the pre-release of 1.0.5.
I could switch to that if it would help.

I’ve since brought over the 1.0.5 pre-release binaries and have seen
the same thing.

Sam> In SDL_x11video.c: /* X11 based SDL video driver implementation.
Sam> Note: This implementation does not currently need X11 thread
Sam> locking, since the event thread uses a separate X connection and
Sam> any additional locking necessary is handled internally.
Sam> However, if full locking is neccessary, take a look at
Sam> XInitThreads(). */

Sam> Try adding XInitThreads() to the top of X11_VideoInit(), just
Sam> after SDL_Display is opened. I haven’t tried this solution on
Sam> libc5 systems.

Since I’m on a stock RH 6.1 system, do you still want me to try that?
If so, I’ll try to work it into my schedule tomorrow. I’m about to
head home tonight.

Sam> Remember, since automake doesn’t properly generate .la
Sam> dependencies, you need to run: rm -fv find . -name '*.la'
Sam> after editing a file in the SDL tree.

Gotta love it.

Sam> See ya! -Sam Lantinga (slouken at devolution.com)

–Cliff
@Clifford_T_Matthews

Since I’m on a stock RH 6.1 system, do you still want me to try that?
If so, I’ll try to work it into my schedule tomorrow. I’m about to
head home tonight.

Yes please. We use stock RedHat 6.0 here and don’t experience any problems.

All the window manager calls are protected with XSync() and thread locking.

Gotta love it.

Heh.

Good night.
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

“Dave” == Dave writes:

Dave> What program were you running?

Executor.

I think Sam’s already figured it out. My guess is that XInitThreads() needs
to be called when using threaded events. At least that’s what my reading of the XInitThreads man page suggests.

–Cliff
@Clifford_T_Matthews