64bit

amirabiri

12-01-2011 23:46:38

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?

smiley80

12-01-2011 23:55:11

Properties->Build->Platform target->x86

amirabiri

13-01-2011 00:45:43

Yes it was set to x86.

The problem was the C++ redistributable missing from the target 64bit machine, which produces some odd errors.

amirabiri

13-01-2011 07:22:43

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?

GantZ

13-01-2011 08:48:05

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.

amirabiri

15-01-2011 18:36:04

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 Ogre.ResourceGroupManager.initialiseAllResourceGroups(ResourceGroupManager
* )
at Mogre.TutorialFramework.BaseApplication.LoadResources()
at Mogre.TutorialFramework.BaseApplication.Setup()
at Mogre.TutorialFramework.BaseApplication.Go()
at MstoykeEngineTest.Program.Main(String[] args)