Skip to content
This repository

[Steam client][Waveform] Waveform segmentation faults when Steam overlay appears #548

Closed
meden opened this Issue · 31 comments

7 participants

Alessio Gaeta Joshua Embrey Drew Bliss Tom Maneiro Ethan Lee Frank triage-valve
Alessio Gaeta

When Waveform is launched from within the Steam client, it crashes whenever the Steam overlay appears (i.e. hitting Shift+TAB or getting an achievement). Log:

Game update: AppID 204180 "Waveform", ProcID 6384, IP 0.0.0.0:0
ERROR: ld.so: object 'gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded: ignored.
Setting breakpad minidump AppID = 204180
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198080516711 [API loaded no]
Couldn't find XDG_DATA_HOME.
Fall back to hardcoded ~/.local/share/.
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully
Received user stats and achievements from Steam
Received user stats and achievements from Steam
Received user stats and achievements from Steam
Received user stats and achievements from Steam
Received user stats and achievements from Steam
ERROR: Signal 11
./x86/waveform.x86[0x813ff6c]
[0xf7754400]
./x86/libstdc++.so.6(_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_+0x63)[0x4a3442d3]
/home/alessio/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so(+0x3a37)[0xf772fa37]
/home/alessio/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so(+0x544c)[0xf773144c]
/home/alessio/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so(+0x162b6)[0xf77422b6]
/home/alessio/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so(XEventsQueued+0x8b)[0xf7743f33]
./x86/libSDL-1.2.so.0[0x4b36e895]
./x86/libSDL-1.2.so.0[0x4b3717cd]
./x86/libSDL-1.2.so.0[0x4b3730eb]
./x86/libSDL-1.2.so.0(SDL_PumpEvents+0x35)[0x4b33ec85]
./x86/waveform.x86[0x8159739]
./x86/waveform.x86[0x8083b83]
./x86/waveform.x86[0x8132b34]
./x86/waveform.x86[0x8140049]
./x86/waveform.x86[0x8140f2a]
./x86/waveform.x86[0x8063462]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xf73bd4d3]
./x86/waveform.x86[0x806d9fd]
AL lib: ReleaseALC: 1 device not closed
Game removed: AppID 204180 "Waveform", ProcID 6388 
^[[Zsaving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully
Shutting down. . .
unlinked 2 orphaned pipes
CAsyncIOManager: 0 threads terminating.  0 reads, 0 writes, 0 deferrals.
CAsyncIOManager: 463924 single object sleeps, 22796 multi object sleeps
CAsyncIOManager: 0 single object alertable sleeps, 81 multi object alertable sleeps

I'm on Xubuntu 12.10 + nvidia-experimental-310 on an Asus X53SV (AKA K53SV). The crash happens no matter the video card used (plain Intel or Nvidia 540M via optirun or primusrun).

Running the application directly from the terminal workarounds the issue (no Steam overlay).

Problems with gameoverlayrenderer.so seem quite common...

Alessio Gaeta

Just found this one: #31. I'd want to remark that the crash happens even executing everything without using optirun/primusrun.

Joshua Embrey
Collaborator

As I said on #230, try disabling the overlay in your steam settings and let us know if it works.

Alessio Gaeta

Disabling the in-game Steam community I do not incur in crashes anymore (so the problem seem to be definitively bound to the overlay). BTW a focus stealing on achievements happens (#156), with the game getting paused and exiting the full screen mode (but no crash, according to this comment this should be fixed in the next release). I'm on Xubuntu 12.10 (XFCE4 with compositing disabled).

Informazioni sul processore:
    Produttore:  GenuineIntel
    Velocità:  2001 MHz
    Processori logici 8
    Processori fisici 4
    HyperThreading:  Supportato
    FCMOV:  Supportato
    SSE2:  Supportato
    SSE3:  Supportato
    SSSE3:  Supportato
    SSE4a:  Non supportato
    SSE41:  Supportato
    SSE42:  Supportato

Informazioni sulla rete:
    Velocità rete:  

Versione di Windows:
    Ubuntu 12.10 (64 bit)
    Nome del kernel: Linux
    Versione del kernel: 3.5.0-21-generic
    Produttore dell'X Server: The X.Org Foundation
    Versione dell'X Server: 11300000

Scheda video:
    Driver:  Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2

    Versione driver: 3.0 Mesa 9.0
    Intensità colore desktop: 24 bit per pixel
    Frequenza di aggiornamento del monitor: 59 Hz
    VendorID: 0x10de
    DeviceID: 0xdf4
    Numero di monitor: 1
    Numero di schede video logiche: 2
    Risoluzione visualizzazione primaria: 1366 x 768
    Risoluzione desktop: 1366 x 768
    Dimensioni visualizzazione primaria: 13,54" x 7,64"  (15,51" diag)
                                            34,4cm x 19,4cm  (39,4cm diag)
    VRAM primaria non rilevata

Scheda audio:
    Periferica audio: Intel CougarPoint HDMI

Memoria:
    RAM: 3865 Mb

Varie:
    Lingua IU:  Italiano
    LANG:  it_IT.UTF-8
    Microfono: Not set
    Spazio totale disponibile su disco rigido:  239976 Mb
    Blocco libero più ampio del disco rigido:  59206 Mb

Software installato:

Rapporti Fallimenti Recenti:
Drew Bliss
Owner

I can run Waveform with the overlay without a problem. A new steam client was just released, does that fix this problem?

Tom Maneiro

Also happens on my system:

Información sobre el procesador:
Fabricante: GenuineIntel
Velocidad: 2501 Mhz
Procesadores lógicos 4
Procesadores físicos 2
HyperThreading: Compatible
FCMOV: Compatible
SSE2: Compatible
SSE3: Compatible
SSSE3: Compatible
SSE4a: No compatible
SSE41: Compatible
SSE42: Compatible

Información sobre la red:
Velocidad de la red:

Versión de Windows:
Debian GNU/Linux 7.0 (wheezy) (64 bits)
Nombre de kernel: Linux
Versión de kernel: 3.2.0-4-amd64
Editor de X Server: The X.Org Foundation
Versión de X Server: 11204000

Tarjeta de vídeo:
Controlador: Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2

Versión de controlador: 3.0 Mesa 8.0.5
Densidad de color del escritorio: 24 bits por píxel
Frecuencia de actualización del monitor: 60 Hz
Identificador del fabricante: 0x10de
Identificador del dispositivo: 0x1058
Número de monitores: 2
Número de tarjetas de vídeo lógicas: 2
Resolución de pantalla principal: 1366 x 768
Resolución de escritorio: 2166 x 768
Tamaño de pantalla principal: 13,54" x 7,60"  (15,51" diag)
                                        34,4cm x 19,3cm  (39,4cm diag)
No se ha detectado la memoria VRAM principal

Tarjeta de sonido:
Dispositivo de sonido: Intel CougarPoint HDMI

Memoria:
RAM: 5763 Mb

Varios:
Idioma de la IU: Español
LANG: es_VE.UTF-8
Micrófono: Not set
Espacio total en disco disponible: 151131 MB
Bloque libre más grande en el disco: 124024 MB

And mind you, I have almost EXACTLY the same laptop as the bugreporter, but mine is an K53SD (GeForce 610M instead of a 540M), and I'm running Debian Wheezy.

Here is what it happens here:

  • Overlays on or off doesn't make a difference at all
  • Game is only playable through Primus. It crashes after loading levels on my Sandy Bridge IGP
  • Even under Primus, it crashes ALWAYS at exit.. and sometimes during gameplay (well, mostly after unlocking achievements).
Drew Bliss
Owner

@dilworks, your problem sounds more like a bug in the Intel drivers. That may also be @meden's issue too, with the overlay involvement just being something that triggers the bug.

Alessio Gaeta

The Steam client update did not help me either, Waveform keeps crashing when community overlay is active. BTW, @dilworks' issue is different from mine: I can play Waveform without any crash when the Steam community is disabled, apart from one while exiting the game, which I don't know if it is related to this.
I made some tests:

  1. Run Waveform standalone:
    1.1. Plain: https://gist.github.com/4492480
    1.2. optirun: https://gist.github.com/4492492
    1.3. primusrun: https://gist.github.com/4492501

  2. Run Waveform within Steam client with community disabled:
    2.1. Plain: https://gist.github.com/4492511
    2.2. optirun: https://gist.github.com/4492531
    2.3. primusrun: https://gist.github.com/4492535

  3. Run Waveform within Steam client with community enabled:
    3.1. Plain: https://gist.github.com/4492542
    3.2. optirun: https://gist.github.com/4492545
    3.3. primusrun: https://gist.github.com/4492553

Resuming:

  • Cases 1. and 2. behave pretty the same as expected
  • Cases 3.1 and 3.3 are this bug
  • Case 3.2 is new to me (I don't know if it was so even before the Steam client update, as I'm currently using primusrun)
  • As @gdrewb-valve pointed there could be an Intel specific issue, because crashes happen only when Intel DRI is directly involved (AFAIU optirun spawns a whole different X server where doing the rendering, then copies back everything to real server via network, so there is no "direct communication" between Nvidia and Intel drivers). But this issue would be related to the crash at exit only, unless there is a connection between these and the overlay ones
  • In all cases the in-game crashes are definitively triggered by the community overlay
  • In all cases it is a Waveform and Steam overlay specific problem, as other games work just fine in same conditions
Drew Bliss
Owner

OK, thanks for checking.

Ethan Lee

Waveform Steam is currently in the middle of a confusing war with the overlay and the Intel driver. Eden and I are pretty sure it's the engine's stack allocator messing with the Intel driver's memory management.

I'm still working on a fix, but testing is very much appreciated:

http://flibitijibibo.com/waveformLinux.tar.bz2

Basically just trying to run the game without the allocator, among other minor fixes.

As for the fullscreen focus, we've been getting that error with a number of SDL 1.2 games. Various devs are looking at this separately.

Tom Maneiro

Tried the test...

Still crashes with overlay enabled. With it disabled, I can now go in-game with Intel drivers, but it again crashed on me after finishing a level, after the score displays.

Ethan Lee

If you can grab backtraces I may be able to fix it... removing the allocator made things a bit unstable, so I'm sure there are crashes still in the game, particularly between game states.

Tom Maneiro

Wonderful. It's now crashing when I try to start a game! Not always, but most of the times it dies after trying to start a game. Steam overlays still disabled.

Hooked the thing to GDB, here are a couple of backtraces:

Program received signal SIGSEGV, Segmentation fault.
0x08071f14 in Engine::AnimResource::getAnim(unsigned int) ()
(gdb) bt
#0  0x08071f14 in Engine::AnimResource::getAnim(unsigned int) ()
#1  0x0808f5e1 in Engine::TileAnimation::SetSequence(unsigned int) ()
#2  0x080800b7 in Engine::Sprite::playAnimation(unsigned int, bool) ()
#3  0x0812ea4e in GUIManager::Update(float) ()
#4  0x0808e8c3 in Engine::TaskManager::RunAllTasks(unsigned int, float) ()
#5  0x0813e734 in GameStateManager::Update(float) ()
#6  0x0814bbe9 in Run() ()
#7  0x0814caaa in RealMain() ()
#8  0x080632e2 in main ()

Program received signal SIGSEGV, Segmentation fault.
0x0808f5e1 in Engine::TileAnimation::SetSequence(unsigned int) ()
(gdb) bt
#0  0x0808f5e1 in Engine::TileAnimation::SetSequence(unsigned int) ()
#1  0x080800b7 in Engine::Sprite::playAnimation(unsigned int, bool) ()
#2  0x0812e69c in GUIManager::Update(float) ()
#3  0x0808e8c3 in Engine::TaskManager::RunAllTasks(unsigned int, float) ()
#4  0x0813e734 in GameStateManager::Update(float) ()
#5  0x0814bbe9 in Run() ()
#6  0x0814caaa in RealMain() ()
#7  0x080632e2 in main ()

After a rough road of crashy-crashy runs, I managed to pick my savegame and play a entire stage. Then, after the score screens... another crash. But the backtrace here looks very different:

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 5294]
0xf7d41486 in free () from /home/tomman/.steam/bin/libc.so.6
(gdb) bt
#0  0xf7d41486 in free () from /home/tomman/.steam/bin/libc.so.6
#1  0x4a32b960 in operator delete(void*) () from ./x86/libstdc++.so.6
#2  0x0807a647 in ogg_stream::release() ()
#3  0x0807d000 in Engine::Resource::finishUnload() ()
#4  0x0806df24 in Engine::ResourceManager::destroyUnloadedResources() ()
#5  0x0806f8cf in Engine::CSoundManager::DestroyUnloadedResourcesExecution() ()
#6  0x0806fc78 in Engine::CSoundManager::Update(float) ()
#7  0x0806fdf8 in Engine::CSoundManager::UpdateLoop(void*) ()
#8  0x4b341e02 in ?? () from ./x86/libSDL-1.2.so.0
#9  0x4b38ed7c in ?? () from ./x86/libSDL-1.2.so.0
#10 0xf7f5fd4c in start_thread () from /home/tomman/.steam/bin/libpthread.so.0
#11 0xf7db5f4e in clone () from /home/tomman/.steam/bin/libc.so.6

Hope this helps!

Ethan Lee

Well, the good news is that it's no longer anything ugly with the driver. The problem at this point seems to be things in the actual Waveform engine.

May just need to spend a few more nights with this and Valgrind, but I've sent this thread to Eden in case they have any ideas.

Ethan Lee

Oh, hey, weird thing: Delete libstdc++.so.6 from Waveform/x86/. I wonder if it's conflicting with the libs in .steam/bin/?

Tom Maneiro

No difference. Actually, there is not even a libsdtc++.so inside Steam libs (At least on my setup), it just defaults to Debian's libstdc++.

But hey, nice to know that Sandy Bridge doesn't hate Waveform :)

Ethan Lee

Hm. I wonder what that ~/.steam/lib/ deal is, anyway...

Thanks for the backtraces, though. I don't know for sure how long it'll take to get Waveform working without its custom stack allocator, but we're looking at it.

Alessio Gaeta

I tried the binaries you provided. Good news and bad news. The game does not crashes anymore opening the Steam overlay, but it leaves the screen completely corrupted (with my use photo stretched to the whole screen). Something similar happens with World of Goo too.
Despite the settings, the Steam community most of the times is not enabled at game run, but in an erratic way.
With the community loaded I could finish a whole level (I did not got any achievement though...), then the game crashed with:

Stored stats for Steam
ERROR: Signal 11
./x86/waveform.x86[0x814bcac]
[0xf7782400]
/lib/i386-linux-gnu/libc.so.6(cfree+0x26)[0xf74d5276]
./x86/libstdc++.so.6(_ZdlPv+0x20)[0x4a32b960]
./x86/waveform.x86[0x807a647]
./x86/waveform.x86[0x807d000]
./x86/waveform.x86[0x806df24]
./x86/waveform.x86[0x806f8cf]
./x86/waveform.x86[0x806fc78]
./x86/waveform.x86[0x806fdf8]
./x86/libSDL-1.2.so.0[0x4b341e02]
./x86/libSDL-1.2.so.0[0x4b38ed7c]
/lib/i386-linux-gnu/libpthread.so.0(+0x6d4c)[0xf76c7d4c]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xf7549d3e]
AL lib: ReleaseALC: 1 device not closed

which seems not to be related with this bug (but reading previous comments it is something expected).

Deleting `./x86/libstdc++.so.6 did not helped:

ERROR: Signal 11
./x86/waveform.x86[0x814bcac]
[0xf7717400]
/lib/i386-linux-gnu/libc.so.6(cfree+0x26)[0xf7381276]
/usr/lib/i386-linux-gnu/libstdc++.so.6(_ZdlPv+0x1f)[0xf7544adf]
./x86/waveform.x86[0x807a647]
./x86/waveform.x86[0x807d000]
./x86/waveform.x86[0x806df24]
./x86/waveform.x86[0x806f8cf]
./x86/waveform.x86[0x806fc78]
./x86/waveform.x86[0x806fdf8]
./x86/libSDL-1.2.so.0[0x4b341e02]
./x86/libSDL-1.2.so.0[0x4b38ed7c]
/lib/i386-linux-gnu/libpthread.so.0(+0x6d4c)[0xf765cd4c]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xf73f5d3e]
AL lib: ReleaseALC: 1 device not closed

I then deleted /x86/libSDL-1.2.so.0 and... the overlay screen corruption gone! The crash at the end of level still happened, though:

Stored stats for Steam
ERROR: Signal 11
./x86/waveform.x86[0x814bcac]
[0xf778c400]
/lib/i386-linux-gnu/libc.so.6(cfree+0x26)[0xf735d276]
/usr/lib/i386-linux-gnu/libstdc++.so.6(_ZdlPv+0x1f)[0xf7520adf]
./x86/waveform.x86[0x807a647]
./x86/waveform.x86[0x807d000]
./x86/waveform.x86[0x806df24]
./x86/waveform.x86[0x806f8cf]
./x86/waveform.x86[0x806fc78]
./x86/waveform.x86[0x806fdf8]
/usr/lib/i386-linux-gnu/libSDL-1.2.so.0(+0x10901)[0xf765d901]
/usr/lib/i386-linux-gnu/libSDL-1.2.so.0(+0x5746b)[0xf76a446b]
/lib/i386-linux-gnu/libpthread.so.0(+0x6d4c)[0xf7638d4c]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xf73d1d3e]
AL lib: ReleaseALC: 1 device not closed
Steam: An X Error occurred
X Error of failed request:  BadWindow (invalid Window parameter)
Major opcode of failed request:  40 (X_TranslateCoords)
Resource id in failed request:  0xc078b5
Serial number of failed request:  131016
Game removed: AppID 204180 "Waveform", ProcID 8540 
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully

It seems you are working on the right bits... :)

Ethan Lee

Updated the waveformLinux archive.

I don't think this does anything to deter the free() issues, but I've changed enough back here to make it worth trying out anyway.

Tom Maneiro

Still crashy-crashy. The backtrace isn't different at all (still dies on a free()). But hey, at least the Steam overlay isn't being guilty this time... because it still crashes on the same points, just no more after unlocking an achievement.

Ethan Lee

Does it happen to die on the same functions too? I did end up fixing a few delete[]s in the Vorbis loader, so there's a good chance that the free() problems are in places where we aren't appropriately disposing of memory.

Ethan Lee

Updated the archive again. Lots of Valgrind fixes, but I need every backtrace I can possibly get. Get every Intel user you know to try this binary out; if they need a demo version I can supply a beta build of that too.

Tom Maneiro

OK, since you want backtraces, how about ~10 of 'em?
https://gist.github.com/4543241
Most of them are of crashes after the Eden Software splash, or right after clicking on Play. Only one is from a crash after finishing a level, but then it only happened once this time.

The good news: If you can get it running past the titlescreen, it won't crash anymore at exit, yay!

The bad news: It crashes just after clicking "Play" if launched from Steam, meaning that it's unplayable. It seems that Waveform doesn't want to play with Steam's libc.so.6 under Wheezy. Overlay or no overlay makes no difference. If started standalone from a console, it works. I can't provide with backtraces, since Waveform dies with a SIGTRAP after hooking to it in gdb, hence no backtrace options for a dead process.

The somewhat-ugly news: I've tested under KDE4 and MATE - Waveform seems to be more stable under MATE (as in "almost rock solid!"), while it behaves a bit crashy under KDE4(.8.4). Disabling desktop effects does nothing.

Ethan Lee

Excellent. Also kind of glad to see it's all in the same set of places...

I wonder why Wheezy is getting that behavior, too. The desktop differences are also interesting... I'm usually working on Fedora, currently on Cinnamon but previously Gnome 3, and I've had a tough time reproducing these... though a lot of it is still us fighting with the hardware.

I may also just disable that blasted launcher... it's nothing but trouble on every platform, as far as I can tell.

Ethan Lee

Actually, just to be sure: Are you referring to "Play" after the launcher (silent black screen with Waveform logo) or at the title screen (animated title with music)? EDIT: What was I thinking, Launcher uses "Start"...

Also, the libc thing may be something out of my control if it's specific to Steam. Is @gdrewb-valve still around?

Drew Bliss
Owner

I'm still here. What libc thing do you mean?

Ethan Lee

You'd have to ask @dilworks for the specifics... it sounds like something you have to observe first-hand.

Also, sorry for the confusion with the menu buttons. Had to open the launcher again to see that the button names are totally different.

Tom Maneiro

@flibitijibibo: It's the one on the animated title screen.

@gdrewb-valve: I did my initial install of Steam under Wheezy using (a slighty older version of) this script: http://kanotix.com/files/fix/install-steam-wheezy.sh
One of the things that it does is downloading Ubuntu's libc package, as Steam won't run with Wheezy libc (too old, it seems), and it unpacks to the Steam install dir. Steam works fine with this setup, yet Waveform (which actually works with Wheezy libc) crashes faster with it.
UPDATE: All Wheezy-specific install scripts do actually download Ubuntu's libc, for example: https://gist.github.com/4231563

Drew Bliss
Owner

Thanks for the info, the need for a newer libc for Steam isn't surprising, and not likely to change.

Ethan Lee

Updated the archive one more time. Disables the launcher, because my crash rate goes down about 95% with it off.

Unfortunately there's going to be a point where I have to stamp a release tag on this regardless of error rate, because I'm going to have to rush my next port with each minute I spend on bugfixes for old ones. A downside to being a porter of many games. :/

The key things are there though. The game should never ever crash on Steam or Intel GPU routines.

Tom Maneiro

Neat! More stable than ever. It still crashes, but at least the frequency is MUCH lower. Nearly rock-solid if started standalone, and actually playable if started from Steam. However, this time I'm on MATE... Will try later under KDE4, but it's looking very good.

Drew Bliss

Closing as this appears mostly resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.