Darwinia + ALSA = crash on start

Problems with the Linux version of Darwinia

Moderators: jelco, bert_the_turtle, Chris, andy, John

cyph
level1
level1
Posts: 21
Joined: Sun Oct 14, 2001 8:38 pm
Contact:

Darwinia + ALSA = crash on start

Postby cyph » Mon Dec 20, 2004 5:22 pm

Exporting "SDL_AUDIODRIVER=alsa" causes darwinia to segfault before it starts. Darwinia segfaults after trying to initialize audio with a "No available audio device." error. blackbox.txt is empty, but bdove was able to reproduce this behavior on IRC so it seems to be relatively easy to track down.
User avatar
Dave2
level4
level4
Posts: 550
Joined: Wed Feb 20, 2002 9:07 pm
Location: Reading, England

Postby Dave2 » Mon Dec 20, 2004 5:39 pm

I get the same but without a segfault:

Code: Select all

dave@Vigor54:~/darwinia> ./darwinia
SDL Version: Compiled against 1.2.8, running with 1.2.8
Creating ResourceManager: 0.3
 
Creating SoundSystem: 14.0
 
Creating ClientToServer: 14.0
 
Initialising SoundSystem : 15.1
 
Initialising SDL Audio
Failed to open audio output device: "No available audio device"


Replacing libSDL-1.2.so.0 with my distro's fixed it though.
Don't think about The Game.
bdove
level1
level1
Posts: 10
Joined: Mon Nov 15, 2004 9:26 am
Location: Finland
Contact:

same problem here...

Postby bdove » Mon Dec 20, 2004 5:43 pm

SDL Version: Compiled against 1.2.8, running with 1.2.8

strace output:

Code: Select all

