ConvexShape/TriangleMeshShape crash in Linux NxOgre 0.9

Promo

04-04-2008 15:52:40

Hello all,


I seem to be unable to load any TriangleMeshShape nor ConvexShape. I tried the easiest possible test, that is, adding the following line to the (previously functioning) Cake:

mScene->createBody("testcyl.mesh", new ConvexShape("testcyl.mesh"), Vector3(6,2.5f,0), "mass: 10");
or also
mScene->createBody("testcyl.mesh", new TriangleMeshShape("testcyl.mesh"), Vector3(6,2.5f,0), "static: yes");


No matter what I try, I always get a core dump with the following backtrace:

Mesh: Loading testcyl.mesh.
*** glibc detected *** ./cakebox: double free or corruption (!prev): 0x084e8608 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7596d65]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb759a800]
/lib/tls/i686/cmov/libc.so.6(fclose+0x134)[0xb75856f4]
/usr/lib/libNxOgre.so(_ZN10UserStreamD1Ev+0x39)[0xb78f914d]
/usr/lib/libNxOgre.so(_ZN6NxOgre32NxGenerateConvexMeshFromOgreMeshERKSsP7NxScene6NxVec3S1_+0x9eb)[0xb78b1b99]
/usr/lib/libNxOgre.so(_ZN6NxOgre11ConvexShape23_bindToActorDescriptionEPNS_5ActorEjR7NxArrayIP11NxShapeDesc18NxAllocatorDefaultE+0x286)[0xb78fded4]
/usr/lib/libNxOgre.so(_ZN6NxOgre5Actor12_createActorEPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE+0x34c)[0xb78c7452]
/usr/lib/libNxOgre.so(_ZN6NxOgre5ActorC2ERKSsPNS_5SceneEPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE+0xa2c)[0xb78c92e2]
/usr/lib/libNxOgre.so(_ZN6NxOgre4BodyC1ERKSsPNS_5SceneEPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE+0x5c)[0xb792483c]
/usr/lib/libNxOgre.so(_ZN6NxOgre5Scene10createBodyERKSsPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE+0x7d)[0xb792afe1]
./cakebox[0x806c061]
./cakebox[0x8056f1f]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7543050]
./cakebox(__gxx_personality_v0+0x239)[0x804fbf1]
======= Memory map: ========
08048000-0807c000 r-xp 00000000 08:02 27885737 /home/promo/dev/nxogre/0.9/NxOgre/tutorials/cakebox
0807c000-0807d000 rw-p 00034000 08:02 27885737 /home/promo/dev/nxogre/0.9/NxOgre/tutorials/cakebox
0807d000-08589000 rw-p 0807d000 00:00 0 [heap]
b4900000-b4921000 rw-p b4900000 00:00 0
b4921000-b4a00000 ---p b4921000 00:00 0
b4a7d000-b4a7e000 ---p b4a7d000 00:00 0
b4a7e000-b527e000 rwxp b4a7e000 00:00 0
b527e000-b5509000 r-xp 00000000 08:02 21972474 /usr/lib/PhysX/v2.7.2/libPhysXCore.so.1
b5509000-b5514000 rw-p 0028b000 08:02 21972474 /usr/lib/PhysX/v2.7.2/libPhysXCore.so.1
b5514000-b5619000 rw-p b5514000 00:00 0
b5619000-b5819000 rw-s 0d1a0000 00:0e 18293 /dev/nvidia0
b599b000-b5a9c000 rw-p b599b000 00:00 0
b5a9c000-b5aa0000 r-xp 00000000 08:02 21480761 /usr/lib/libXfixes.so.3.1.0
b5aa0000-b5aa1000 rw-p 00003000 08:02 21480761 /usr/lib/libXfixes.so.3.1.0
b5aa1000-b5aa9000 r-xp 00000000 08:02 21480751 /usr/lib/libXcursor.so.1.0.2
b5aa9000-b5aaa000 rw-p 00007000 08:02 21480751 /usr/lib/libXcursor.so.1.0.2
b5abc000-b5bbd000 rw-p b5abc000 00:00 0
b5bbd000-b5bfe000 rw-s e368c000 00:0e 18293 /dev/nvidia0
b5bfe000-b5cfe000 rw-s 0e7f2000 00:0e 18293 /dev/nvidia0
b5cfe000-b5d03000 rw-s 19ba9000 00:0e 18293 /dev/nvidia0
b5d03000-b6385000 rw-s 246d7000 00:0e 18293 /dev/nvidia0
b6385000-b63a9000 rw-p b6385000 00:00 0
b63a9000-b63aa000 rw-s 00000000 00:09 10780719 /SYSV00000000 (deleted)
b63aa000-b63eb000 rw-p b63aa000 00:00 0
b63eb000-b6446000 rw-p 00000000 00:0e 2914 /dev/zero
b6447000-b6448000 rw-s 00000000 00:09 20086863 /SYSV00000000 (deleted)
b6448000-b646a000 rw-p b6448000 00:00 0
b646a000-b6488000 rw-s 00000000 00:09 0 /SYSV00000000 (deleted)
b6488000-b64d1000 r-xp 00000000 08:02 21629306 /usr/lib/OGRE/Plugin_OctreeSceneManager.so
b64d1000-b64d3000 rw-p 00049000 08:02 21629306 /usr/lib/OGRE/Plugin_OctreeSceneManager.so
b64d3000-b6510000 r-xp 00000000 08:02 21629307 /usr/lib/OGRE/Plugin_ParticleFX.so
b6510000-b6512000 rw-p 0003d000 08:02 21629307 /usr/lib/OGRE/Plugin_ParticleFX.so
b6512000-b656d000 rw-p b6512000 00:00 0
b656d000-b6574000 r-xp 00000000 08:02 21480781 /usr/lib/libXrender.so.1.3.0
b6574000-b6575000 rw-p 00006000 08:02 21480781 /usr/lib/libXrender.so.1.3.0
b6575000-b6576000 r-xp 00000000 08:02 21659753 /usr/lib/tls/libnvidia-tls.so.100.14.19
b6576000-b6577000 rw-p 00000000 08:02 21659753 /usr/lib/tls/libnvidia-tls.so.100.14.19
b6577000-b6ed3000 r-xp 00000000 08:02 21482585 /usr/lib/libGLcore.so.100.14.19
b6ed3000-b6f0b000 rwxp 0095c000 08:02 21482585 /usr/lib/libGLcore.so.100.14.19
b6f0b000-b6f0f000 rwxp b6f0b000 00:00 0
b6f0f000-b6f13000 r-xp 00000000 08:02 21480795 /usr/lib/libXxf86vm.so.1.0.0
b6f13000-b6f14000 rw-p 00003000 08:02 21480795 /usr/lib/libXxf86vm.so.1.0.0
b6f14000-b6f19000 r-xp 00000000 0Aborted (core dumped)




