Trine2 Assertion failed at pulsecore

For discussion about Trine 2, released in December 2011 on Windows, Mac, Xbox, PlayStation Network and later on Linux and Wii U.
Ram-Z
Posts: 4
Joined: Tue Dec 20, 2011 12:03 am

Trine2 Assertion failed at pulsecore

Postby Ram-Z » Wed Apr 04, 2012 11:01 pm

Hi,
I tried running Trine 2 on my Chakra Linux machine. But it fails with

Code: Select all

$ cd /opt/trine2
$ LD_LIBRARY_PATH=./lib/lib32 ./bin/trine2_linux_32bit
Assertion 'pa_atomic_load(&(b)->_ref) > 0' failed at pulsecore/memblock.c:590, function pa_memblock_unref(). Aborting.
Aborted


Any Ideas?

Distro: Chakra (Arch fork)
Arch: x86_64
Audio: pulseaudio

Code: Select all

$ uname -a
Linux shada 3.2-CHAKRA #1 SMP PREEMPT Tue Feb 28 14:55:18 UTC 2012 x86_64 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux

Code: Select all

$ pacman -Qs lib32 | grep local
local/lib32-alsa-lib 1.0.24.1-2
local/lib32-alsa-plugins 1.0.24-2
local/lib32-atk 2.0.1-1
local/lib32-attr 2.4.46-1
local/lib32-bzip2 1.0.6-1
local/lib32-cairo 1.10.2-2
local/lib32-dbus-core 1.4.14-1
local/lib32-e2fsprogs 1.41.14-2
local/lib32-expat 2.0.1-2
local/lib32-flac 1.2.1-2
local/lib32-fontconfig 2.8.0-3
local/lib32-freetype2 2.4.7-1
local/lib32-gcc-libs 4.6.2-1
local/lib32-gdk-pixbuf2 2.24.0-1
local/lib32-glib2 2.28.8-1
local/lib32-glibc 2.14.1-1
local/lib32-gnutls 2.12.7-1
local/lib32-gtk2 2.24.5-2
local/lib32-json-c 0.9-1
local/lib32-keyutils 1.4-2
local/lib32-krb5 1.9.1-1
local/lib32-libasyncns 0.8-2
local/lib32-libcap 2.21-1
local/lib32-libcups 1.5.0-1
local/lib32-libdrm 2.4.27-1
local/lib32-libgcrypt 1.5.0-1
local/lib32-libglade 2.6.4-2
local/lib32-libglapi 7.11.2-1
local/lib32-libgpg-error 1.10-1
local/lib32-libice 1.0.7-2
local/lib32-libjpeg-turbo 1.1.1-1
local/lib32-libldap 2.4.24-1
local/lib32-libogg 1.3.0-1
local/lib32-libpciaccess 0.12.1-1
local/lib32-libpng 1.4.4-2
local/lib32-libpng12 1.2.44-2
local/lib32-libpulse 1.1-1
local/lib32-libsamplerate 0.1.8-1
local/lib32-libsm 1.2.0-3
local/lib32-libsndfile 1.0.25-2
local/lib32-libtheora 1.1.1-1 (lib32)
local/lib32-libtiff 3.9.4-2
local/lib32-libvorbis 1.3.2-1
local/lib32-libx11 1.4.4-1
local/lib32-libxau 1.0.6-2
local/lib32-libxcb 1.8-1
local/lib32-libxcomposite 0.4.3-2
local/lib32-libxcursor 1.1.12-1
local/lib32-libxdamage 1.1.3-2
local/lib32-libxdmcp 1.1.0-1
local/lib32-libxext 1.2.0-2
local/lib32-libxfixes 5.0-1
local/lib32-libxft 2.2.0-2
local/lib32-libxi 1.4.3-1
local/lib32-libxinerama 1.1.1-1
local/lib32-libxml2 2.7.8-2
local/lib32-libxrandr 1.3.2-1
local/lib32-libxrender 0.9.6-2
local/lib32-libxt 1.1.1-1
local/lib32-libxtst 1.2.0-2
local/lib32-libxv 1.0.6-2
local/lib32-libxvmc 1.0.6-2
local/lib32-libxxf86vm 1.1.1-2
local/lib32-mesa 7.11.2-1
local/lib32-ncurses 5.9-3
local/lib32-nvidia-cg-toolkit 3.1-1
local/lib32-nvidia-utils 295.33-1
local/lib32-openal 1.12.854-2
local/lib32-openssl 1.0.0.d-3
local/lib32-pango 1.29.3-1
local/lib32-pcre 8.11-2
local/lib32-pixman 0.24.0-1
local/lib32-readline 6.2.001-3
local/lib32-sdl 1.2.14-2
local/lib32-sdl_image 1.2.10-2
local/lib32-util-linux 2.20.1-1
local/lib32-xcb-util 0.3.8-1
local/lib32-zlib 1.2.5-3

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 Assertion failed at pulsecore

Postby fb_jpk » Thu Apr 05, 2012 11:18 am

