0
0

I’ve been getting a crash on certain machines in System::init(). The top three functions of the call stack are getUserData(), but that seems a little weird (and I know Brett mentioned long ago that callstacks full of getUserData() are incorrect)

Here is a screenshot of the crash:
[img:35dt86af]http://img522.imageshack.us/img522/1599/fmodcrashos2.jpg[/img:35dt86af]

Here is our init call:

[code:35dt86af]
// Initialize FMod
FMOD_RESULT result;
FMOD_SPEAKERMODE speakermode;

// Create the FMOD System object
result = FMOD::System_Create( &FModSystem );
FMODERRCHECK(result);

result = FModSystem->getDriverCaps(0,0,0,0,&speakermode);   // Get speaker mode for default driver.
FMODERRCHECK(result);
result = FModSystem->setSpeakerMode(speakermode);  // set speaker mode based on driver capabilities

result = FModSystem->init(200, FMOD_INIT_NORMAL, 0);  // 200 virtual channels (instead of whatever MAX is)
FMODERRCHECK(result);[/code:35dt86af]
  • You must to post comments
0
0

That seems very odd, noone else has this issue and i use that logic every day. There must be sometihng else you are doing. Why would yours do that and not the fmod examples? What is different?

(ps yess that callstack is not correct System::init does not call getUserData)

  • You must to post comments
0
0

After pasting the code, I realized that I had two versions of my init function un-commented (smack).

I removed it from the post in case it was some other problem, but removing the second one fixed the crash on the user’s PC.

Calling init() twice crashed on maybe 1% of our machines… odd. Either way, resolved now, thanks for your time.

Is there any way to figure out what the correct call stack is? It looks like it’s referencing code and the only function it knows is getUserData() so it just provides appropriately-large offsets from getUserData() that point at where I really am.

  • You must to post comments
0
0

There is a fix coming if you call close immediately after init it would crash in rare cases, it is probably related to your problem (calling init twice closes the system inbetween internally)

  • You must to post comments
0
0

Ok, that clears it up. Thanks!

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.