Has anyone ever been able to use a convex or trianglemesh shape in nxogre under linux?


I've got the following environment:

NxOgre (NxOgre 0.9-38.Debug) Started, working with:

- PhysX => 2.7.2
- Ogre => 1.4.3 'Eihort'
- Platform => Linux Debug


Thanks in advance for your input..

betajaen

04-04-2008 15:56:35

Yep; Looks like a Cooking issue or the stream it is writing too. Have you tried Bleeding under linux? The cooking process has greatly improved.

Promo

04-04-2008 16:03:04

No I haven't ever even "checked out" bleeding, but I will now ;)

I just hope there are no huge changes from 0.9-38 to bleeding, as I just finished converting an old 0.4-RC3 app to 0.9 with more than a few headaches and hacks (I'll have to rewrite the 0.4 app from scratch with 0.9 or possibly the future 1.0)


Btw, talking about cooking, I remember/think it wasn't possible to cook from file in Linux with the 2.6/2.7(.2?) PhysX SDKs, do you know perhaps if it is possible now?

Thanks

betajaen

04-04-2008 16:08:49

Sadly (for you), there has been big changes. So you will have to update your application again.

I honestly don't know if you can or can't cook in Linux. I don't run the operating system on my computers so I've never tried. If it was true however, I would expect to hear more posts about it.

Promo

04-04-2008 16:11:42

Ouch... bad news for me then


Anyway, as I was trying to compile bleeding, I immediately got the following error (which I'm investigating with my scarce c++ template knowledge):


g++ -o source/NxOgreSkeleton.os -c -w -g -DNX_DEBUG -DNXOGRE_LINUX -DNX_LINUX -DNX32 -DLINUX -DNX_DISABLE_FLUIDS -fPIC -Iinclude -Iinclude/NxuStream2 -I/usr/include/OGRE -I/usr/include/PhysX/v2.7.2/SDKs/Cooking/Include -I/usr/include/PhysX/v2.7.2/SDKs/Foundation/include -I/usr/include/PhysX/v2.7.2/SDKs/NxCharacter/include -I/usr/include/PhysX/v2.7.2/SDKs/NxExtensions/include -I/usr/include/PhysX/v2.7.2/SDKs/Physics/include -I/usr/include/PhysX/v2.7.2/SDKs/PhysXLoader/include source/NxOgreSkeleton.cpp
include/BetajaenCC.h:119: error: expected type-specifier before 'new'
include/BetajaenCC.h:119: error: expected `>' before 'new'
include/BetajaenCC.h:135: error: expected initializer before 'SharedAllocator'
include/BetajaenCC.h:176: error: expected initializer before 'Flat'
include/BetajaenCC.h:318: error: expected initializer before 'Array'
include/BetajaenCC.h:393: error: expected initializer before 'SharedList'
include/BetajaenCC.h:928: error: expected initializer before 'Tree'
include/BetajaenCC.h:1241: error: expected initializer before 'SharedMap'
include/BetajaenCC.h:1393: error: expected initializer before 'Vector2'
include/BetajaenCC.h:1467: error: expected initializer before 'Vector3'
include/BetajaenCC.h:1546: error: expected initializer before 'Vector4'
include/BetajaenCC.h:1614: error: expected initializer before 'Vector'
include/NxOgreAllocator.h:88: error: declaration of 'class T'
include/NxOgreAllocator.h:79: error: shadows template parm 'class T'
include/NxOgreAllocator.h:91: error: declaration of 'class T'
include/NxOgreAllocator.h:79: error: shadows template parm 'class T'
include/NxOgreAllocator.h:98: error: declaration of 'class T'
include/NxOgreAllocator.h:79: error: shadows template parm 'class T'
include/NxOgreAllocator.h: In member function 'NxOgre::WatchMyPointer<T>& NxOgre::WatchMyPointer<T>::operator=(T*)':
include/NxOgreAllocator.h:94: error: 'NxOgre::Allocator' has not been declared
include/NxOgreAllocator.h:94: error: must #include <typeinfo> before using typeid
include/NxOgreAllocator.h: At global scope:
include/NxOgreAllocator.h:189: error: field 'mAllocations' has incomplete type
include/NxOgreAllocator.h: In member function 'void NxOgre::Allocator::watch_ptr(T*, const char*, const char*, unsigned int, const char*)':
include/NxOgreAllocator.h:163: error: must #include <typeinfo> before using typeid
scons: *** [source/NxOgreSkeleton.os] Error 1
scons: building terminated because of errors.



I'll try solving that, while waiting for other Linux users to tell me their Convex/TriangleMesh shapes stories

betajaen

04-04-2008 16:42:20

I have a copy of the latest Beta of Ubuntu which I believe will install itself as a file on one of my partitions. If I dare to install it, I'll try and make BetajaenCC GCC compatible.

Promo

04-04-2008 16:50:08

I have a copy of the latest Beta of Ubuntu which I believe will install itself as a file on one of my partitions. If I dare to install it, I'll try and make BetajaenCC GCC compatible.


Oh, I knew you're always willing to help, but this would be truly great :)

Anyway, and I'm not in a haste, and I believe/hope I'm not the only one using Linux and complex shapes out here

Thanks for your support