I just tried distributing a small Mogre application and it failed to run on 64bit machines.
Is Mogre/Ogre supposed to work at all on a 64bit machine? I thought it would just "fall back" on x86...
If that's not the case and a specific 64bit set of binaries is needed, then are there any 64bit versions of the Ogre and Mogre DLLs available?
Yes it was set to x86.
The problem was the C++ redistributable missing from the target 64bit machine, which produces some odd errors.
OK this is weird.
On this 64bit maching, if the user chooses Directx to render, they get an exception thrown in ResourceGroupManager.Singleton.InitialiseAllResourceGroups when parsing the program scripts. The last log message before the exception is thrown is "Parsing Examples.program".
If they choose opengl for rendering they get an exception later on.
In both cases it is a memory access violation exception.
Does this ring any bells to anyone?
Do you use code optimisation and / or do you set debug informations to none ? I got a similar error where i got an access violation exception thanks to code optimisation. The program work just fine on debug, but get crashing on release mode (also at ResourceGroupManager.Singleton.InitialiseAllResourceGroups). As long as i remove code optimisation and let the generation of debug information by default, it work fine.
The problem turned out to be too old DirextX runtime on that target machine.
Here is the end of the log on this machine, in case someone comes across this in the future and scratches their head:
Parsing script OgreLoadingPanel.overlay
Finished parsing scripts for resource group Bootstrap
Parsing scripts for resource group General
Parsing script Examples.program
Unhandled Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
at MstoykeEngineTest.Program.Main(String args)