Bug 5350 - Crash at the end of Chapter 6
Status: RESOLVED FIXED
Alias: None
Product: Super Meat Boy
Classification: Unclassified
Component: everything
Version: unspecified
Hardware: PC Linux
: P3 critical
Assignee: Ryan C. Gordon
QA Contact:
URL:
: 5355
Depends on:
Blocks:
 
Reported: 2011-12-16 14:55 EST by gdott9
Modified: 2012-06-08 03:47:17 EDT
16 users (show)

See Also:



Description gdott9 2011-12-16 14:55:11 EST
The game crashes after the cutscene at the end of the boss fight of Chapter 6 "The End". If I try to skip the cutscene, I get the same error.
The error message I get is :
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
SuperMeatBoy-amd64: xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

I'm using Arch Linux, 64b.
Comment 1 Dan Spencer 2011-12-16 23:16:39 EST
Under Ubuntu 11.10, I ran "gdb amd64/SuperMeatBoy-amd64" and let the game segfault after the cutscene.
Like gdott9, watching the cutscene or skipping it both lead to the game segfaulting.  In my case, it appears to crash at an OpenGL function.  The parameters for glGenTextures don't appear to be obviously incorrect.
I also ran the game in x86 ("gdb x86/SuperMeatBoy-x86") and got the same deal.

:::: AMD64 ::::
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd6e75700 (LWP 8225)]
0x00007ffff2dae369 in glGenTextures () from /usr/lib/nvidia-current/libGL.so.1
(gdb) bt
#0  0x00007ffff2dae369 in glGenTextures () from /usr/lib/nvidia-current/libGL.so.1
#1  0x000000000050d5ca in gfxCreateTexture ()
#2  0x00000000005da19d in Texture::Create(tagTextureCreation*) ()
#3  0x00000000005db212 in TexturePackage::CreateTexture(int) ()
#4  0x00000000005acedb in CreateAnimationLibResources(void*) ()
#5  0x00000000005b1745 in FlashAnimationLibrary::FlashAnimationLibrary(char const*) ()
#6  0x000000000041ff5c in ThreadLoadEnding(void*) ()
#7  0x00007ffff767fefc in start_thread (arg=0x7fffd6e75700) at pthread_create.c:304
#8  0x00007ffff6c1989d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()
(gdb) f 1
#1  0x000000000050d5ca in gfxCreateTexture ()
(gdb) p $edi    <-- edi is the "GLsizei n" parameter for glGenTextures().  1 is a sane value.
$1 = 1
(gdb) p $rsi    <-- rsi is the "GLuint *textures" parameter.  looks like a normal memory address.
$2 = 140736798869840  (0x7fffd6e74950)

