|
Game crashes on friend's PC |
Raf Vermeulen
Member #7,166
April 2006
|
I almost finished my game and'm talking to the guy who's going to take care of the music (current music's copyrighted by Nintendo, so not usable). The game runs fine on my comp, and has been tested and works fine on a couple of friends' comps. Only issue I've noticed, is that it tends to crash when starting up if you're playing music. The composer friend tried the game out, but all he gets, is a quick flash of a window, and it's gone again. It simply doesn't work for him. I have no idea what the problem may be. Any help on figuring this out is well appreciated. I've attached the game with source and all relevant files. |
X-G
Member #856
December 2000
|
Make your program log things and do more stringent error checking, and make your friend run a debug version through gdb. -- |
Raf Vermeulen
Member #7,166
April 2006
|
Well, log and error checking... dunno how much that'd do. The moment the game starts up and initiazed Allegro, it checks if high.txt is made, and if not, it makes that. Even that's not the case for my friend, so it must be something there. My bet's at a missing DLL or so. Edit: Made a build which pauzes after every initialization part, with command-shell output. Quote:
Okay, it stops after 'Timer installed' and this time I get the error message: Looking further into it... Might just be something with his comp, as he's not playing any music, but's said to have had a weird issue with his speakers earlier today. |
gnolam
Member #2,030
March 2002
|
Quote: Well, log and error checking... dunno how much that'd do. It would let you find the error, instead of blathering nonsense about missing DLLs. -- |
piccolo
Member #3,163
January 2003
|
well its not a dll you seem to have every thing. I recommend getting the stats of the computer it crashed on. and test on a similar computer. wow |
Raf Vermeulen
Member #7,166
April 2006
|
How friendly, Gnolam. Anyways, looked further into the speaker issue. Quote:
Them: The thing is; I had this weird issue with my speakers earlier today, so it might as well be that If he can play the midi-file and hear it outside the game, then it's not his comp, but something with the game. There's something wrong with the sound initialization there. The code that does this, is this: if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL) != 0) { allegro_message("Error initialising sound system\n%s\n", allegro_error); return 1; }
|
piccolo
Member #3,163
January 2003
|
i do not think log files will help in this case but they are good to have. Edit: Quote: If he can play the midi-file and hear it outside the game, then it's not his comp, but something with the game. There's something wrong with the sound initialization there. nope nothing wrong with game itself you tested it on other computers. there is some thing wrong with his computers config. wow |
Raf Vermeulen
Member #7,166
April 2006
|
Is there a way to catch the sound initialization error and get it going anyways? Computer reboot didn't fix the issue, btw. |
piccolo
Member #3,163
January 2003
|
if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL) != 0) { allegro_message("Error initialising sound system\n%s\n", allegro_error); return 1; }
return 1; is end the loop when the error happens tack out the return 1; so do some thing like this.
wow |
Raf Vermeulen
Member #7,166
April 2006
|
Alright. Thanks for the help:) We'll see if this gets the game working. Problem's still there:-/ Time to put more checks in it to follow the flow. Now it crashes here: set_color_depth(16); cout << "Colour depth set\n"; system("pause"); if(set_gfx_mode( GFX_AUTODETECT_WINDOWED, SCR_WIDTH, SCR_HEIGHT, 0, 0)) exit(1); Colour depth set is the last message he gets, so it's a problem with set_gfx_mode this time. Bit odd that it's at another autodetect. Edit (Nth): Ahh, problem solved. Friend was testing a friend of his' website out and had his comp in 800x600, which's also the resolution of the game. Seems like it didn't like that. |
piccolo
Member #3,163
January 2003
|
you should had something like what you had for sound allegro_message("Error initialising sound system\n%s\n", allegro_error); wow |
Raf Vermeulen
Member #7,166
April 2006
|
So catching it and changing SCR_HEIGHT and SCR_WIDTH accordingly? Will see if I can add that:) It all works like a charm now. Thanks alot for all the help:) |
|