Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » A5: al_install_audio() fails on one of many test computers

Credits go to Thomas Fjellstrom for helping out!
This thread is locked; no one can reply to it. rss feed Print
A5: al_install_audio() fails on one of many test computers
TeaRDoWN
Member #8,518
April 2007
avatar

I've almost finished my latest game and a few people are given a beta version. Everyone can play without any problems but one person is have a serious problem. The game crashes out as soon as the game is started. With logging to file we've narrowed it down to crash when al_install_audio() is called. This odd thing is that it only crashes on one machine out of like ten.

Got this information from the tester:
"It's an onboard soundcard of my ASRock K7-880 motherboard, with latest drivers from the manufacturer's website installed. Sound works fine in everything else."

Rare occations the game do get past the crash call at al_install_audio() but then no sounds are played. Allegro 4.x programs work with sound.

Game is compiled with allegro-5.0.6-monolith-mt.lib and I've attached allegro-5.0.6-monolith-mt.dll with the game.

Edgar Reynaldo
Member #8,592
May 2007
avatar

al_install_audio returns true or false depending on whether it is successful. You should check for that at least. Give him a version linked to the debugging allegro libs and have him run that instead. Then check allegro.log for clues.

TeaRDoWN
Member #8,518
April 2007
avatar

Looking at the bool won't work since the process crash INSIDE al_install_audio(), if it didn't I would have got the next text line written in my log file:

  log("al_init()");
  al_init();
  ...
  log("al_install_audio()");
  al_install_audio();
  log("srand(time(NULL))");
  srand(time(NULL));
  ...

The log file ends with "al_install_audio()" so it never get past that. Process just disapear.

Thomas Fjellstrom
Member #476
June 2000
avatar

If that's the case, you'll have to try his second suggestion.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

TeaRDoWN
Member #8,518
April 2007
avatar

What do you mean with "debugging allegro libs"? Should I send him another dll than the one I sent him before? Or do I need to compile the game with another Allegro lib file in the linker AND send him another dll?

I'll see if I can get him to digg out something from the allegro.log file.

EDIT: There is no such file according to him. Is it always generated or only when you run with debug libs?

Matthew Leverton
Supreme Loser
January 1999
avatar

You have to recompile using the debug version of Allegro and send him the new files. When (or after) running, you'll see an allegro.log file in the same directory as the executable.

Karadoc ~~
Member #2,749
September 2002
avatar

I thought log took a double as its argument. Maybe that's your problem! :p Or maybe the log buffer thing is not being flushed before the program crashes.

-----------

Edgar Reynaldo
Member #8,592
May 2007
avatar

The standard c library log function is probably only visible when you include math.h or cmath. It's likely a custom function of his own with the same name.

Sorry, I didn't read close enough. You're probably gonna need access to his computer, or to teach him how to use a debugger. That or hope the debugging build gives you a clue why it is crashing in the allegro.log file.

TeaRDoWN
Member #8,518
April 2007
avatar

Ok, thanks everyone. I'll send a debug version to him. When I know more I'll post here for advice when I get a reply from him.

Regarding log() it's a function of my own yes. It writes to a file and to make sure it get written I open and close the file on every log() call. Not efficient but that's not needed in this case. Logging will be removed when game is released.

EDIT: After user rolled back one version of the drivers for the soundcard the issue is now gone. So it was most likely related to the drivers being faulty than Allegro. Thanks for all the support.

Go to: