No OGREBULLET demo

OGREHEAD

13-02-2010 15:53:06

I have installed OGREBULLET but I have no demo executable to test out OGREBULLET in action.

Any ideas on what might be wrong?

OGREHEAD

14-02-2010 13:18:36

Managed to compiled ogrebullet with demo.

Link to solution:
viewtopic.php?f=12&t=9163

Had to change resources.cfg paths and remove duplicate files from when copying different media folders together.

OGREHEAD

14-07-2011 21:32:34

OgreBullet demos do not install for me again.

I think I need some files in the demos folder.

The zip in the thread I linked to is corrupted.

Has OgreBullet not been fixed so that the demos install along with OgreBullet?

OGREHEAD

16-07-2011 16:53:10

Anybody know how to compile the demo?

dermont

16-07-2011 17:05:12

There is a patch here that should allow you to build the demo on Linux.
viewtopic.php?f=12&t=14193

OGREHEAD

17-07-2011 13:53:21

Hey dermont

Thanks for the link.

I am almost there...

When I run ogrebullet_demo it crashes.
OgreBullet_Demo: malloc.c:3097: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.

I have tried changing the cfg files to correct paths and get no errors as far as I can see in terminal.

Any ideas what the problem could be?

OGREHEAD

17-07-2011 22:41:43

I get a lot of these errors in ogre.log...

OGRE EXCEPTION(5:ItemIdentityException): OverlayElement with name OgreBulletGui.w2 not found. in OverlayManager::getOverlayElementImpl at /OGRESRC/OgreMain/src/OgreOverlayManager.cpp (line 621)

So I think the problem is the media folder and resources.cfg.

Maybe if someone could post resources.cfg that works I can correct my folders.

captaincrunch80

17-07-2011 23:47:13

Hey Ogrehead,

are you working on Linux?

captaincrunch80

17-07-2011 23:52:37

If yes, I had similar experiences.

Just copy/paste the relevant pieces of a Demo in your Basic example Framework and compile it yourself. i.e. with QtCreator
It needs some time to get it run this way (get the bugs out of the Examplecode), but you learn the code on the fly while getting it run =)

Should be less frustrating than 4 days of compiling/executing problems of undocumented (maybe even unsupported on linux) examples.

dermont

18-07-2011 00:47:28

Hey dermont

Thanks for the link.

I am almost there...

When I run ogrebullet_demo it crashes.
OgreBullet_Demo: malloc.c:3097: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.

I have tried changing the cfg files to correct paths and get no errors as far as I can see in terminal.

Any ideas what the problem could be?


What version of Bullet/Ogre are you using? What distro are you running? The exceptions you mention I encountered as well and have always just ignored; shouldn't stop the demo running.

The only thing I can think of is a mismatch between the bullet headers and libs you are linking against. Do you have more than one version of Bullet installed?

This is my resources.cfg file.


[Bootstrap]
Zip=../Demos/Media/packs/OgreCore.zip


[General]
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/fonts
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/materials/programs
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/materials/scripts
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/materials/textures
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/materials/textures/nvidia
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/models
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/overlays
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/particle
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/gui
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/DeferredShadingMedia
FileSystem=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/PCZAppMedia
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/cubemap.zip
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/cubemapsJS.zip
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/dragon.zip
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/fresneldemo.zip
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/ogretestmap.zip
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/ogredance.zip
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/Sinbad.zip
Zip=/media/sda8/Libraries/OGRE/sdk/default/share/OGRE/media/packs/skybox.zip


#[General]
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/fonts
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/materials/programs
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/materials/scripts
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/materials/textures
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/models
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/overlays
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/particle
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/gui
#FileSystem=/media/sda7/Libraries/OGRE/ogre-v1-6-4/Samples/Media/Media/DeferredShadingMedia

[Bullet]
FileSystem=../Demos/Media/materials/programs
FileSystem=../Demos/Media/materials/scripts
FileSystem=../Demos/Media
FileSystem=../Demos/Media/fonts
FileSystem=../Demos/Media/textures
FileSystem=../Demos/Media/materials
FileSystem=../Demos/Media/models
FileSystem=../Demos/Media/overlays
FileSystem=../Demos/Media/gui

[OgreBulletCollisions]
FileSystem=../Demos/Media/gui


There is also the tutorial example for Linux - try that maybe I screwed up the patch to build the demo; edit the Makefile to modify/remove the PKG_CONFIG_PATH/RPATH:
download/file.php?id=816

captaincrunch80

18-07-2011 00:58:18

Ok here is my solution.

First try this: (Take care the filenames are case sensitive)

ogre.cfg

Render System=OpenGL Rendering Subsystem

[OpenGL Rendering Subsystem]
Display Frequency=60 MHz
FSAA=0
Full Screen=Yes
RTT Preferred Mode=FBO
VSync=No
Video Mode=1680 x 1050
sRGB Gamma Conversion=No



(!!! The file in the package has the wrong name the P must be p as you can see in the ogrebullet/Demos/include/ExampleApplication.h delivered with OgreBullet)
plugins.cfg

# Defines plugins to load

# Define plugin folder THIS MUST BE YOURS !!
PluginFolder=/usr/lib/OGRE

# Define plugins

#Plugin=RenderSystem_Direct3D9
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_OctreeSceneManager
Plugin=Plugin_CgProgramManager




resources.cfg

# Resource locations to be added to the 'boostrap' path

# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=Media/
FileSystem=Media/fonts
FileSystem=Media/materials/programs
FileSystem=Media/materials/scripts
FileSystem=Media/materials/textures
FileSystem=Media/models
FileSystem=Media/overlays
FileSystem=Media/particle
FileSystem=Media/gui

[Bullet]
FileSystem=Media/OgreBullet
FileSystem=Media/materials
FileSystem=Media/textures



Ok check this out, the program should start now.

The error is imao in the ExampleApplication.h - it looks for a plugin.cfg, but the Folder contains a Plugin.cfg.

captaincrunch80

18-07-2011 01:03:29

If that does not work and it is a compile problem you can try to recompile.

I use QtCreator here is my project file put it in the Demos folder, then open it with QtCreator, check your include and Libpaths and compile. Should work out of the box if the plugins.cfg is named right. (I love qtcreator and qmake, if everybody would use it we had a better world(when it comes to linking and crosscompiling) 8) ) - Take care, do not build in the shadowbuild path under Project settings.

Demos.pro

TEMPLATE = app
TARGET = OgreBulletDemos

DESTDIR = .
OBJECTS_DIR = gen

SOURCES += \
src/OgreBulletListener.cpp \
src/OgreBulletInputListener.cpp \
src/OgreBulletGuiListener.cpp \
src/OgreBulletApplication.cpp \
src/BetaGUI.cpp \
Dynamics_Demos/src/Vehicle_Demo.cpp \
Dynamics_Demos/src/TriMesh_Demo.cpp \
Dynamics_Demos/src/Terrain_Demo.cpp \
Dynamics_Demos/src/Ragdoll_Demo.cpp \
Dynamics_Demos/src/Primitives_Demo.cpp \
Dynamics_Demos/src/main.cpp \
Dynamics_Demos/src/Constraints_Demo.cpp

HEADERS += \
include/OgreBulletListener.h \
include/OgreBulletInputListener.h \
include/OgreBulletGuiListener.h \
include/OgreBulletApplication.h \
include/exampleframelistener.h \
include/ExampleApplication.h \
include/BetaGUI.h \
Dynamics_Demos/include/Vehicle_Demo.h \
Dynamics_Demos/include/TriMesh_Demo.h \
Dynamics_Demos/include/Terrain_Demo.h \
Dynamics_Demos/include/Ragdoll_Demo.h \
Dynamics_Demos/include/Primitives_Demo.h \
Dynamics_Demos/include/Constraints_Demo.h


INCLUDEPATH += include \
Dynamics_Demos/include \
/usr/include \
/usr/local/include \
/usr/include/OGRE \
/usr/include/OIS \
/usr/local/include/bullet \
/usr/local/include/OgreBullet/Collisions \
/usr/local/include/OgreBullet \
/usr/local/include/OgreBullet/Dynamics \
/usr/local/include/PagedGeometry

LIBS += -L/usr/lib \
-L/usr/lib/debug/usr/lib \
-L/usr/local/lib \
# Ogre
-lOgreMain \
-lOgreRTShaderSystem \
-lOgreRTShaderSystem \
-lOgreTerrain \
-lOgreProperty \
-lOIS \
# Physics
-lOgreBulletCol \
-lOgreBulletDyn \
-lGIMPACTUtils \
-lConvexDecomposition \
-lBulletSoftBody \
-lBulletDynamics \
-lBulletCollision \
-lLinearMath \




Still there are some missing materials and mess up the ragdoll and Trimesh demo.

OGREHEAD

18-07-2011 01:06:38

Thanx a lot CC80...

I will try messing around with what you gave me.

captaincrunch80

18-07-2011 01:13:33

Best of luck Buddy!"

OGREHEAD

18-07-2011 16:15:13

Changed my resources.cfg file and have no more missing stuff I think.
I do not have this folder though in media...
[Bullet]
FileSystem=Media/OgreBullet

Build with qtcreator.
Got a lot of warnings I think....

But I still crash with this when runhing...
Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
Texture: bgui.textinput.png: Loading 1 faces(PF_R8G8B8,120x22x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,120x22x1.
OgreBulletDemos: malloc.c:3097: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.

I do not know how to fix this since there is not much useful info.

I seem to remember somebody fixing this in a cpp file or something last time I installed OgreBullet.

Maybe I will try to uninstall and clean and then install ogrebullet again.
But not to sure it will lead to something else.

captaincrunch80

18-07-2011 22:42:35

Jup qmake's default Makefile output generates a high warning level for compiling (what I personally like for my own code).
Unused variables are warned for example. And that are usually a lot because of virtual functions with { } implementation are spread over the whole ogre header files.

Ok lets compare your setup:
Where did you download Ogre Bullet? I did from https://ogreaddons.svn.sourceforge.net/ ... grebullet/

What linux are you using? I use ubuntu 11.04?

What g++ compiler version? I have gcc version 4.5.2
(This looks like a serious memory allocation bug, maybe a bug inside an old g++ version.)

Bullet? 2.78

Ogre? 1.7.3


There are some materials missing in the media folder, but otherwise the demos work well here on my qtcreator build (Even if the code throws a lot of warnings). If we have the same setup, I can maybe just send you the binaries if you like.

OGREHEAD

19-07-2011 00:04:01

I got ogrebullet from trunk as well.
Then I have applied patch.

I have mepis 11 64.

I have gcc 4.4
I will try to update gcc I guess.

Bullet is 2.77

Ogre Is 1.7.3 I think.

I think the gcc update is worth a shot...

Thanks for helping out with this.

captaincrunch80

19-07-2011 00:36:31

I used the BulletOgre version from trunk without patch!

Maybe the patch broke something, could be outdated.


Ok I am off to bed gn8! Good Luck!

OGREHEAD

19-07-2011 16:15:10

No go...

I installed trunk without patch with qtcreator.

But I keep getting this error...
Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
Texture: bgui.textinput.png: Loading 1 faces(PF_R8G8B8,120x22x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,120x22x1.
OgreBulletDemos: malloc.c:3097: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.

I do not know how to solve that.

OGREHEAD

27-07-2011 14:19:41

I tried uninstalling everything...

Then I installed ogrebullet and got no errors.

Now when I try to install with the demos.pro file I got, I get this error:
gen/OgreBulletListener.o:(.rodata._ZTV17btTypedConstraint[vtable for btTypedConstraint]+0x60): undefined reference to `btTypedConstraint::serialize(void*, btSerializer*) const'

How can this be solved?

OGREHEAD

27-07-2011 18:33:28

I finally managed to get ogrebullet going...

I installed bullet 2.76 and ogrebullet trunk.

That demos.pro file captaincrunch80 provided made it possible for me to install the demos as well after some tweaking.
So thanks a lot to you, captaincrunch80...

I tried installing bullet 2.77 and 2.78 but the demos did not work correctly, objects were invisible and demos skipped to next and next and next in a loop...
So I changed to bullet 2.76, which is what I had before as well.

Thanks also to dermont for helping out with tips.