Program working only when run from IDE

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Q
Posts: 6
Joined: Thu Mar 09, 2006 2:23 pm

Program working only when run from IDE

Post by Q »

I'm using Visual c++ 2005 Express and I've written a program using irrlicht. When I run the program from the IDE's debug menu (either with or without debugging) the program runs as expected but when I double click the exe the screen is black with the cursor but nothing else. currently I'm only using Draw2DImage and Draw2dLine.

My Textures are loaded from absolute paths so thats not the problem.

I realy can't think of what would be different about starting the program from the IDE or windows. If anyone has any ideas please let me know :)
sdi2000
Posts: 129
Joined: Thu Aug 25, 2005 12:19 pm
Location: Berlin, DE
Contact:

Post by sdi2000 »

a tip: be shure that all your variables are initialize...
it seems that the visual studio init all ur uninitialize variables for u and if u run ur app outside of vs, nobody init ur vars :D

please set the warning level in the project settings a little bit higher, to see which var is uninitialize
Q
Posts: 6
Joined: Thu Mar 09, 2006 2:23 pm

Post by Q »

Thanx sdi2000 that solved my problem. My visibility flag wasn't being initialized in my constructors.
vpanwar
Posts: 1
Joined: Sun Jul 09, 2006 5:05 pm

I am having same problem

Post by vpanwar »

I am having the almost same problem I am quite new to Irrlicht..... you mentioned - visibility flag .. How do you initialize it ?? and what else could lead to such problems??

The exact problem with my app. is that my exe crashes as soon as it begins to draw geometry.

Please help
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you don't create custom scene nodes you don't need to initialize them, otherwise just initialize all required attributes of the new class. Setting the visibility flag can be done via setVisible(). Your crash is realted to null pointer dereferencing, probably due to a null texture or null mesh caused by a load failure.
Post Reply