:::: X86 :::::
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xd6e1ab70 (LWP 8750)]
0xf727ce69 in glGenTextures () from /usr/lib32/nvidia-current/libGL.so.1
(gdb) bt
#0  0xf727ce69 in glGenTextures () from /usr/lib32/nvidia-current/libGL.so.1
#1  0x081baaf4 in gfxCreateTexture ()
#2  0x082a7971 in Texture::Create(tagTextureCreation*) ()
#3  0x082a851a in TexturePackage::CreateTexture(int) ()
#4  0x08271602 in CreateAnimationLibResources(void*) ()
#5  0x082735db in FlashAnimationLibrary::FlashAnimationLibrary(char const*) ()
#6  0x0809b214 in ThreadLoadEnding(void*) ()
#7  0xf7ec3d1a in start_thread (arg=0xd6e1ab70) at pthread_create.c:304
#8  0xf7d0fa7e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further
Comment 2 Dan Spencer 2011-12-16 23:49:37 EST
(In reply to comment #1)
> Under Ubuntu 11.10, I ran "gdb amd64/SuperMeatBoy-amd64" and...

Upon further inspection, I realized glGenTextures uses a jump table (for nvidia at least), and is attempting to jump to 0x8c0:

(gdb) f 0
#0  0x00007ffff2dae369 in glGenTextures () from /usr/lib/nvidia-current/libGL.so.1
(gdb) disassemble
Dump of assembler code for function glGenTextures:
   0x00007ffff2dae360 <+0>:	mov    %fs:0xffffffffffffff40,%rax
=> 0x00007ffff2dae369 <+9>:	jmpq   *0x8c0(%rax)
(gdb) p $rax
$9 = 0
Comment 3 Fred 2011-12-17 03:10:21 EST
*** Bug 5355 has been marked as a duplicate of this bug. ***
Comment 4 Dan Spencer 2011-12-17 07:57:46 EST
(In reply to comment #2)
> (In reply to comment #1)
> > Under Ubuntu 11.10, I ran "gdb amd64/SuperMeatBoy-amd64" and...
> 
> Upon further inspection, I realized glGenTextures uses a jump table (for nvidia
> at least), and is attempting to jump to 0x8c0...

Upon further FURTHER inspection, this is almost certainly a threading issue with OpenGL (I was being an idiot and was starting to look in the wrong places).  
Basically, OpenGL calls were being made on the wrong thread.  An oversight, if you will.
Comment 5 Ryan C. Gordon 2011-12-21 05:41:03 EST
Your diagnosis is 100% correct; I thought I caught all of these threading issues, but one slipped through. I'll fix this.

--ryan.
Comment 6 brettcornwall 2012-01-19 14:52:07 EST
How's the progress on this? I've been waiting to beat this for a while, now :(.
Comment 7 hikaricore 2012-01-22 23:39:01 EST
Just so everyone knows if the game crashes after you beat it you don't get credit for the boss completion... wish I'd have known this BEFORE spending all that time mastering the final level and finally beating that cheating bastard fetus.  We really need a fix for this soon.
Comment 8 Michael Curran 2012-01-23 19:04:40 EST
Just another user wondering how this is coming.
Comment 9 Gordon McKillop 2012-01-30 08:37:20 EST
Another user wondering how it's coming?

Cheers.
Comment 10 hikaricore 2012-02-10 16:50:02 EST
Please?
Comment 11 Alejandro Moreno 2012-02-23 01:52:59 EST
I've also reached this bug. And am available for patch tests.  =o)
Comment 12 brettcornwall 2012-03-24 23:22:15 EDT
Almost four months, dude.

Seriously.
Comment 13 hikaricore 2012-03-25 00:25:08 EDT
https://bugzilla.icculus.org/show_bug.cgi?id=5437#c3

Hopefully he'll get this and the other issues resolved soon.
Comment 14 Meaty 2012-04-01 21:52:53 EDT
Been checking this regularily for the past 4 months.

I understand you do not have the leisure to fix these annoying linux bugs, being deep in the world of tactile ergonomy. But i paid for the game because i was promised it'd work under linux. I only see one easy solution to the oh-so-not-fair universe desequilibrium : release the sauce !? Please ? Pretty pleaaaase ?
Comment 15 Ryan C. Gordon 2012-06-06 03:10:23 EDT
(In reply to comment #14)
> release the sauce !? Please ? Pretty pleaaaase ?

Yeah, I wish.

We'll be fixing these bugs soon, promise.

--ryan.
Comment 16 Ryan C. Gordon 2012-06-07 13:13:23 EDT
(I'm changing several bugs at once, sorry if you get this message multiple times.)

Humble Indie Bundle #5 is adding Super Meat Boy (among other games) to the promotion today, and we've updated the Linux build with several fixes for it. This will be available at the same time to people that purchased SMB through Humble Indie Bundle #4, too.

I'm updating this bug because I believe this new build fixes the issue reported here. Unless there is an objection, this bug will be marked as RESOLVED FIXED soon.

For those that want the complete package, just redownload the game from humblebundle.com, using your existing download URL. You can run uninstall-supermeatboy.sh in your installation before installing the new copy; your save games will survive. 

For those that don't want to redownload the whole game, here's just the changed files (3 megabyte download). Unpack it and overwrite the appropriate files in your installation with the new version.

    http://treefort.icculus.org/smb/smb-build2-changed-files.tar.bz2

Please note that this build does not resolve every bug reported in Bugzilla, but it should be much better than the original build.

--ryan.
Comment 17 krwilt 2012-06-07 21:29:13 EDT
I can confirm that the new build fixes at least my version of the bug.  Thanks for the fix Ryan.
Comment 18 Ryan C. Gordon 2012-06-08 03:46:37 EDT

Closing several bugs as RESOLVED FIXED. Please reopen them if you're still having this issue in the new build.

Please open a new bug, or CC yourself on an existing bug, if you're (still) having a different issue.

Thanks!

--ryan.
Comment 19 Ryan C. Gordon 2012-06-08 03:47:17 EDT

Closing several bugs as RESOLVED FIXED. Please reopen them if you're still having this issue in the new build.

Please open a new bug, or CC yourself on an existing bug, if you're (still) having a different issue.

Thanks!

--ryan.