Really can't make mogre work!

mussul

12-02-2007 17:11:19

Hi, I know that this kind of problem has already been discussed and solved for some people but here solutions presented in other posts don't work!

I installed the C# express SP1 package AND the Visual studio SP1 redistributable and yet i get dll loading errors!

I uninstalled all other ogres that I had before, installed the Mogre0.1.9-OgreSDKSetup1.2.5_VC80.exe, checked the environment path, built the solution using visual c# express, then tried with visual studio .net 2005, and nothing

with express, pressing F5 I get:

System.IO.FileLoadException was unhandled
Message="Could not load file or assembly 'Mogre, Version=0.1.9.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Falha na inicialização do aplicativo devido a configuração incorreta. A reinstalação do aplicativo pode resolver o problema. (Exception from HRESULT: 0x800736B1)"
Source="Mogre.Demo.Gui"
FileName="Mogre, Version=0.1.9.0, Culture=neutral, PublicKeyToken=null"
FusionLog=""
StackTrace:
at Mogre.Demo.Gui.Program.Main(String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


Running from the debug folder directly, the program doesn't start, tradicional "this program found a problem and will be closed"

Then I copied the exes and exampleframework dll to the release folder, then ogre was able to start and displays some text at the console, but after "OpenGL rendering subsystem created" appears, an exception occurs


Unhandled Exception: System.Runtime.InteropServices.SEHException: External compo
nent has thrown an exception.
at Ogre.Root.{ctor}(Root* , basic_string<char\,std::char_traits<char>\,std::a
llocator<char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<ch
ar> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
at Mogre.Root..ctor()
at Mogre.Demo.ExampleApplication.Example.Setup()
at Mogre.Demo.ExampleApplication.Example.Go()
at Mogre.Demo.CelShading.Program.Main(String[] args)


Something interesting to note is that the ogre c++ samples are not running too after building with VS2005 ( "The application was not correctly initialized ... "), if debugging in vs2005 the output text is:

'Demo_BspCollision.exe': Loaded 'C:\OgreSDK\bin\debug\Demo_BspCollision.exe', Symbols loaded.
'Demo_BspCollision.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Demo_BspCollision.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'Demo_BspCollision.exe': Loaded 'C:\OgreSDK\bin\debug\OgreMain_d.dll', No symbols loaded.
'Demo_BspCollision.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll', No symbols loaded.
LDR: LdrpWalkImportDescriptor() failed to probe c:\OgreSDK\bin\Debug\OgreMain_d.dll for its manifest, ntstatus 0xc0150002
Debugger:: An unhandled non-continuable exception was thrown during process load
The program '[3580] Demo_BspCollision.exe: Native' has exited with code -1072365566 (0xc0150002).


That is so weird

Before all this, I was using the ogre 1.2.4 for vs 2003 and c++ as the language, and all worked fine. Never used Mogre before.

HELP PLZ!!!
thanks

Bekas

12-02-2007 18:50:22

then tried with visual studio .net 2005, and nothing
Try visual studio .net 2005 SP1 (that is, update visual studio too)

Then I copied the exes and exampleframework dll to the release folder, then ogre was able to start and displays some text at the console, but after "OpenGL rendering subsystem created" appears, an exception occurs


Unhandled Exception: System.Runtime.InteropServices.SEHException: External compo
nent has thrown an exception.
at Ogre.Root.{ctor}(Root* , basic_string<char\,std::char_traits<char>\,std::a
llocator<char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<ch
ar> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
at Mogre.Root..ctor()
at Mogre.Demo.ExampleApplication.Example.Setup()
at Mogre.Demo.ExampleApplication.Example.Go()
at Mogre.Demo.CelShading.Program.Main(String[] args)

This is probably an Ogre related exception, check the Ogre.log.

mussul

12-02-2007 19:09:42

nothing related to exception in the log:


16:30:19: Creating resource group General
16:30:19: Creating resource group Internal
16:30:19: Creating resource group Autodetect
16:30:19: Registering ResourceManager for type Material
16:30:19: Registering ResourceManager for type Mesh
16:30:19: Registering ResourceManager for type Skeleton
16:30:19: MovableObjectFactory for type 'ParticleSystem' registered.
16:30:19: Loading library OgrePlatform.dll
16:30:19: OverlayElementFactory for type Panel registered.
16:30:19: OverlayElementFactory for type BorderPanel registered.
16:30:19: OverlayElementFactory for type TextArea registered.
16:30:19: Registering ResourceManager for type Font
16:30:19: ArchiveFactory for archive type FileSystem registered.
16:30:19: ArchiveFactory for archive type Zip registered.
16:30:19: DevIL version: Developer's Image Library (DevIL) 1.6.7 Nov 9 2005
16:30:19: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw
16:30:19: Registering ResourceManager for type HighLevelGpuProgram
16:30:19: Registering ResourceManager for type Compositor
16:30:19: MovableObjectFactory for type 'Entity' registered.
16:30:19: MovableObjectFactory for type 'Light' registered.
16:30:19: MovableObjectFactory for type 'BillboardSet' registered.
16:30:19: MovableObjectFactory for type 'ManualObject' registered.
16:30:19: MovableObjectFactory for type 'BillboardChain' registered.
16:30:19: MovableObjectFactory for type 'RibbonTrail' registered.
16:30:19: Loading library .\RenderSystem_Direct3D9
16:30:19: D3D9 : Direct3D9 Rendering Subsystem created.
16:30:19: D3D9: Driver Detection Starts
16:30:19: D3D9: Driver Detection Ends
16:30:19: Loading library .\RenderSystem_GL
16:30:19: OpenGL Rendering Subsystem created.


I'll not be able to install vs2005 sp1 since it requires more than 6 gb of hd space, and this pc i'm using is very old and has only 4gb of free space

i have just tried to reinstall .net framework 2.0... but it remains as it is...
tried reinstalling the sp1s too.. wtf

maybe it's better first to discover why the normal samples don't run either
i'll see here

but 1 thing I can't understand: why everyone except me, downloaded this SDK, opened the solution, compiled and all worked perfectly lol That must be a punishment from the gods

mussul

12-02-2007 23:12:29

I am beginning to think that there is a problem with the nvidia driver that i installed recently

I tried to run an old app that i've done with ogre 1.2.3 or 1.2.4 that was working before, and guess... it crashed...
it stops after 'OpenGL Rendering Subsystem created. ' in the log too

so i went there and removed the opengl plugin, then it worked
That is very weird and unlikely to happen.

so i am soon going to reinstall the new SDK again to see if removing the opengl plugin i can run the mogre samples, it is shitty nonetheless

mussul

13-02-2007 03:26:27

:o
lol
now i compiled the mogre samples with c# express, removed the opengl plugin from plugins.cfg, then the release version of the samples worked

but I'm still confused about the reason why I can't debug? it still "Could not load file or assembly 'Mogre, Version=0.1.9.0,..... "
even exchanged the reference to the release version of the mogre dll to the debug one
or can I only debug using vs2005 sp1 ?

linkerro

13-02-2007 12:38:37

If you changed the reference to point to the release one change it back to the debug one. The release library doesn't contain the metadata needed for debugging, nor does it link to the c++ debug dlls.

If the problem persists post try to isolate if the problem is a mogre one or an ogre one. You never know.

mussul

13-02-2007 16:17:07

no, I changed the reference from the release version (which was default) to the debug version and yet it can't load the debug mogre.dll.

the problem is at run time, no build errors are mentioned, it can't load the debug mogre.dll, but it can load the release mogre.dll

I've installed the redistributable sp1 and the c# express sp1, the solution was made for vs2005 sp1, so now i'm downloading vs2005 sp1 to see if that is the problem

i'm very sad that it is not possible to debug with c# express though :cry:
If someone can, plz tell me how

thanks

Bekas

13-02-2007 17:59:44

Can you run the executable directly from the "c:\ogresdk\bin\debug" folder ?

i'm very sad that it is not possible to debug with c# express though :cry:
You mean you can't execute the application by pressing F5 ?
When you press F5 Visual studio executes the application from the project's bin folder, all the necessary DLLs cannot be found there and the application cannot run.

-You either copy all the necessary DLLs at the project's bin folder
-or as stated in this page you tell visual studio from what folder to execute the application.

The Mogre release DLLs will work fine and you'll debug the application. In order to see if you can use the Mogre debug DLLs try running the executable directly from the "c:\ogresdk\bin\debug" folder.

mussul

13-02-2007 22:52:05

When you press F5 Visual studio executes the application from the project's bin folder, all the necessary DLLs cannot be found there and the application cannot run.
Yeah, I forgot this detail :lol: lammy mistake of mine

this tip of using the release mogre.dll to debug (changing the working directory of the project to c:\OgreSDK\bin\release ) worked! thanks very much! (i am beginning with c# and visual c# express, so i don't have THAT experience)

yet, here, the debug version of mogre.dll doesn't work, if a sample is executed in the debug folder directly it crashes.
Do you have any clue about why the debug mogre.dll can't be loaded?

I'm installing vs2005 sp1 here, but it is taking a lifetime, i've never seen such a slow setup :? this computer can't be that bad :(

d3th_n1gG4

14-02-2007 09:23:46

That service pack setup is insanely slow :S