Many strange MOGRE Issues (Win7) 1.4.6,1.4.8,1.6.2

J250

22-04-2009 22:40:02

Summary:
Hi,
I have been having a succession of different errors in Windows 7 with different versions of MOGRE.
I do not know why these errors occur or how they are produced. I have done a fair bit of searching but most of the topics I find are dead ends, or for other versions of wrappers (1.2.0 of OgreDotNet for instance...). I shall try to list the errors!

Note1: I have recently upgraded to Windows 7 from Windows Vista (vista worked fine for this stuff)
Note2: When upgrading to Windows 7 I changed the structure of my PC, from MOGRE being in the default C:/MogreSDK... to D:/Programming/MOGRE/Mogre 1.4.8 etc. do the spaces make a difference? (This method seriously organized everything OGRE...with plugins, sdk versions, demos easy to find etc. I suggest it...if it works xD)

Errors
A procedure imported by 'Mogre, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null' could not be loaded.
More info: 1.4.6 works FINE and 1.4.8 seems to now work fine (after fix attempts). No specific line causes error.

A procedure imported by 'Mogre, Version=1.4.8.0, Culture=neutral, PublicKeyToken=null' could not be loaded.
More info: I sometimes get/got (cannot reporoduce after I tried to fix it: see fix attempts) this one too, for MOGRE 1.4.8

The type initializer for 'WorldEditor.Main' threw an exception.
More info: After applying fix attempts, I get this one (for MOGRE 1.4.8 bin and 1.6.2 bin). No clue on this one, although build 1.4.6 works with the same code! No specific line causes error.

The specified module could not be found. (Exception from HRESULT: 0x8007007E)
More info: In my opinion the weirdest one of the lot, seemed to occur from me having MogreNewt originally (disposing a World object) but it had random triggers previously, came up blanks on this one.

My setup:
As far as OGRE/MOGRE goes, this is my setup:
  1. DirectX 10 - Built into Win7[/*:m]
  2. DirectX 9 (November 2008)[/*:m]
  3. Visual Studio 2008[/*:m]
  4. Visual Studio 2008 SP1[/*:m]
  5. Visual C++ 2005[/*:m]
  6. .Net Framework 1.1[/*:m]
  7. .Net Framework 2.0 (In OS) [/*:m]
  8. .Net Framework 3.5 (Either in OS, or bundled with VS2008 (I installed 2.5 and 3.5 components etc.))[/*:m]
  9. nVidia Pre-Release drivers for Windows 7[/*:m][/list:u]
    See fixes for recently installed software

    Attempted Fixes:
    Having done this many times before I didn't think and dived straight in, which was obviously stupid ;) Therefore I applied these fixes, in order to rectify possible errors (e.g. the HRESULT -0x.... one)
    Based on MOGRE_Tutorial_0 in the wiki I thought I did not do some steps,
    1. Installed C++ 2008 Redist just in case (I already have 2005 and SP1!)[/*:m]
    2. Added my MOGRE directory to my PATH directory (yes I forgot...)[/*:m]
    3. Rebooted after this :P[/*:m][/list:u]
      Conclusion:
      I hope I have explained everything alright, and if you need more system info from me, dont hesitate to ask.

      Has anyone else got MOGRE working in Windows 7?
      If so, do you also get the bug where the exception window (the one with help suggestions etc.) dissapears, and you have to guess where the X button is before you can close the exception window and stop debugging?

      Also, of course if you have had similar errors or have a solution PLEASE post! :D
      Sorry for the long read, but I really appreciate any help on this matter!
      And I also apologize if these errors are something simple I overlooked...I've looked but cant find much :)
      Thanks,
      J250

soaring

20-12-2009 12:31:58

Hi,

1) check you are building your project in x86 mode.
2) check your plugins.cfg to point to release directory for loading plugins cause code
try to load module in release mode (ie : "RenderSystem_Direct3D9.dll" is naming "RenderSystem_Direct3D9_d.dll" in de debug folder cause it cause crash)

Hope this help.

hedphelym

21-12-2009 06:14:35

I use windows 7 x64, and one of the most important things to remember is to compile to x86.
If you forget that, then you usually get something like this:
A procedure imported by 'Mogre, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null' could not be loaded.

Also important to remember is to make sure all the needed dll's get's accessed by your exe.

what I did to make it work, was to download newest SDK, then get the "additional samples",
install to default sdk dir, extract\overwrite with the additional samples, open solution, select "x86" then compile and everything runs.

I also had trouble before getting started, but newest sdk and samples seems to work straight away.