![]() |
A few bugs in SVN - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3) +--- Forum: Bugs (https://www.vdrift.net/Forum/forumdisplay.php?fid=7) +--- Thread: A few bugs in SVN (/showthread.php?tid=585) |
A few bugs in SVN - thelusiv - 03-30-2007 I've been playing with VDrift on my new comp today and noticed a few problems. If I start a game, then leave the game, then start a new one, VDrift crashes. VDrift seems to crash every time I try to play or record a replay. Also, the list or replays in the Replays menu does not display anything. I'll look into the menu problem... - thelusiv - 03-30-2007 Last bit of info before the crash: Code: SOUND FORMAT: - joevenzon - 03-30-2007 Code: SOUND FORMAT: There's your problem. You need a 44.1khz engine sound. In my other projects I throw exceptions here that cause the game to exit, but as VDrift doesn't have a very robust exception system set up, I just have it complain to stderr. - thelusiv - 03-31-2007 Notice that in the desired format it shows a frequency and bits per sample values of 0. This is why it said it's not in the desired format. It probably got 0 because I haven't gotten my sound card on my new machine set up yet, and so there's no sound card to get info from. I got around this by writing a default constructor for the SOUNDINFO class that initializes frequency and bytespersample data members to reasonable values (44100 and 2 respectively). Despite this being fixed, I still get crashes when I try to start a game and record a replay: Code: include/bipointer.h,63: Asked for NULL pointer - joevenzon - 03-31-2007 Ohhh, you don't have a sound card? Then run "vdrift -nosound" I'm going to remove the changes to the constructor you made, because they'll let you get around the checking and load things without successfully initializing first, which, as you found, is bad. By the way, the copy constructor and operator= members you wrote are not needed because the defaults will work fine and will automatically update whenever the class members change.... Did you get an "Error opening audio device" or "Sound interface did not create...etc" when you started the game? If so, I can make it just disable sound automatically when that happens. - thelusiv - 03-31-2007 Ah yes, I forgot about the -nosound option...but really there should be some way VDrift figures this out on its own, instead of crashing. edit: anyway it still doesn't work. Code: SOUND FORMAT: Pretty sure this is related to replays though, not sound. - joevenzon - 03-31-2007 I don't think it's due to replays. The last line is my bipointer class (a poorly named smart-ish pointer class) telling us that someone asked for a pointer that's NULL. If something's asking for a pointer that's NULL, it's probably because it's about to use it (and create a SEGFAULT). The only class using bipointers is the sound class, and it's used by the gl_car class to get a reference to newly created sources. Like I said, normally when you get a "src/sound.cpp,589: Sound file isn't in desired format" message, I'd throw an exception and have the game quit, because you're going to get a crash later. To say that another way, the game will crash if you get this message. So, don't be surprised. :-) - joevenzon - 03-31-2007 In R1663 I made the sound engine automatically disable sound if the init fails. I also more completely disabled sound to try to address crashing. Give it a shot and see if it fixes things for you. I can now play the game fine with -nosound, even after leaving and starting over while recording a replay. - thelusiv - 03-31-2007 Seems fine now to me. I tried running it normally without -nosound. It ran OK, I was able to record replays and play as many games as I liked without crashing. I also didn't get a ton of messages about sounds not being in the expected format. Thanks! - abs1nth - 04-01-2007 trunk wasn't compiling anymore since about 1654, this fixes it but i don't know if it is correct: Code: Index: include/sound.h - joevenzon - 04-01-2007 I'm not sure why that was causing issues with your compile... but yeah, that fix is fine. I'll make the same fix in my version and check it in. Originally I wanted that function to be inline because it got called a lot, but that's no longer the case, so it's fine. - abs1nth - 04-01-2007 i'm also not sure what the issue is/was it compiled fine for the i386 version but for ppc i got this linker error: /usr/bin/ld: Undefined symbols: SOUNDBUFFER::GetSoundInfo() const vdrift.build/Objects-normal/ppc/Gl_Car.o reference to undefined SOUNDBUFFER::GetSoundInfo() const collect2: ld returned 1 exit status |