NDEBUG link option causes camera to fall through the floor

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
delinquent
Posts: 2
Joined: Tue Mar 27, 2007 9:22 pm

NDEBUG link option causes camera to fall through the floor

Post by delinquent »

Hi, I'm new to Irrlicht.
I've looked around the forum, but found no similar report. I compiled Irrlicht 1.3 from source on Linux. Example 07 (Collision) compiled and run OK, although a little slower than ver. 1.2. Probably due to Irrlicht ability to recognized more feature of MD3.

Then, somewhere in the forum, I noticed someone mentioned that ver. 1.3 would run faster with NDEBUG options turned on. All went well, until I recompiled Example 07. It compiled, with no errors. When run: models and all textures loaded, but the FPS camera then could only move a few steps before falling into the void.

Curious, I tried setting Example 12 (Terrain) with gravity enabled (0, -1, 0). Amazingly it went fine, without a glitch.

I understand that both examples employ similar setup. So, what happen to Example 07?
Can anyone help? Thanks.
virtual x
Posts: 19
Joined: Sun Mar 25, 2007 8:48 pm

Post by virtual x »

hmmm... that's strange, all demos work fine on my system, I tried it with NDEBUG turned on and off, both work flawlessly.
delinquent
Posts: 2
Joined: Tue Mar 27, 2007 9:22 pm

Post by delinquent »

This is the post that suggests NDEBUG:
http://irrlicht.sourceforge.net/phpBB2/ ... cht+++slow

The performance difference as follows:
On Irrlicht 1.2:
---------------
Loaded mesh: 20kdm2.bsp
Needed 164ms to create OctTree SceneNode.(324 nodes, 7753 polys)
Needed 1075ms to create OctTreeTriangleSelector.(145 nodes, 7753 polys)

Using Irrlcht 1.3 with -g (default) option:
------------------------------------------
Loaded mesh: 20kdm2.bsp
Needed 313ms to create OctTree SceneNode.(357 nodes, 10684 polys)
Needed 2289ms to create OctTreeTriangleSelector.(225 nodes, 10684 polys)

Irrlicht 1.3 with NDEBUG option:
---------------------------------------
Loaded mesh: 20kdm2.bsp
Needed 64ms to create OctTree SceneNode.(357 nodes, 10684 polys)
Needed 485ms to create OctTreeTriangleSelector.(225 nodes, 10684 polys)

As you can see, the performance is 4 times faster with NDEBUG turned on. That
's why I like to see it work. All other demos (examples) are fine.

I tried looking inside Irrlicht source for clues, but either my C++ knowledge is rusty, or never been good enough in the first place :oops:
I found that there is _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX definition in irrTypes.h to handle issues regarding Windows with some versions of MSC. But, remember, I'm using Linux. I can upload cpuinfo and glxinfo of my box if required, also screen snapshot of the first few seconds of 07.Collision demo's life.

Any pointers would be very much appreciated.
Post Reply