Mogre on Vista

mcaden

14-03-2009 18:06:38

I made a release for my texture painter, 'Squamster' and it ran fine in XP - tested on multiple machines. I get on a vista machine and it crashes horribly. After making sure all the redistributables were installed it still crashed. I ran dependency walker and it said it still couldn't find the vcredist. After repairing, reinstalling, manually adding the PATH, everything it still couldn't find it. Eventually I copied the DLLs straight into c:\windows\system32 from my visual studio 2008 redist directory and it found it! So I finally got past the DLL issue only to find this:


mRoot.Initialise(false, "Squamster");
Mogre.NameValuePairList misc = new Mogre.NameValuePairList();
misc["externalWindowHandle"] = this.splitContainer1.Panel1.Handle.ToString();
mWindow = mRoot.CreateRenderWindow("Main RenderWindow", 800, 600, false, misc.ReadOnlyInstance);

The last line throws and AccessViolationException.

This is on Vista only. It runs fine on XP on every machine I've tested so far. Any ideas? It makes no sense to me why this would crash, especially since previous versions ran fine on Vista.

J250

22-04-2009 23:06:13

Hi,
I've got MOGRE working fine in Vista, and I stumbled on this thread, so ill put in my two cents.
Do you have:
DirectX 9 - Vista has DirectX 10 NOT 9 :)
Also, your code, mine looks like this:
mRoot.Initialise(false);
NameValuePairList misc = new NameValuePairList();
misc["externalWindowHandle"] = form.Handle.ToString();
mWindow = mRoot.CreateRenderWindow("Main RenderWindow", 1024, 768, false, misc);

It runs under Vista as far as I know :)
Differences: I use a form's handle, not a panels (I use docking panels so a panel is probably best for your purposes), I dont get the read only instance of the external handle, but neither of those differences in code should make a difference at runtime (to this extent)!

What MOGRE version are you using?
Does the Ogre.log stop when loading Direct3D9 Render System?
Check all of your project references, but the AccessViolationException is very generic, and it can differ from machine to machine, so if this doesn't work I'm not sure if I can help much.
Hope it helped!
J250

AndroidAdam

28-04-2009 04:39:38

Are you running as an admin? I had the same problem, access violation exception. Right-click the .exe on select "Run as administrator from the context menu. Even if you are logged on as administrator it sometimes still requires you to do this.