This application has requested the Runtime to terminate it i

AndroidAdam

11-09-2008 19:50:58

Hi, I downloaded mogre and the latest framework set the correct path variables and added references to both Mogre and MogreFramework (release) in my project (using Visual Studio 2008) and then added the following code:

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using MogreFramework;
using Mogre;

namespace Test
{
static class Program
{
[STAThread]
static void Main()
{
OgreWindow win = new OgreWindow();
win.Go();
}
}
}


And I was expecting it to show me a blank render window, exactly what I wanted. But after the splash screen comes up, it hangs and gives me an error message "This application has requested the Runtime to terminate it in an unusual way. Please contact the applications support team for more information."

Any ideas on what I'm doing wrong? I have service pack 1 and the DirectX SDK.

Thanks in advance.

WarehouseJim

12-09-2008 11:07:19

I started with MOGRE recently, and had similar problems. You can get more details about the error by following the "Exception Handling With Mogre" steps in the Basic Tutorial 0. If you put the try / catch around around the stuff in Main.

I expect your problem is the same as mine in that it wasn't finding a lot of the .dlls that you require. I suspect this is an issue with setting up the Path variable, but I got around it by doing:
-copy all the .dlls from C:\MogreSDK\bin\Release to your project's bin\Release folder. Similarly do the same with the Debug folders.
-I then found that my plugins.cfg file wasn't working with the *_d type plugins (for debug), so I ended up removing the _d from the plugins.cfg and using the .dlls from C:\MogreSDK\bin\Release in the debug version as well.

Anyway, it's not the proper solution, but it's a hack that should work.

Another issue that I had was if you are running 64bit (I'm running 64bit XP), you need to force the compiler to compile to 32bit (like the SDK). If you are using Visual C# Express, you can't do this (unless you are opening a project that has already set this up.) So download SharpDevelop, which is essentially a clone and very good.

Roy Berube

16-09-2008 05:51:06

Another issue that I had was if you are running 64bit (I'm running 64bit XP), you need to force the compiler to compile to 32bit (like the SDK). If you are using Visual C# Express, you can't do this (unless you are opening a project that has already set this up.) So download SharpDevelop, which is essentially a clone and very good

I had this problem with Visual C# on Xp-64. Since upgrading to visual studio 2008 it defaults to not including the configuration setting so that you cannot even change it. How annoying.

The solution is to open up the 'tools/options' menu and turn on the 'show all' button on the bottom left. Then check the 'Show advanced build configurations' check box under the 'Projects and Solutions / General' page.

I don't want to hijack the thread but hope this helps someone else.