Problem with running OgreNewt samples in Visual Studio

bartek567

05-09-2007 14:59:27

Hello

I have a problem with running OgreNewt samples. When I try to run it I get an error message:


First-chance exception at 0x7c812a5b in Demo01_TheBasics.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x0012f07c..
First-chance exception at 0x7c812a5b in Demo01_TheBasics.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x0012f800..


However, when I run it outside the Visual Studio, everything is OK. I think it is something wrong with paths, but I don't know what exactly. The error occurres in exampleapplication.h file, in setupResources() method:


cf.load(mResourcePath + "resources.cfg");


I've already tried to change this line to this one (using direct path):


cf.load("C:\\OgreNewt\\demos\\bin\\debug\\resources.cfg");


In this case application started, but unfortunately there where no subsystems to choose in the "Rendering Subsystem" combo box :(. Currently I use:


  1. Windows XP SP2
    Visual C++ Express 2007
    OgreSDK 1.4.4 (path: C:\OgreSDK)
    OgreNewt 0.11 (pah: C:\OgreNewt)
    Newton SD 1.5 (path: C:\Program Files\NewtonSDK)
    [/list:u]

    I was trying to run "Demo01_TheBasics", which is situated in "C:\OgreNewt\demos\Demo01_TheBasics".

    Content of configuration files (C:\OgreNewt\demos\bin\debug):

    ogre.cfg:


    Render System=Direct3D9 Rendering Subsystem

    [Direct3D9 Rendering Subsystem]
    Allow NVPerfHUD=No
    Anti aliasing=None
    Floating-point mode=Fastest
    Full Screen=No
    Rendering Device=NVIDIA GeForce 6600 GT
    VSync=No
    Video Mode=800 x 600 @ 32-bit colour

    [OpenGL Rendering Subsystem]
    Colour Depth=32
    Display Frequency=60
    FSAA=0
    Full Screen=Yes
    RTT Preferred Mode=FBO
    VSync=No
    Video Mode=1024 x 768



    resources.cfg:


    [General]
    FileSystem=./
    FileSystem=../../Media/GUI/schemes
    FileSystem=../../Media/GUI/imagesets
    FileSystem=../../Media/GUI/fonts
    FileSystem=../../Media/fonts
    FileSystem=../../Media/materials/scripts
    FileSystem=../../Media/materials/textures
    FileSystem=../../Media/models
    FileSystem=../../Media/primitives

    Zip=../../Media/packs/OgreCore.zip
    Zip=../../Media/packs/cubemapsJS.zip


    plugins.cfg:


    # Defines plugins to load

    # Define plugin folder
    PluginFolder=C:\OgreNewt\demos\bin\debug

    # Define plugins
    Plugin=RenderSystem_Direct3D9_d
    Plugin=RenderSystem_GL_d


    As I said before when I try to run file" C:\OgreNewt\demos\bin\debug\Demo01_TheBasics.exe" manually everything works great. Could you tell me what am I doing wrong ?

    bartek567

walaber

06-09-2007 16:44:54

in the MSVC IDE, right click the project, and choose settings.

in the "debug" section, set the "working directory" to the directory where the .exe for the project is.

now when you debug, or run the project from inside the IDE, it can find all of the files it needs. make sure you change back the config file path to the local one as well!

Audiofile

20-10-2007 15:47:15

I too had this error, which was sorted by changing the working directory (Project Properties > Debugging > Working Directory) to point to where the executable was.

The error coming up now when I try and run any of the demos is...

'Demo08_RagdollExample.exe': Loaded 'C:\Ogre\ogreaddons\ogrenewt\demos\bin\debug\Demo08_RagdollExample.exe', Symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\ntdll.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\kernel32.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Ogre\ogreaddons\ogrenewt\demos\bin\debug\Newton.dll', Binary was not built with debug information.
'Demo08_RagdollExample.exe': Loaded 'C:\Ogre\ogreaddons\ogrenewt\demos\bin\debug\OgreMain_d.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\user32.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\gdi32.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\advapi32.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b\msvcp80d.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b\msvcr80d.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\msvcrt.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Ogre\ogreaddons\ogrenewt\demos\bin\debug\OIS_d.dll', Binary was not built with debug information.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\dinput8.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\imm32.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\msctf.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\lpk.dll', No symbols loaded.
'Demo08_RagdollExample.exe': Loaded 'C:\Windows\System32\usp10.dll', No symbols loaded.
First-chance exception at 0x76ebb09e in Demo08_RagdollExample.exe: Microsoft C++ exception: Ogre::InternalErrorException at memory location 0x0012ee24..
The program '[2436] Demo08_RagdollExample.exe: Native' has exited with code 0 (0x0).


Any clues anyone?

As a side note, there are two newton.dll's one in sdk/dll and one in sdk/dll_double, is the one from sdk/dll to be used?

walaber

23-10-2007 01:21:32

As a side note, there are two newton.dll's one in sdk/dll and one in sdk/dll_double, is the one from sdk/dll to be used?

yes

Audiofile

23-10-2007 16:17:47

OK, I'm still getting first chance exceptions on some of them when they're run even though the working directory is set correct on them all. Any one know what they're caused by?

It seems I've got a problem with the ragdoll. Firstly it doesn't walk around, just moves on the spot. But, I presume when you throw the ball at it, it should collapse, right? The ball goes straight through the guy.

Has anyone experience this or know why it would happen?

mesh

24-10-2007 20:47:29

Hi people I have a problem with running the OgreNewt examples also.

I get the same problem as Audiofile with the 'No symbols loaded' and First-chance exception except I have two of them.

Im using the OgreSDK and I added the newton.dll, mainogre.dll and ois.dll files to where the exe file of the Demo01_TheBasics project.

Can someone please help?


EDIT: Just added the filepath of the exe to the Working Directory option in the properties of the project.

Got the second First Chance Exception left though.

mesh

24-10-2007 23:54:49

Okies now I have got as far as running the Demo01_TheBasics but it crashes when I try to run it.

The sky background and objects appear but it freezes and I cant do anything.

I checked the Ogre.log file and found this following error message.

23:45:48: OGRE EXCEPTION(5:ItemIdentityException): OverlayElement with name Core/NumBatches not found. in OverlayManager::getOverlayElementImpl at ..\src\OgreOverlayManager.cpp (line 588)

Ahhhh im soo close yet sooo far from getting these examples working, someone please help.


I managed to fix the second First Chance Exception by adding the following files to the directory - C:\OgreNewt\demos\bin\release where the Demo01_TheBasics.exe is located after it has been compiled.

OIS.dll
OgreMain.dll
Newton.dll
RenderSystem_GL.dll
RenderSystem_Direct3D9.dll


EDIT: Now after I try to run it that error message doesnt appear in the log. Now I dont have a clue how to fix the problem :(

mesh

02-11-2007 22:43:23

Can any1 please help?

Theres gotta be people who managed to get OgreNewt working with the OgreSDK.

I still get this error message in the log.

08:49:55: OGRE EXCEPTION(5:ItemIdentityException): OverlayElement with name Core/NumBatches not found. in OverlayManager::getOverlayElementImpl at ..\src\OgreOverlayManager.cpp (line 588)

MrFabulous

08-02-2009 01:52:05

Thanks to walaber!!! The hint to change the working directory did it! Now I can enjoy OgreNewton to the fullest^^

Virginie

01-04-2009 13:42:55

Hello,
I would like to install ogreNewt but I can't compile demos.
I use Visual Studio 2005, ogre 1.6.1, last NewtonSDK and the last ogrenewt.
Errors are :
'setNormaliseNormals' : is not a member of 'Ogre::Entity'
'getWorldOrientation' : is not a member of 'Ogre::SceneNode'
'getWorldPosition' : is not a member of 'Ogre::SceneNode'

It's strange!

So I says me it's not serous because it's just demo but when I do the tuto getting started (http://www.ogre3d.org/wiki/index.php/Ne ... e_Dynamics) OgreNewt.h was not found.

So OgreNewt.h was not found because I can't compile demos?

Virginie

01-04-2009 15:51:03

I rectify now, when I do the tuto I've many many warning and one error which I don't found in all those errors!

Zero23

01-04-2009 17:42:54

May you want to try the OgreNewt for newton 2.0? I think that melven fixed there some demos!

Zero

Virginie

02-04-2009 08:47:37

No the last version of newton in the official web site so the 1.53. http://www.newtondynamics.com/downloads.html

Now I've got the error in the getting started : OgreNewt::BodyIterator::newtonIterator' : invalid calling convention '__cdecl ' for function compiled with /clr:pure or /clr:safe

I can't use a beta version because I work for a commercial software.

What is this error?

Thank you

(the next problem is at topic : [[http://www.ogre3d.org/addonforums/viewtopic.php?f=4&t=965]])

negativegeforce

06-04-2009 07:34:34

I had some problems compiling the rag doll demo today. The reason I had problems was I trying to compile the older OgreNewt with the newer Ogre.

I can compile and run OgreNewt and the demos after reconfiguring the paths in the project settings to where I have the SDK's installed.

These are the versions I am using...

Visual Studio 2005 (VS8) SP1
Ogre 1.6.1 SDK
OgreNewt revision 2678 checked out from http://svn.ogre3d.org/svnroot/ogreaddon ... t/newton20
Newton 2.0 beta http://www.newtondynamics.com/forum/viewtopic.php?f=9&t=4922

Hope that helps.

Splatocaster

12-08-2009 02:43:19

To be able to compile, you will need to update the OgreNewt Demo Solution file. First, select each project and go to Project->Properties, Configuration Properties, C/C++, and finally General. The top field is Additional Include Directories. Be sure that the OgreSDK include folder, the Newton SDK (You MUST use version 1.53, newer versions will not work with OgreNewt) folder, and the OgreNewt include folder is in there. Next, you will need to replace all occurrences of getWorldPosition() and getWorldOrientation() with _getDerivedPosition() and _getDerivedOrientation(). Either comment or completely erase all occurrences of setNormaliseNormals(true);. Then go to http://www.ogre3d.org/docs/api/html/Ogr ... ource.html . This is the OgreNoMemoryMacros.h file that msvc complains about. Copy the contents of that file to (OGRE_HOME)/include/OgreNoMemoryMacros.h . Now go to http://www.ogre3d.org/docs/api/html/Ogr ... ource.html and repeat, this time naming it OgreMemoryMacros.h . The solution file should now compile without error.

Open (OGRE_HOME)/bin/release and copy all of the files that are in there (except any executables) into OgreNewt/demos/bin/release. Now open the resource.cfg (the one you just copied into OgreNewt/demos/bin/release) in notepad and erase all contents in there. Paste the following code into resource.cfg than save it and close it. Finally, you will be able to open your demo executables!


# Resource locations to be added to the 'boostrap' path

# This also contains the minimum you need to use the Ogre example framework

[Bootstrap]

Zip=../../media/packs/OgreCore.zip



# Resource locations to be added to the default path

[General]
FileSystem=./
FileSystem=../../Media/GUI/schemes
FileSystem=../../Media/GUI/imagesets
FileSystem=../../Media/GUI/fonts
FileSystem=../../Media/fonts
FileSystem=../../Media/materials/scripts
FileSystem=../../Media/materials/textures
FileSystem=../../Media/models
FileSystem=../../Media/primitives

Zip=../../Media/packs/OgreCore.zip
Zip=../../Media/packs/cubemapsJS.zip