31386 gettimeofday({1103560847, 726970}, NULL) = 0
31386 gettimeofday({1103560847, 727023}, NULL) = 0
31386 gettimeofday({1103560847, 727079}, NULL) = 0
31386 gettimeofday({1103560847, 727134}, NULL) = 0
31386 gettimeofday({1103560847, 727186}, NULL) = 0
31386 gettimeofday({1103560847, 727233}, NULL) = 0
31386 write(1, "Initialising SDL Audio\n", 23) = 23
31386 write(2, "Failed to open audio output devi"..., 64) = 64
31386 open("blackbox.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 13
31386 fstat64(13, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
31386 mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43051000
31386 open("userid.txt", O_RDONLY)      = 14
31386 fstat64(14, {st_mode=S_IFREG|0600, st_size=44, ...}) = 0
31386 mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43071000
31386 read(14, "Username: bdove\nEmail: bdove@raz"..., 131072) = 44
31386 close(14)                         = 0
31386 munmap(0x43071000, 131072)        = 0
31386 open("preferences.txt", O_RDONLY) = -1 ENOENT (No such file or directory)
31386 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
31386 open("blackbox.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
31386 fstat64(14, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
31386 mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43071000
31386 open("preferences.txt", O_RDONLY) = -1 ENOENT (No such file or directory)
31386 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
31384 <... waitpid resumed> [WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV], 0) = 31386
31384 fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
31384 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40145000
31384 write(2, "./darwinia: line 4: 31386 Segmen"..., 69) = 69
31384 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
31384 --- SIGCHLD (Child exited) @ 0 (0) ---
31384 waitpid(-1, 0xbfffecbc, WNOHANG)  = -1 ECHILD (No child processes)
31384 sigreturn()                       = ? (mask now [])
31384 rt_sigaction(SIGINT, {SIG_DFL}, {0x807bce0, [], 0}, 8) = 0
31384 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
31384 read(255, "", 85)                 = 0
31384 munmap(0x40145000, 4096)          = 0
31384 exit_group(139)                   = ?

( rm libSDL-1.2.so.0 ; ln -s /usr/lib/libSDL-1.2.so.0 . did the trick here also)
User avatar
John
Introversion Staff
Introversion Staff
Posts: 511
Joined: Sun Dec 10, 2000 6:22 pm
Location: London, UK

Postby John » Mon Dec 20, 2004 5:53 pm

Thanks. I've replicated the problem here, I'll see what I can do about it. In the mean time you should be able to make progress by deleting or renaming the supplied libSDL (which supports OSS only).
coolsi
level5
level5
Posts: 3990
Joined: Wed Apr 10, 2002 6:46 pm

Postby coolsi » Tue Dec 21, 2004 11:31 am

I was able to fix this (by accident) by doing:

simon@super:~/darwinia$ export AUDIODEV=hw:1,0

I did this to make Darwinia use my 2nd sound card (I have 2...crazy, huh?). If you change the hw:1,0 to whatever your sound card is, it should work.
User avatar
Dave2
level4
level4
Posts: 550
Joined: Wed Feb 20, 2002 9:07 pm
Location: Reading, England

Postby Dave2 » Tue Dec 21, 2004 2:40 pm

beta4c fixes this for me.
cam217
level0
Posts: 8
Joined: Sun Feb 20, 2011 3:37 pm
Location: France

Postby cam217 » Tue Jul 12, 2011 11:45 pm

Hello,

It's been 3 hours since i'm looking over internet to find a solution to get this game to work and I'm stuck with an issue similar to this topic.
When I try to launch the game, it almost launches then goes back to command line with this output:

Code: Select all

[cam@arch Darwinia]$ ./darwinia
.
SDL Version: Compiled against 1.2.9, running with 1.2.8
Initialising SDL Audio
Failed to open audio output device: "No available audio device"
sh: gdb: command not found


I tried to remove the SDL lib from darwinia path and make a symbolic link with the one of the system like in this thread but it didn't worked.
I'm running out of ideas and patience and I don't know what to do next, please help get this working.
Thanks.
cam217
level0
Posts: 8
Joined: Sun Feb 20, 2011 3:37 pm
Location: France

Postby cam217 » Mon Jul 18, 2011 1:34 pm

So noone knows how to deal with that ??
Not even some of the people who developped that game??

Can someone tells me where I should define the audio device? Is it in darwinia folder or in a system folder? By the way I have audio on my computer!
It seems that this is the only thing that makes me unable to run the game.
User avatar
bert_the_turtle
level5
level5
Posts: 4795
Joined: Fri Oct 13, 2006 6:11 pm
Location: Cologne
Contact:

Postby bert_the_turtle » Mon Jul 18, 2011 4:41 pm

I don't have the Linux version for that, but the problem seems to be that the old version of SDL included with the game can't find an audio device on your current system. Solution for that: just delete the included SDL library, have the game use your system supplied one. It sounds like you tried something along those lines already, but try again.
cam217
level0
Posts: 8
Joined: Sun Feb 20, 2011 3:37 pm
Location: France

Postby cam217 » Tue Jul 19, 2011 8:16 am

Can't try again right now because I'm not at home but I did try to remove the SDL lib and use the system one but it wasn't working better. I don't know what I can do more about it.

I think this is not the solution, it would be better to redefine the audio device but I just need to know where it should be defined.
cam217
level0
Posts: 8
Joined: Sun Feb 20, 2011 3:37 pm
Location: France

Postby cam217 » Sat Dec 17, 2011 12:15 pm

Hi,

I found a way to make it run without sound, I run the game from this script:

Code: Select all

#!/bin/bash

export SDL_AUDIODRIVER=disk
export SDL_DISKAUDIOFILE=/dev/null
export SDL_PATH_DSP=/dev/snd
/home/cam/Games/darwinia/./darwinia


Of course, you need to adjust the path to the executable file.

EDIT: Found the packages to install to get the game working with sound (in that case, don't use the script above). I just needed to install a few packages:

Code: Select all

yaourt -S lib32-alsa-plugins

Return to “Linux Issues”

Who is online

Users browsing this forum: No registered users and 3 guests