Solved - Weird problem in my Project

Ridhan

02-04-2007 21:58:24

Hello again :)

My application is crashing and nothing relevant show on the log, but I get to find the wrong line, and it is :

Vector3 mPos = mCharacter->mNode->getPosition();

How is it possible that this function crash my application?What can make this function works no more :? ?

Of course my application is much bigger than that, but I can't understand what can influence this function in particular.

For the information, i'm using Eihort, Physx 2.7 and NxOgre 0.6

kungfoomasta

02-04-2007 22:08:08

Is it possible at any point in time during execution that mCharacter or mNode become NULL? Or point to an object that no longer exists?

KungFooMasta

betajaen

02-04-2007 22:22:13

Kungfoomasta is correct with this one. Most likely mNode or mCharacter is NULL.

You can check, by using this code (Set your application to console output if you haven't done so already - a lovely debug feature :) ):

std::cout << "Ptr for Character = " << mCharacter << std::endl;
std::cout << "Ptr for Characters Node = " << mCharacter->mNode << std::endl;


I would expect that the character isn't being setup correctly, probably one of the arguments in the blueprint is incorrect. Which is causing the node not to be created.

Ridhan

03-04-2007 01:06:24

It does look very interesting, but I don't know how to change the output to the console :(

Can you illuminate me? :P

danharibo

03-04-2007 15:21:09

It does look very interesting, but I don't know how to change the output to the console :(

Can you illuminate me? :P
Change void winmain to int main()

betajaen

03-04-2007 16:48:26

You have to set the Application type to Console in the project settings also.

danharibo

03-04-2007 17:09:45

You have to set the Application type to Console in the project settings also.Doh' You must do that too!

Ridhan

04-04-2007 22:22:41

Somehow...I had deleted some code in the constructor of my class, ergo, there were some arrays not initialized....and that was basicaly.

Thanks for the permanent help :D