Exception OgreApplication.exe (RESOLVED)

IlBrillanteJack

13-10-2010 17:13:47

Sorry mates
unfortunately, despite the efforts, I can not run OgreNewt.
I can compile, but unfortunately the application crashes when running.

This is the message (I've translate it from ITA to ENG):
Unhandled exception in a 0x00450cf6 OgreApplication.exe: 0xC0000005: Access violation reading location in 0x00000054.

Summary of the instruments used
SDK-> OgreSDK 1.7.1 + AppWizard for Visual C++ 2008 Express
OS-> Windows xp sp3
IDE-> Visual C++ Express 2008 (chosen to avoid trouble :) )
Wrapper-> OgreNewt2 taken from this URL (SVNTortoise) http://svn.ogre3d.org/svnroot/ogreaddons/branches/ogrenewt/newton20/
Physics-> Newton 2.24

According to you, where am I wrong?
I hope you give me a hand, because it is a month I try to use it, but I can not get it to work, I'm tired and discouraged.
If I missed some information that may serve, let me know ok?

Thanks in advance :D

P.S. I was almost forgetting, here's the code I used. I took the tutorial from OgreNewt2 page.

OgreApplication.ccp
#include "OgreApplication.h"

//-------------------------------------------------------------------------------------
OgreApplication::OgreApplication(void)
{
mWorld = new OgreNewt::World();
}
//-------------------------------------------------------------------------------------
OgreApplication::~OgreApplication(void)
{
delete mWorld;
}

//-------------------------------------------------------------------------------------
void OgreApplication::createScene(void)
{
Ogre::Light *light = mSceneMgr->createLight("main_light");
light->setPosition(0, 50, 0);
light->setDiffuseColour(Ogre::ColourValue(1, 0.5, 0.5));
mSceneMgr->setAmbientLight(Ogre::ColourValue(0.5,0.5,0.5));

mCamera->setPosition(Ogre::Vector3(100,50,100));
mCamera->lookAt(0,0,0);

Ogre::Vector3 size(100.0,5.0,100.0);
Ogre::SceneNode* node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
Ogre::Entity* ent = mSceneMgr->createEntity( "floorobj", "box.mesh" );
node->attachObject( ent );
node->setScale( size );

OgreNewt::CollisionPtr col( new OgreNewt::CollisionPrimitives::TreeCollision( mWorld));
OgreNewt::Body* floorbody = new OgreNewt::Body( mWorld, col );
floorbody->attachNode(node);
floorbody->setPositionOrientation( Ogre::Vector3(0,-5,0), Ogre::Quaternion::IDENTITY );

// BOX
size = Ogre::Vector3( 5, 5, 5 );
node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("box_body", "box.mesh" );
node->attachObject( ent );
node->setScale( size );

// rigid body.
OgreNewt::CollisionPrimitives::Box *boxcol = new OgreNewt::CollisionPrimitives::Box(mWorld);
col = OgreNewt::CollisionPtr(boxcol);
OgreNewt::Body* bod = new OgreNewt::Body( mWorld, col );
bod->attachNode( node );

// initial position
bod->setPositionOrientation( Ogre::Vector3(0,20,5), Ogre::Quaternion::IDENTITY );

Ogre::Real mass = 10.0;
Ogre::Vector3 inertia, centerOfMass;
boxcol->calculateInertialMatrix(inertia, centerOfMass);

inertia*=mass;

bod->setMassMatrix( mass, inertia );
bod->setCenterOfMass(centerOfMass);

bod->setStandardForceCallback();

// CYLINDER
// cylinder with a radius of 5.5, height of 10.3
size = Ogre::Vector3( 10.3, 5.5, 5.5 );
node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("cylinder_body", "cylinder.mesh" );
node->attachObject( ent );
node->setScale( size );

// rigid body.
OgreNewt::CollisionPrimitives::Cylinder *cylCol = new OgreNewt::CollisionPrimitives::Cylinder(mWorld);
col = OgreNewt::CollisionPtr(cylCol);
bod = new OgreNewt::Body( mWorld, col );
bod->attachNode( node );

// initial position
bod->setPositionOrientation( Ogre::Vector3(20,15,15), Ogre::Quaternion(Ogre::Degree(45),Ogre::Vector3(1,1,0)) );

mass = 5.0;
cylCol->calculateInertialMatrix(inertia, centerOfMass);

inertia*=mass;

bod->setMassMatrix( mass, inertia );
bod->setCenterOfMass(centerOfMass);

bod->setStandardForceCallback();

// CONE
// cone with a radius of 4.8, height of 5.0
size = Ogre::Vector3( 5.0, 4.8, 4.8 );

node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("cone_body", "cone.mesh" );
node->attachObject( ent );
node->setScale( size );

// rigid body.
OgreNewt::CollisionPrimitives::Cone *coneCol = new OgreNewt::CollisionPrimitives::Cone(mWorld);
col = OgreNewt::CollisionPtr(coneCol);
bod = new OgreNewt::Body( mWorld, col );
bod->attachNode( node );

// initial position
bod->setPositionOrientation( Ogre::Vector3(0,26,5), Ogre::Quaternion(Ogre::Degree(45), Ogre::Vector3(1,0,0)) );

mass = 15.0;
coneCol->calculateInertialMatrix(inertia, centerOfMass);

inertia*=mass;

bod->setMassMatrix( mass, inertia );
bod->setCenterOfMass(centerOfMass);

bod->setStandardForceCallback();

// CONE
// cone with a radius of 4.8, height of 10.0
size = Ogre::Vector3( 10.0, 4.8, 4.8 );

node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("crazy_cone_body", "cone.mesh" );
node->attachObject( ent );
node->setScale( size );

// rigid body.
coneCol = new OgreNewt::CollisionPrimitives::Cone(mWorld);
col = OgreNewt::CollisionPtr(coneCol);
bod = new OgreNewt::Body( mWorld, col );
bod->attachNode( node );

// initial position
bod->setPositionOrientation( Ogre::Vector3(20,26,5), Ogre::Quaternion::IDENTITY );

mass = 20.0;
coneCol->calculateInertialMatrix(inertia, centerOfMass);

inertia*=mass;

bod->setMassMatrix( mass, inertia );
bod->setCenterOfMass(centerOfMass);

bod->setCustomForceAndTorqueCallback<OgreApplication>(&OgreApplication::crazyCallback, this);
}

