Answered
0
0

After successfully initializing FMOD 4.44.35 with FMOD::EventSystem_Create() and obtaining the FMOD::System object via FMOD::EventSystem::getSystemObject(), all attempts to use that object fail with FMOD_ERR_INVALID_HANDLE – for example, FMOD::System::setSoftwareChannels( 64 ) returns FMOD_ERR_INVALID_HANDLE. (I see that “invalid handle” error with all subsequent FMOD::System calls.) This is code that works without error on the Xbox 360 and PS3, but fails on Windows. Am I missing something? I’ve read through the “FMOD Event System – Best Practices For Programmers” and “Getting started with FMOD for Windows” documents, and the documentation of the relevant functions in fmodex.chm, but none of those documents talk about why functions like FMOD::System::setSoftwareChannels() can return FMOD_ERR_INVALID_HANDLE .

Note, this is on Windows 7 using Visual Studio 2012 and the v110 toolchain. The game is linked against fmodex_vc.lib, fmod_eventL.lib, and fmod_event_netL.lib.

Possibly related – if I replace FMOD::EventSystem_Create() with FMOD::System_Create(), I get the following crash report:

Unhandled exception at 0x555E4D29 (fmodex.dll) in Game.exe: 0xC0000005: Access violation writing location 0x00000000.

with this stacK:

fmodex.dll!555e4d29()   Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for fmodex.dll]    
Game.exe!FMOD::System_Create(FMOD::System * * system) Line 45   C++
Game.exe!AudioLibrary::InitializeLibrary() Line 228 C++

and if I switch to fmodexL_vc.lib from fmodex_vc.lib, then FMOD::EventSystem_Create() crashes in a similar fashion:

Unhandled exception at 0x50444650 (fmod_eventL.dll) in Game.exe: 0xC0000005: Access violation reading location 0x0000000B.

fmod_eventL.dll!50444650()  Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for fmod_eventL.dll]   
fmod_eventL.dll!5045cb92()  Unknown
fmod_eventL.dll!5044d6ec()  Unknown
Game.exe!FMOD::EventSystem_Create(FMOD::EventSystem * * eventsystem) Line 35    C++
Game.exe!AudioLibrary::InitializeLibrary() Line 293 C++

What can cause a crash writing to location 0x00000000 in FMOD::System_Create() / FMOD::EventSystem_Create? Why does FMOD::EventSystem_Create()’s FMOD::System object return FMOD_ERR_INVALID_HANDLE on all function calls? Thanks,

scott

  • You must to post comments
Best Answer
1
0

We took this onto private support and tracked down the crashes to the application providing memory allocation and event lifecycle callbacks of the incorrect signature and calling convention.

  • You must to post comments
0
0

Hi Scott,

fmod_event and fmod_event_net are not designed to be linked into an application simultaneously.

It may “just work” on statically linked platforms like PS3 and Xbox 360, but there are issues on dynamically linked platforms.

  • Scott Hofmann
    Removing fmod_event_net.lib from the link line (leaving just fmodex_vc.lib and fmod_event.lib) did not affect the crash any. In fact, it crashes unless the link line contains exactly this: fmodex_vc.lib;fmod_eventL.lib - i.e. I have to use the logging version of fmod_event. lib or it crashes in FMOD::EventSystem_Create. What else can cause this kind of crash? Thanks, scott
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.