smgr->drawAll() causes illegal operation

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Rush
Posts: 14
Joined: Wed Nov 24, 2004 11:00 am
Location: Hell

Post by Rush »

Check if smgr doesn't point to NULL:

Code: Select all

if(!smgr) printf("Fatal error\n");
If this won't help, try calling any other method of the scene manager (eg. smgr->clear()) just before smgr->drawAll(). If that call will cause illegal operation, then the pointer isn't pointing to a ISceneManager object.

If it crashes only on drawAll(), I have no idea what's the problem.
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

#include <assert.h>

assert checks if the condition is true and continues else it stops and tells the user where the assertion failed.

If you do not know how to use it, just use it like it was a if condition.

Code: Select all


assert( smgr);

Please send me an e-mail instead of a private message.
Guest

Post by Guest »

I have the same problem with a fresh install of 0.7 (and 0.7.1) when compiling the Hello World sample with the included DevC++ project file. It initiates correctly upto loading default font, then crashes with memory couldn't be read...
Post Reply