void OgreApplication::createFrameListener()
{
Ogre::FrameListener* mFrameListener;
mFrameListener = new ExampleFrameListener( mWindow, mCamera );
mRoot->addFrameListener( mFrameListener );

OgreNewt::BasicFrameListener* mOgreNewtListener;
mOgreNewtListener = new OgreNewt::BasicFrameListener( mWindow, mWorld );
mRoot->addFrameListener( mOgreNewtListener );
}

void OgreApplication::crazyCallback(OgreNewt::Body *body, float timeStep, int threadIndex)
{
Ogre::Vector3 force(0,10,0), pointToApply(4,4,4);
body->addLocalForce(force, pointToApply);
}

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char *argv[])
#endif
{
// Create application object
OgreApplication app;

try {
app.go();
} catch( Ogre::Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
std::cerr << "An exception has occured: " <<
e.getFullDescription().c_str() << std::endl;
#endif
}

return 0;
}

#ifdef __cplusplus
}
#endif

SFCBias

14-10-2010 00:26:08

Step through your code in debug mode so I can see exactly where it's crashing.

IlBrillanteJack

14-10-2010 10:28:46

Hi SFCBias thanks, you are my savior
well, I've compile the project in debug mode, but since I'm not too familiar with the IDE, I do not know how to find the information you need.
To act quickly, I make a screenshot of the result. Hope this is useful :(



If you have a best procedure, write here.

Thanks in advance :D

SFCBias

14-10-2010 11:48:59

Hmm I don't see any immediate problems so can you post the Ogre.log that should've generated in the directory of the executable.

Sjinta

14-10-2010 12:42:39

if the program builds but fails at running the problem is probably logged in Ogre.log
could be something wrong with resource.cfg or something, i've had loads of troubles with that myself

IlBrillanteJack

14-10-2010 16:12:07

Oh yes, the log, you're right.

Ogre.log (debug mode)

11:13:38: Creating resource group General
11:13:38: Creating resource group Internal
11:13:38: Creating resource group Autodetect
11:13:38: SceneManagerFactory for type 'DefaultSceneManager' registered.
11:13:38: Registering ResourceManager for type Material
11:13:38: Registering ResourceManager for type Mesh
11:13:38: Registering ResourceManager for type Skeleton
11:13:38: MovableObjectFactory for type 'ParticleSystem' registered.
11:13:38: OverlayElementFactory for type Panel registered.
11:13:38: OverlayElementFactory for type BorderPanel registered.
11:13:38: OverlayElementFactory for type TextArea registered.
11:13:38: Registering ResourceManager for type Font
11:13:38: ArchiveFactory for archive type FileSystem registered.
11:13:38: ArchiveFactory for archive type Zip registered.
11:13:38: DDS codec registering
11:13:38: FreeImage version: 3.13.1
11:13:38: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
11:13:38: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,bay,bmq,cr2,crw,cs1,dc2,dcr,dng,erf,fff,hdr,k25,kdc,mdc,mos,mrw,nef,orf,pef,pxn,raf,raw,rdc,sr2,srf,arw,3fr,cine,ia,kc2,mef,nrw,qtk,rw2,sti,drf,dsc,ptx,cap,iiq,rwz
11:13:38: Registering ResourceManager for type HighLevelGpuProgram
11:13:38: Registering ResourceManager for type Compositor
11:13:38: MovableObjectFactory for type 'Entity' registered.
11:13:38: MovableObjectFactory for type 'Light' registered.
11:13:38: MovableObjectFactory for type 'BillboardSet' registered.
11:13:38: MovableObjectFactory for type 'ManualObject' registered.
11:13:38: MovableObjectFactory for type 'BillboardChain' registered.
11:13:38: MovableObjectFactory for type 'RibbonTrail' registered.
11:13:38: Loading library .\RenderSystem_Direct3D9_d
11:13:38: Installing plugin: D3D9 RenderSystem
11:13:38: D3D9 : Direct3D9 Rendering Subsystem created.
11:13:38: D3D9: Driver Detection Starts
11:13:38: D3D9: Driver Detection Ends
11:13:38: Plugin successfully installed
11:13:38: Loading library .\RenderSystem_GL_d
11:13:38: Installing plugin: GL RenderSystem
11:13:38: OpenGL Rendering Subsystem created.
11:13:38: Plugin successfully installed
11:13:38: Loading library .\Plugin_ParticleFX_d
11:13:38: Installing plugin: ParticleFX
11:13:38: Particle Emitter Type 'Point' registered
11:13:38: Particle Emitter Type 'Box' registered
11:13:38: Particle Emitter Type 'Ellipsoid' registered
11:13:38: Particle Emitter Type 'Cylinder' registered
11:13:38: Particle Emitter Type 'Ring' registered
11:13:38: Particle Emitter Type 'HollowEllipsoid' registered
11:13:38: Particle Affector Type 'LinearForce' registered
11:13:38: Particle Affector Type 'ColourFader' registered
11:13:38: Particle Affector Type 'ColourFader2' registered
11:13:38: Particle Affector Type 'ColourImage' registered
11:13:38: Particle Affector Type 'ColourInterpolator' registered
11:13:38: Particle Affector Type 'Scaler' registered
11:13:38: Particle Affector Type 'Rotator' registered
11:13:38: Particle Affector Type 'DirectionRandomiser' registered
11:13:38: Particle Affector Type 'DeflectorPlane' registered
11:13:38: Plugin successfully installed
11:13:38: Loading library .\Plugin_BSPSceneManager_d
11:13:38: Installing plugin: BSP Scene Manager
11:13:38: Plugin successfully installed
11:13:38: Loading library .\Plugin_CgProgramManager_d
11:13:38: Installing plugin: Cg Program Manager
11:13:38: Plugin successfully installed
11:13:38: Loading library .\Plugin_PCZSceneManager_d
11:13:38: Installing plugin: Portal Connected Zone Scene Manager
11:13:38: PCZone Factory Type 'ZoneType_Default' registered
11:13:38: Plugin successfully installed
11:13:38: Loading library .\Plugin_OctreeZone_d
11:13:38: Installing plugin: Octree Zone Factory
11:13:38: Plugin successfully installed
11:13:38: Loading library .\Plugin_OctreeSceneManager_d
11:13:38: Installing plugin: Octree & Terrain Scene Manager
11:13:38: Plugin successfully installed
11:13:38: *-*-* OGRE Initialising
11:13:38: *-*-* Version 1.7.1 (Cthugha)
11:13:38: Creating resource group Essential
11:13:39: Added resource location '../../media/thumbnails' of type 'FileSystem' to resource group 'Essential'
11:13:39: Added resource location '../../media/packs/SdkTrays.zip' of type 'Zip' to resource group 'Essential'
11:13:39: Added resource location '../../media' of type 'FileSystem' to resource group 'General'
11:13:39: Creating resource group Popular
11:13:39: Added resource location '../../media/fonts' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/materials/programs' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/materials/scripts' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/materials/textures' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/materials/textures/nvidia' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/models' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/models/primitives' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/particle' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/PCZAppMedia' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/RTShaderLib' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/RTShaderLib/materials' of type 'FileSystem' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/cubemap.zip' of type 'Zip' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/dragon.zip' of type 'Zip' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/ogredance.zip' of type 'Zip' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/Sinbad.zip' of type 'Zip' to resource group 'Popular'
11:13:39: Added resource location '../../media/packs/skybox.zip' of type 'Zip' to resource group 'Popular'
11:13:39: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
11:13:39: D3D9 : RenderSystem Option: FSAA = 0
11:13:39: D3D9 : RenderSystem Option: Floating-point mode = Fastest
11:13:39: D3D9 : RenderSystem Option: Full Screen = Yes
11:13:39: D3D9 : RenderSystem Option: Rendering Device = Monitor-1-ATI Mobility Radeon X1300
11:13:39: D3D9 : RenderSystem Option: Resource Creation Policy = Create on all devices
11:13:39: D3D9 : RenderSystem Option: VSync = No
11:13:39: D3D9 : RenderSystem Option: VSync Interval = 1
11:13:39: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
11:13:39: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
11:13:40: CPU Identifier & Features
11:13:40: -------------------------
11:13:40: * CPU ID: GenuineIntel: Genuine Intel(R) CPU T2300 @ 1.66GHz
11:13:40: * SSE: yes
11:13:40: * SSE2: yes
11:13:40: * SSE3: yes
11:13:40: * MMX: yes
11:13:40: * MMXEXT: yes
11:13:40: * 3DNOW: no
11:13:40: * 3DNOWEXT: no
11:13:40: * CMOV: yes
11:13:40: * TSC: yes
11:13:40: * FPU: yes
11:13:40: * PRO: yes
11:13:40: * HT: no
11:13:40: -------------------------
11:13:40: D3D9 : Subsystem Initialising
11:13:40: Registering ResourceManager for type Texture
11:13:40: Registering ResourceManager for type GpuProgram
11:13:40: D3D9RenderSystem::_createRenderWindow "OgreApplication Render Window", 800x600 fullscreen miscParams: FSAA=0 FSAAHint= colourDepth=32 gamma=false monitorIndex=0 useNVPerfHUD=false vsync=false vsyncInterval=1
11:13:40: D3D9 : Created D3D9 Rendering Window 'OgreApplication Render Window' : 800x600, 32bpp
11:13:40: RenderSystem capabilities
11:13:40: -------------------------
11:13:40: RenderSystem Name: Direct3D9 Rendering Subsystem
11:13:40: GPU Vendor: ati
11:13:40: Device Name: Monitor-1-ATI Mobility Radeon X1300
11:13:40: Driver Version: 6.14.10.6587
11:13:40: * Fixed function pipeline: yes
11:13:40: * Hardware generation of mipmaps: yes
11:13:40: * Texture blending: yes
11:13:40: * Anisotropic texture filtering: yes
11:13:40: * Dot product texture operation: yes
11:13:40: * Cube mapping: yes
11:13:40: * Hardware stencil buffer: yes
11:13:40: - Stencil depth: 8
11:13:40: - Two sided stencil support: yes
11:13:40: - Wrap stencil values: yes
11:13:40: * Hardware vertex / index buffers: yes
11:13:40: * Vertex programs: yes
11:13:40: * Number of floating-point constants for vertex programs: 256
11:13:40: * Number of integer constants for vertex programs: 16
11:13:40: * Number of boolean constants for vertex programs: 16
11:13:40: * Fragment programs: yes
11:13:40: * Number of floating-point constants for fragment programs: 224
11:13:40: * Number of integer constants for fragment programs: 16
11:13:40: * Number of boolean constants for fragment programs: 16
11:13:40: * Geometry programs: no
11:13:40: * Number of floating-point constants for geometry programs: 0
11:13:40: * Number of integer constants for geometry programs: 0
11:13:40: * Number of boolean constants for geometry programs: 0
11:13:40: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
11:13:40: * Texture Compression: yes
11:13:40: - DXT: yes
11:13:40: - VTC: no
11:13:40: - PVRTC: no
11:13:40: * Scissor Rectangle: yes
11:13:40: * Hardware Occlusion Query: yes
11:13:40: * User clip planes: yes
11:13:40: * VET_UBYTE4 vertex element type: yes
11:13:40: * Infinite far plane projection: yes
11:13:40: * Hardware render-to-texture: yes
11:13:40: * Floating point textures: yes
11:13:40: * Non-power-of-two textures: yes (limited)
11:13:40: * Volume textures: yes
11:13:40: * Multiple Render Targets: 4
11:13:40: - With different bit depths: no
11:13:40: * Point Sprites: yes
11:13:40: * Extended point parameters: yes
11:13:40: * Max Point Size: 10
11:13:40: * Vertex texture fetch: no
11:13:40: * Number of world matrices: 0
11:13:40: * Number of texture units: 8
11:13:40: * Stencil buffer depth: 8
11:13:40: * Number of vertex blend matrices: 0
11:13:40: * Render to Vertex Buffer : no
11:13:40: * DirectX per stage constants: no
11:13:40: ***************************************
11:13:40: *** D3D9 : Subsystem Initialised OK ***
11:13:40: ***************************************
11:13:40: DefaultWorkQueue('Root') initialising on thread 00155410.
11:13:40: DefaultWorkQueue('Root')::WorkerFunc - thread 001DCC50 starting.
11:13:40: DefaultWorkQueue('Root')::WorkerFunc - thread 001DCC90 starting.
11:13:40: Particle Renderer Type 'billboard' registered
11:13:40: SceneManagerFactory for type 'BspSceneManager' registered.
11:13:40: Registering ResourceManager for type BspLevel
11:13:40: SceneManagerFactory for type 'PCZSceneManager' registered.
11:13:40: MovableObjectFactory for type 'PCZLight' registered.
11:13:40: MovableObjectFactory for type 'Portal' registered.
11:13:40: MovableObjectFactory for type 'AntiPortal' registered.
11:13:40: PCZone Factory Type 'ZoneType_Octree' registered
11:13:40: PCZone Factory Type 'ZoneType_Terrain' registered
11:13:40: SceneManagerFactory for type 'OctreeSceneManager' registered.
11:13:40: SceneManagerFactory for type 'TerrainSceneManager' registered.
11:13:40: Parsing scripts for resource group Autodetect
11:13:40: Finished parsing scripts for resource group Autodetect
11:13:40: Parsing scripts for resource group Essential
11:13:40: Parsing script SdkTrays.material
11:13:40: Parsing script SdkTrays.fontdef
11:13:40: Parsing script SdkTrays.overlay
11:13:40: Bad element attribute line: '# you can offset the image to change the cursor "hotspot"' for element SdkTrays/Cursor in overlay
11:13:40: Texture: sdk_cursor.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
11:13:40: Texture: sdk_tray.png: Loading 1 faces(PF_A8R8G8B8,64x64x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
11:13:40: Texture: sdk_button_up.png: Loading 1 faces(PF_A8R8G8B8,128x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x32x1.
11:13:40: Texture: sdk_text_box.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
11:13:40: Texture: sdk_mini_tray.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
11:13:40: Texture: sdk_track.png: Loading 1 faces(PF_A8R8G8B8,16x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,16x32x1.
11:13:40: Texture: sdk_handle.png: Loading 1 faces(PF_A8R8G8B8,16x16x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,16x16x1.
11:13:40: Texture: sdk_mini_text_box.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
11:13:40: Texture: sdk_label.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
11:13:40: Texture: sdk_separator.png: Loading 1 faces(PF_A8R8G8B8,64x16x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x16x1.
11:13:41: Texture: sdk_logo.png: Loading 1 faces(PF_A8R8G8B8,128x64x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x64x1.
11:13:41: D3D9 : ***** Dimensions altered by the render system
11:13:41: D3D9 : ***** Source image dimensions : 64x48
11:13:41: D3D9 : ***** Texture dimensions : 64x64
11:13:41: Texture: sdk_shade.png: Loading 1 faces(PF_A8R8G8B8,64x48x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
11:13:41: Texture: sdk_frame.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
11:13:41: Texture: sdk_mini_text_box_over.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
11:13:41: Texture: sdk_pulse.png: Loading 1 faces(PF_R8G8B8,8x1x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,8x1x1.
11:13:41: Finished parsing scripts for resource group Essential
11:13:41: Parsing scripts for resource group General
11:13:41: Finished parsing scripts for resource group General
11:13:41: Parsing scripts for resource group Internal
11:13:41: Finished parsing scripts for resource group Internal
11:13:41: Parsing scripts for resource group Popular
11:13:41: Parsing script Examples.program
11:13:41: Parsing script StdQuad_vp.program
11:13:41: Parsing script deferred_post.program
11:13:41: Parsing script ShadowCaster.program
11:13:41: Parsing script ASCII.material
11:13:41: Parsing script ASMSwizzle.material
11:13:41: Compiler error: object unsupported by render system in ASMSwizzle.material(1)
11:13:41: Parsing script BlackAndWhite.material
11:13:41: Parsing script Bloom.material
11:13:41: Parsing script Bloom2.material
11:13:42: Parsing script CGSwizzle.material
11:13:42: Parsing script CompositorDemo.material
11:13:42: Parsing script DepthShadowmap.material
11:13:42: Parsing script Dither.material
11:13:42: Parsing script DOF.material
11:13:42: Parsing script Embossed.material
11:13:42: Parsing script Example-Water.material
11:13:42: Parsing script Examples-Advanced.material
11:13:42: Parsing script Examples-DynTex.material
11:13:42: Parsing script Examples-Water.material
11:13:43: Parsing script Examples.material
11:13:43: OGRE EXCEPTION(2:InvalidParametersException): Parameter called camObjPos does not exist. in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1433)
11:13:43: Compiler error: invalid parameters in Examples.material(837): setting of constant failed
11:13:43: Parsing script facial.material
11:13:43: Parsing script Glass.material
11:13:43: Parsing script GLSLSwizzle.material
11:13:43: Parsing script Halftone.material
11:13:43: Parsing script hdr.material
11:13:44: Parsing script HeatVision.material
11:13:44: Parsing script Hurt.material
11:13:44: Parsing script instancing.material
11:13:44: Parsing script Invert.material
11:13:44: Parsing script IsoSurf.material
11:13:44: Parsing script Laplace.material
11:13:44: Parsing script MotionBlur.material
11:13:44: Parsing script MRTtest.material
11:13:44: Parsing script NightVision.material
11:13:44: Parsing script Ocean.material
11:13:45: Parsing script OffsetMapping.material
11:13:45: Parsing script Ogre.material
11:13:45: Parsing script OldMovie.material
11:13:45: Parsing script OldTV.material
11:13:45: Parsing script ParticleGS.material
11:13:45: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
11:13:45: High-level program Ogre/ParticleGS/GenerateVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
11:13:45: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
11:13:45: High-level program Ogre/ParticleGS/DisplayVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
11:13:45: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
11:13:45: High-level program Ogre/ParticleGS/DisplayPS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
11:13:45: Parsing script Penguin.material
11:13:45: Parsing script Posterize.material
11:13:45: Parsing script pssm.material
11:13:45: Parsing script RadialBlur.material
11:13:45: Parsing script RZR-002.material
11:13:45: Parsing script ShaderSystem.material
11:13:45: Parsing script shadows.material
11:13:45: Parsing script SharpenEdges.material
11:13:46: Parsing script sibenik.material
11:13:46: Parsing script smoke.material
11:13:46: Parsing script Tiling.material
11:13:46: Parsing script VarianceShadowmap.material
11:13:46: Parsing script deferreddemo.material
11:13:46: Parsing script deferred_post.material
11:13:46: Parsing script deferred_post_minilight.material
11:13:46: Parsing script ShadowCaster.material
11:13:46: Parsing script ssao.material
11:13:46: Parsing script ROOM.material
11:13:46: Parsing script RTShaderSystem.material
11:13:46: Compiler error: unknown error in RTShaderSystem.material(23): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(52): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(146): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(162): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
11:13:46: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
11:13:46: Parsing script RomanBath.material
11:13:46: Parsing script Sinbad.material
11:13:46: Parsing script emitted_emitter.particle
11:13:46: Parsing script Examples-Water.particle
11:13:46: Parsing script Examples.particle
11:13:46: Parsing script smoke.particle
11:13:46: Parsing script Examples.compositor
11:13:46: Parsing script deferred.compositor
11:13:46: Parsing script ssao.compositor
11:13:46: Parsing script sample.fontdef
11:13:46: Finished parsing scripts for resource group Popular
11:13:46: *** Initializing OIS ***
11:13:47: Mesh: Loading box.mesh.
11:13:47: WARNING: box.mesh is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.

IlBrillanteJack

18-10-2010 18:32:07

New informations, if somehow they can serve, are "translated" into English, because my IDE is in Italian

Debug's output:

'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ OgreApplication.exe,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ ntdll.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ kernel32.dll'
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ OgreMain.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ user32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ gdi32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ WinSxS \ x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4974_x-ww_d889290f \ msvcp90.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ WinSxS \ x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4974_x-ww_d889290f \ msvcr90.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ ws2_32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ advapi32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ Rpcrt4.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ secur32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ msvcrt.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ ws2help.dll'
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ OIS.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ dinput8.dll'
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ newton.dll'
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ OgreNewt.dll', Symbols loaded.
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ dJointLibrary.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ imm32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ lpk.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ Usp10.dll'
The thread 'Win32 Thread' (0x858) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x8a8) has exited with code 0 (0x0).
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ RenderSystem_Direct3D9.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ d3d9.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ d3d8thk.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ Version.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ winmm.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DX9_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ uxtheme.dll'
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ RenderSystem_GL.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ glu32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ Opengl32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ ddraw.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ dciman32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ msctf.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ SynTPFcs.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ msctfime.ime'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ ole32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ atioglxx.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ mcd32.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ mcd32.dll'
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ Plugin_ParticleFX.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ Plugin_BSPSceneManager.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ Plugin_CgProgramManager.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ cg.dll'
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ Plugin_PCZSceneManager.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ Plugin_OctreeZone.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ dev \ OgreSDK_vc9_v1-7-1 \ bin \ release \ Plugin_OctreeSceneManager.dll,' The binary was not compiled with debugging information.
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ oleaut32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
First-chance exception in a 0x7c812afb OgreApplication.exe: Exception of Microsoft C: Ogre:: InvalidParametersException in the memory location 0x0012f480 ..
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
First-chance exception in a 0x7c812afb OgreApplication.exe: Exception of Microsoft C: Ogre:: InternalErrorException in the memory location 0x0012d2ec ..
First-chance exception in a 0x7c812afb OgreApplication.exe: Exception of Microsoft C: Ogre:: InternalErrorException in the memory location 0x0012d2ec ..
First-chance exception in a 0x7c812afb OgreApplication.exe: Exception of Microsoft C: Ogre:: InternalErrorException in the memory location 0x0012d2ec ..
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Downloaded 'C: \ WINDOWS \ system32 \ D3DCompiler_42.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ hid.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ setupapi.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ wintrust.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ crypt32.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ msasn1.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ Imagehlp.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ ntmarta.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ samlib.dll'
'OgreApplication.exe': Loaded 'C: \ WINDOWS \ system32 \ Wldap32.dll'
First-chance exception in a 0x7c812afb OgreApplication.exe: Exception of Microsoft C: OIS:: Exception in memory location 0x0012fc68 ..
First-chance exception in a 0x00450cf6 OgreApplication.exe: 0xC0000005: Access violation reading location 0x00000054 in.
Unhandled exception in a 0x00450cf6 OgreApplication.exe: 0xC0000005: Access violation reading location 0x00000054 in.
The program '[1996] OgreApplication.exe: Native' has exited with code 0 (0x0).

IlBrillanteJack

22-10-2010 17:50:32

Hello mates!!!
I have new informations related to this problem.
The offending lines are these:

OgreNewt::CollisionPtr col( new OgreNewt::CollisionPrimitives::TreeCollision(mWorld));
OgreNewt::Body* floorbody = new OgreNewt::Body( mWorld, col );
floorbody->attachNode(node);
floorbody->setPositionOrientation( Ogre::Vector3(0,-5,0), Ogre::Quaternion::IDENTITY );

In fact, the example says to use this constructor (with 3 parameters):
OgreNewt::CollisionPtr col( new OgreNewt::CollisionPrimitives::TreeCollision( mWorld, ent, true));
but this code give an error in the IDE, because there is not a constructor with 3 parameters, then I replaced it with this, which is the simplest, and has a parameter:
OgreNewt::CollisionPtr col( new OgreNewt::CollisionPrimitives::TreeCollision(mWorld));

But this change makes the program crush.

P.S. I think that is not the only mistake, there are some functions where the parameters are not the ones with the sample.
So I wanted to ask if you could kindly tell me other examples or where found a complete documentation of the libraries. Thanks guys.

P.P.S Ultimately I'm thinking it's just a code problem, not a library problem (I hope... :) ).

IlBrillanteJack

22-10-2010 18:46:52

Hello mates!!! :D
In fact, as I thought it was a code problem.
I adjusted the code (the OgreNewt2 example code)
Some constructors had to use multiple parameters. I put down here so it can perhaps be useful to someone.

OgreApplication.cpp

/*
-----------------------------------------------------------------------------
Filename: OgreApplication.cpp
-----------------------------------------------------------------------------


This source file is generated by the
___ _ __ __ _ _
/___\__ _ _ __ ___ /_\ _ __ _ __/ / /\ \ (_)______ _ _ __ __| |
// // _` | '__/ _ \ //_\\| '_ \| '_ \ \/ \/ / |_ / _` | '__/ _` |
/ \_// (_| | | | __/ / _ \ |_) | |_) \ /\ /| |/ / (_| | | | (_| |
\___/ \__, |_| \___| \_/ \_/ .__/| .__/ \/ \/ |_/___\__,_|_| \__,_|
|___/ |_| |_|
Ogre 1.7.x Application Wizard for VC9 (August 2010)
http://code.google.com/p/ogreappwizards/
-----------------------------------------------------------------------------
*/

#include "OgreApplication.h"

//-------------------------------------------------------------------------------------
OgreApplication::OgreApplication(void)
{
mWorld = new OgreNewt::World();
}
//-------------------------------------------------------------------------------------
OgreApplication::~OgreApplication(void)
{
delete mWorld;
}

//-------------------------------------------------------------------------------------
void OgreApplication::createScene(void)
{
Ogre::Light *light = mSceneMgr->createLight("main_light");
light->setPosition(0, 50, 0);
light->setDiffuseColour(Ogre::ColourValue(1, 0.5, 0.5));
mSceneMgr->setAmbientLight(Ogre::ColourValue(0.5,0.5,0.5));

mCamera->setPosition(Ogre::Vector3(100,50,100));
mCamera->lookAt(0,0,0);

Ogre::Vector3 size(100.0,5.0,100.0);
Ogre::SceneNode* node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
Ogre::Entity* ent = mSceneMgr->createEntity("floor", "box.mesh");
node->attachObject(ent);
node->setScale(size);

OgreNewt::CollisionPtr col( new OgreNewt::CollisionPrimitives::TreeCollision(mWorld, ent, true, 1));
OgreNewt::Body* floorbody = new OgreNewt::Body(mWorld, col);
floorbody->attachNode(node);
floorbody->setPositionOrientation( Ogre::Vector3(0,-5,0), Ogre::Quaternion::IDENTITY );

// BOX
size = Ogre::Vector3(5, 5, 5);
node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("box_body", "box.mesh" );
node->attachObject(ent);
node->setScale(size);

// rigid body.
OgreNewt::CollisionPrimitives::Box *boxcol = new OgreNewt::CollisionPrimitives::Box(mWorld, size, 2);
col = OgreNewt::CollisionPtr(boxcol);
OgreNewt::Body* bod = new OgreNewt::Body(mWorld, col);
bod->attachNode(node);


// initial position
bod->setPositionOrientation(Ogre::Vector3(0,20,5), Ogre::Quaternion::IDENTITY);

Ogre::Real mass = 10.0;
Ogre::Vector3 inertia, centerOfMass;
boxcol->calculateInertialMatrix(inertia, centerOfMass);

inertia *= mass;

bod->setMassMatrix(mass, inertia);
bod->setCenterOfMass(centerOfMass);
bod->setStandardForceCallback();

// CYLINDER
// cylinder with a radius of 5.5, height of 10.3
node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("cylinder_body", "cylinder.mesh" );
node->attachObject(ent);
node->setScale(size);

// rigid body.
OgreNewt::CollisionPrimitives::Cylinder *cylCol = new OgreNewt::CollisionPrimitives::Cylinder(mWorld, 5.5, 10.3, 4);
col = OgreNewt::CollisionPtr(cylCol);
bod = new OgreNewt::Body(mWorld, col);
bod->attachNode(node);

// initial position
bod->setPositionOrientation(Ogre::Vector3(20,15,15), Ogre::Quaternion(Ogre::Degree(90),Ogre::Vector3(1,1,0)));

mass = 6.0;
cylCol->calculateInertialMatrix(inertia, centerOfMass);

inertia *= mass;

bod->setMassMatrix( mass, inertia );
bod->setCenterOfMass(centerOfMass);
bod->setStandardForceCallback();


// CONE
// cone with a radius of 4.8, height of 5.0
size = Ogre::Vector3( 5.0, 4.8, 4.8 );

node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("cone_body", "cone.mesh" );
node->attachObject( ent );
node->setScale( size );

// rigid body.
OgreNewt::CollisionPrimitives::Cone *coneCol = new OgreNewt::CollisionPrimitives::Cone(mWorld, 4.8, 5.0, 5);
col = OgreNewt::CollisionPtr(coneCol);
bod = new OgreNewt::Body(mWorld, col);
bod->attachNode(node);

// initial position
bod->setPositionOrientation(Ogre::Vector3(0,26,5), Ogre::Quaternion(Ogre::Degree(45), Ogre::Vector3(1,0,0)));

mass = 15.0;
coneCol->calculateInertialMatrix(inertia, centerOfMass);

inertia *= mass;

bod->setMassMatrix( mass, inertia );
bod->setCenterOfMass(centerOfMass);
bod->setStandardForceCallback();


// CONE 2
// cone with a radius of 4.8, height of 10.0
size = Ogre::Vector3( 10.0, 4.8, 4.8 );

node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
ent = mSceneMgr->createEntity("crazy_cone_body", "cone.mesh" );
node->attachObject( ent );
node->setScale( size );

// rigid body.
coneCol = new OgreNewt::CollisionPrimitives::Cone(mWorld, 4.8, 10.0, 6);
col = OgreNewt::CollisionPtr(coneCol);
bod = new OgreNewt::Body(mWorld, col);
bod->attachNode(node);

// initial position
bod->setPositionOrientation(Ogre::Vector3(20,26,5), Ogre::Quaternion::IDENTITY);

mass = 20.0;
coneCol->calculateInertialMatrix(inertia, centerOfMass);

inertia*=mass;

bod->setMassMatrix( mass, inertia );
bod->setCenterOfMass(centerOfMass);
bod->setCustomForceAndTorqueCallback<OgreApplication>(&OgreApplication::crazyCallback, this);
}

void OgreApplication::createFrameListener()
{
Ogre::FrameListener* mFrameListener;
mFrameListener = new ExampleFrameListener(mWindow, mCamera);
mRoot->addFrameListener( mFrameListener );

OgreNewt::BasicFrameListener* mOgreNewtListener;
mOgreNewtListener = new OgreNewt::BasicFrameListener(mWindow, mWorld);
mRoot->addFrameListener( mOgreNewtListener );
}

void OgreApplication::crazyCallback(OgreNewt::Body *body, float timeStep, int threadIndex)
{
Ogre::Vector3 force(0,10,0), pointToApply(4,4,4);
body->addLocalForce(force, pointToApply);
}

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char *argv[])
#endif
{
// Create application object
OgreApplication app;

try {
app.go();
} catch( Ogre::Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
std::cerr << "An exception has occured: " <<
e.getFullDescription().c_str() << std::endl;
#endif
}

return 0;
}

#ifdef __cplusplus
}
#endif