I'll be installing the Chakra Archimedes x86_64 on my work computer today, so that I can hopefully try to replace this issue and figure out a fix for it.

(At this point, I certainly cannot promise any fixes today, unless there happens to be some trivial workaround... But hopefully I'll have some info during next week).

One thing that might be helpful regarding the crashes in pulseaudio, would be if you could try the following:

Open the file ~/.frozenbyte/Trine2/options.txt, in that file, you should find the line:

Code: Select all

setOption(audioModule, "AudioEnabled", true)


Change that line to

Code: Select all

setOption(audioModule, "AudioEnabled", false)

Save the file and then try to start the game again. Does it still crash?

Changing that option won't fully disable the audio library in the game, but it will effectively prevent the game from trying to play any audio. So depending on what really causes the crash (playing audio / initializing audio / something totally audio unrelated) it might stop crashing - or it might not.

I know the game experience will not be enjoyable without sounds, so disabling audio certainly isn't a fix to the issue - but it would help if we could determine that it really is the playing of sounds that causes the game to crash, rather than some other, totally unexpected issue.

Ram-Z
Posts: 4
Joined: Tue Dec 20, 2011 12:03 am

Re: Trine2 Assertion failed at pulsecore

Postby Ram-Z » Thu Apr 05, 2012 4:17 pm

Thanks for the quick reply.

fb_jpk wrote:Change that line to

Code: Select all

setOption(audioModule, "AudioEnabled", false)

That didn't help. :( Same error.

I forgot to mention that the game worked without sound when lib32-libpulse was not installed.

On a side note: shadowgrounds, survivor and trine all work fine.

bbliss
Posts: 1
Joined: Sat Apr 07, 2012 12:01 am

Re: Trine2 Assertion failed at pulsecore

Postby bbliss » Sat Apr 07, 2012 12:03 am

I experienced the same error today on a far-from-stock Debian Testing (wheezy) install after purchasing the game as well, I'll post more details after I try it on my other box later tonight.

Tares
Posts: 1
Joined: Sat Apr 07, 2012 11:11 am

Re: Trine2 Assertion failed at pulsecore

Postby Tares » Sat Apr 07, 2012 11:15 am

Same issue here on Xubuntu 11.10 amd64.

Code: Select all

Linux tengoku 3.0.0-19-generic #32-Ubuntu SMP Thu Apr 5 18:22:38 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
GTX275 Nvidia 295.33
Pulseaudio stock


EDIT:

I've found a workaround, just start the game in window mode and everything works. Sounds, graphics and stuff :) although its annoying to play in that state.

Matthieu
Posts: 7
Joined: Fri Dec 31, 2010 12:35 am

Re: Trine2 Assertion failed at pulsecore

Postby Matthieu » Sun Apr 08, 2012 4:20 pm

When the first Trine came out users running it on a distributions with PulseAudio were starting it with padsp command:

padsp ./trine-launcher

Maybe that will solve the problem.

Nemoder
Posts: 3
Joined: Tue Apr 10, 2012 10:17 am

Re: Trine2 Assertion failed at pulsecore

Postby Nemoder » Tue Apr 10, 2012 10:20 am

Tares wrote:I've found a workaround, just start the game in window mode and everything works. Sounds, graphics and stuff :) although its annoying to play in that state.


Thanks for the tip! I spent an hour trying to get my game sound to work on Debian and gave up. It never occured to me running it windowed would solve the sound problem but it did.

pxc
Posts: 1
Joined: Fri Apr 13, 2012 3:25 am

Re: Trine2 Assertion failed at pulsecore

Postby pxc » Fri Apr 13, 2012 3:29 am

How strange. I'm running 64-bit Gentoo and experiencing the same problem. I can work around it one of two ways:
• killing pulseaudio before starting the game (annoying, since the rest of my system uses pulse)
• as I just found out, running the game in windowed mode… o.0

Ram-Z
Posts: 4
Joined: Tue Dec 20, 2011 12:03 am

Re: Trine2 Assertion failed at pulsecore

Postby Ram-Z » Fri Apr 13, 2012 6:22 pm

Running in windowed mode works great. I've created some special rules for the window (position of 0x0, no titlebar and frame), so now the game is at least playable.

It would still be nice to have this fixed for fullscreen.

Thanks

Ps: padsp didn't work for me

Der_Pit
Posts: 2
Joined: Fri Apr 13, 2012 5:40 pm

Re: Trine2 Assertion failed at pulsecore

Postby Der_Pit » Fri Apr 13, 2012 10:16 pm

Only after posting in a new thread about my problems in openSUSE (http://frozenbyte.com/board/viewtopic.php?f=17&t=4291) I found out that I am actually bitten by the same bug.
In addition to the 'Assrtion failed' I also see three messages

Code: Select all

Error: Couldn't open stream
.

As mentioned in my other post, for me it runs fine if I start it as root. Does that also work in your case?

Pit

yoguisu
Posts: 1
Joined: Fri Apr 20, 2012 1:22 pm

Re: Trine2 Assertion failed at pulsecore

Postby yoguisu » Fri Apr 20, 2012 1:23 pm

I have exactly the same error in Debian Wheezy (testing)

Solved playing in windowed mode.

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 Assertion failed at pulsecore

Postby fb_jpk » Mon Apr 23, 2012 12:40 pm

These pulseaudio related issues are rather curious, specifically when they are occurring in the fullscreen mode but not in the windowed mode (or affected by root vs user account running the game).

From the Trine 2 game perspective, there really should be no difference. In fullscreen, the game merely gives the SDL 1.3 library an additional parameter that tells it to run in fullscreen. After that, its pretty much just some internal magic that the SDL, desktop window manager / X and the display drivers perform.

As far as the audio is concerned, its hard to imagine how this fullscreen change has anything to do with it. :?

Most notable things that come to mind, on linux, the X fullscreen really works by temporarily changing the entire desktop resolution to the fullscreen resolution (if it does not happen to match the currently selected desktop resolution).
Once again, no idea how that would affect audio, but that desktop resolution change certainly is a more extensive operation, and could perhaps be imagined to trigger some possible audio bugs. (For example, perhaps some audio monitoring panel widget or such could trigger the issue in the audio, as the panels get hidden or the X resizes).

On the game engine side, the fullscreen vs windowed should have no connection with the audio, whatsoever. The only imaginable thing could be, that the fullscreen change causes the game process to get blocked for such a prolonged period of time, that the audio streaming somehow breaks when that happen as it cannot supply the audio streaming with new data (which of course should not break even in such a case, but might be triggered by some buggy audio library or such).

We'll try to reproduce this issue to be able to fix it or figure a workaround (other than running in the windowed mode), but so far there has been no luck - On our linux machines, we haven't yet seen this issue... But, trying to figure it out...

alt_turo
Posts: 195
Joined: Mon Dec 13, 2010 11:06 am

Re: Trine2 Assertion failed at pulsecore

Postby alt_turo » Fri Apr 27, 2012 2:08 pm

Something I remembered about alsa and PulseAudio...

When PA is enabled alsa tries to use it. This is done by searching for a plugin (libasound_module_pcm_pulse.so) at runtime using dlopen. Alsa only looks for this plugin in default systemwide directories. It is not searched in either RPATH or LD_LIBRARY_PATH because the dlopen is given the full path. It does not use dlopen with just the library name which would do automatic library lookup.

On 64-bit distro 32-bit alsa plugins are not installed and even if shipped with the game are not loaded because of this. I solved the issue by compiling a custom libasound.2.so which does the lookup correctly. This was shipped with at least some versions of Trine 1 Linux and allowed sound to work even when 32-bit binary was used on 64-bit distro with PA. I think this was later dropped and recommendation is now to use system-provided libasound.

The above applies to the version of alsa which was shipped with Debian Lenny (and Trine 1 Linux). Other versions or distributions might have fixed it already.

I have no idea how the fullscreen thing factors into this.
Turo Lamminen
Alternative Games

sverro2
Posts: 7
Joined: Tue Mar 27, 2012 1:17 pm

Re: Trine2 Assertion failed at pulsecore

Postby sverro2 » Sat Apr 28, 2012 10:41 am

Exactly the same problem on Kubuntu 12.04 64-bit.
On 11.10 I had the same problem, but after some time it did work. I installed ubuntu-desktop, started trine2 there and it worked. After switching back to KDE it still worked.
But now I have the same problem (with 12.04) and I don't want to install all kinds of desktop environments again.

sverro2
Posts: 7
Joined: Tue Mar 27, 2012 1:17 pm

Re: Trine2 Assertion failed at pulsecore

Postby sverro2 » Sat Apr 28, 2012 10:52 am

sverro2 wrote:Exactly the same problem on Kubuntu 12.04 64-bit.
On 11.10 I had the same problem, but after some time it did work. I installed ubuntu-desktop, started trine2 there and it worked. After switching back to KDE it still worked.
But now I have the same problem (with 12.04) and I don't want to install all kinds of desktop environments again.


EDIT: If I stop pulseaudio temporarily, Trine2 won't crash on startup, and then I can, when the game has started, "continue" pulseaudio.

lovenemesis
Posts: 2
Joined: Sun Jun 03, 2012 7:26 pm

Re: Trine2 Assertion failed at pulsecore

Postby lovenemesis » Sun Jun 03, 2012 7:42 pm

What you need is a 32bit alsa plugin to pulseaudio.

It will set up a virtual sound device accessible to 32bit applications, such as Trine 2, but forwarding all the request to 64bit system pulseaudio daemon.
Unlike the OSS plugin to ALSA, it's a plugin officially maintained by pulseaudio developers and upgraded with each pulseaudio release.

See my another post on how to install it on Fedora. I believe other distros have something similar in their repos.

viewtopic.php?f=17&t=4366&p=19391#p19391


Return to “Trine 2”

Who is online

Users browsing this forum: No registered users and 4 guests