Segmention fault in showDebugInformation()

kallitokaco

18-11-2009 20:11:03

Hi

I've got a Problem with debugging OgreNewt, OgreNewt itself works well.
I copied it from the Basics Example and I'm using the OgreNewt::BasicFrameListener, the OgreNewt::World is made and the debugger.init is called. I recieve a SIGSEGV with this Backtrace:

#0 6C558329 OgreNewt::OgreAddons::MovableText::setFontName() (E:\MOB_Client\debug\libOgreNewt.dll:??)
#1 6C557502 OgreNewt::OgreAddons::MovableText::MovableText() (E:\MOB_Client\debug\libOgreNewt.dll:??)
#2 6C5501EE _fu121___ZN4Ogre11ColourValue5WhiteE() (E:\MOB_Client\debug\libOgreNewt.dll:??)
#3 00000000 0x1cd585c8 in ??() (??:??)
#4 00000000 0x0022fa80 in ??() (??:??)
#5 00000000 0x0022fa90 in ??() (??:??)
#6 00000000 0x0022fa50 in ??() (??:??)
#7 00000000 0x3f000000 in ??() (??:??)
#8 00000000 0x656a0720 in ZN4Ogre11ColourValue3RedE() (??:??)
#9 00000000 0x0022fb58 in ??() (??:??)
#10 00000000 ??() (??:??)
#11 00000000 0x1b000000 in ??() (??:??)
#12 00000000 0x00000024 in ??() (??:??)
#13 00000000 0x002f0340 in ??() (??:??)
#14 00000000 0x0022fa2c in ??() (??:??)
#15 00000000 ??() (??:??)
#16 00000000 ??() (??:??)
#17 00000000 0x0022f8e8 in ??() (??:??)
#18 05BE5160 _Unwind_SjLj_Unregister() (C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77)
#19 6C54F483 OgreNewt::Debugger::showDebugInformation() (E:\MOB_Client\debug\libOgreNewt.dll:??)
#20 004080B5 MOB_FrameListener::frameStarted(this=0x1ae36e48, evt=@0x22fda8) (MOB_FrameListener.cpp:212)
#21 102ACCE8 Ogre::Root::_fireFrameStarted(this=0xa605228, evt=@0x22fda8) (C:/ogre/OgreMain/src/OgreRoot.cpp:679)
#22 102ACFE7 Ogre::Root::_fireFrameStarted(this=0xa605228) (C:/ogre/OgreMain/src/OgreRoot.cpp:751)
#23 102AD309 Ogre::Root::renderOneFrame(this=0xa605228) (C:/ogre/OgreMain/src/OgreRoot.cpp:836)
#24 0040346C MOB_Application::go(this=0x22fe60) (MOB_Application.cpp:91)
#25 00408715 WinMain(hInst=0x400000, strCmdLine=0x2e2a1b "") (MOB_main.cpp:32)
#26 0044821A main() (C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77)


..when I use this (the "else"-part is working normally)

OgreNewt::Debugger& debug(m_World->getDebugger());
if (m_Keyboard->isKeyDown(OIS::KC_F3))
{

debug.showDebugInformation();//<--SIGSEGV
debug.startRaycastRecording();
debug.clearRaycastsRecorded();
}
else
{
debug.hideDebugInformation();
debug.clearRaycastsRecorded();
debug.stopRaycastRecording();
}


There is only this Body:

OgreNewt::World* world = MOB_FrameListener::getSingletonPtr()->getWorldPtr();
node = m_SceneMgr->getRootSceneNode()->createChildSceneNode("testnode");
Ogre::Entity* ent = m_SceneMgr->createEntity( "floorobj", "emptymap128.mesh" );
node->attachObject( ent );
OgreNewt::CollisionPtr col( new OgreNewt::CollisionPrimitives::TreeCollision( world, ent, true,1));
OgreNewt::Body* floorbody = new OgreNewt::Body( world, col );
floorbody->attachNode(node);

"emptymap128.mesh" is only a plane 128x128vertice mesh. I also tried "ninja.mesh"
If there is no Body it "works" and shows no debuginfo.

What was my mistake?

Btw. I use:
- Ogre 1.6.1 with threading=1 compiled with mingw toolbox.
- OgreNewt 2.0 SVN(REV 2728)
- Newton 2.10
- Win7 32Bit

Other libarys/addons I use:
- Qt 4.4
- Quickgui 8.09


thank you very much for your help


kallitokaco

kallaspriit

21-11-2009 15:00:39

Do you have the BlueHighway-10 font in your media?

kallitokaco

21-11-2009 19:11:00

yeah I think so.

I loaded the OgreCore.zip Package as the Ogre-demos do.
Thats my fontdef:
[Ogre.fontdef]
BlueHighway
{
type truetype
source bluehigh.ttf
size 32
resolution 55
}
BlueHighway-10
{
type truetype
source bluehigh.ttf
size 10
resolution 55
}

And I checked if the font was existing with:
if( ! Ogre::FontManager::getSingletonPtr()->resourceExists("BlueHighway-10")) exit(999);

Its there and the error too.
Where's my mistake?

http://www.ogre3d.org/wiki/index.php/MovableText
void MovableText::setFontName(const String &fontName)
{
if((Ogre::MaterialManager::getSingletonPtr()->resourceExists(mName + "Material")))
{
Ogre::MaterialManager::getSingleton().remove(mName + "Material");
}

if (mFontName != fontName || mpMaterial.isNull() || !mpFont)
{
mFontName = fontName;
mpFont = (Font *)FontManager::getSingleton().getByName(mFontName).getPointer();
if (!mpFont)
throw Exception(Exception::ERR_ITEM_NOT_FOUND, "Could not find font " + fontName, "MovableText::setFontName");

mpFont->load();
if (!mpMaterial.isNull())
{
MaterialManager::getSingletonPtr()->remove(mpMaterial->getName());
mpMaterial.setNull();
}

mpMaterial = mpFont->getMaterial()->clone(mName + "Material");
if (!mpMaterial->isLoaded())
mpMaterial->load();

mpMaterial->setDepthCheckEnabled(!mOnTop);
mpMaterial->setDepthBias(1.0,1.0);
mpMaterial->setDepthWriteEnabled(mOnTop);
mpMaterial->setLightingEnabled(false);
mNeedUpdate = true;
}
}


I think normally it should throw an exception if a font isn't existing. Or am I wrong?

If I misuse a kind of pointer/array I could receive an segmention fault. I think signeltonPtr()'s should work well.
=> the font or the material is not there.

Is it possible that a Font is loaded without material?


btw thats my log
19:59:48: Creating resource group General
19:59:48: Creating resource group Internal
19:59:48: Creating resource group Autodetect
19:59:48: SceneManagerFactory for type 'DefaultSceneManager' registered.
19:59:48: Registering ResourceManager for type Material
19:59:48: Registering ResourceManager for type Mesh
19:59:48: Registering ResourceManager for type Skeleton
19:59:48: MovableObjectFactory for type 'ParticleSystem' registered.
19:59:48: OverlayElementFactory for type Panel registered.
19:59:48: OverlayElementFactory for type BorderPanel registered.
19:59:48: OverlayElementFactory for type TextArea registered.
19:59:48: Registering ResourceManager for type Font
19:59:48: ArchiveFactory for archive type FileSystem registered.
19:59:48: ArchiveFactory for archive type Zip registered.
19:59:48: FreeImage version: 3.9.3
19:59:48: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
19:59:48: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi
19:59:48: DDS codec registering
19:59:48: Registering ResourceManager for type HighLevelGpuProgram
19:59:48: Registering ResourceManager for type Compositor
19:59:48: MovableObjectFactory for type 'Entity' registered.
19:59:48: MovableObjectFactory for type 'Light' registered.
19:59:48: MovableObjectFactory for type 'BillboardSet' registered.
19:59:48: MovableObjectFactory for type 'ManualObject' registered.
19:59:48: MovableObjectFactory for type 'BillboardChain' registered.
19:59:48: MovableObjectFactory for type 'RibbonTrail' registered.
19:59:48: Loading library .\RenderSystem_Direct3D9_d
19:59:48: Installing plugin: D3D9 RenderSystem
19:59:48: D3D9 : Direct3D9 Rendering Subsystem created.
19:59:48: D3D9: Driver Detection Starts
19:59:48: D3D9: Driver Detection Ends
19:59:48: Plugin successfully installed
19:59:48: Loading library .\RenderSystem_GL_d
19:59:48: Installing plugin: GL RenderSystem
19:59:49: OpenGL Rendering Subsystem created.
19:59:49: Plugin successfully installed
19:59:49: Loading library .\Plugin_ParticleFX_d
19:59:49: Installing plugin: ParticleFX
19:59:49: Particle Emitter Type 'Point' registered
19:59:49: Particle Emitter Type 'Box' registered
19:59:49: Particle Emitter Type 'Ellipsoid' registered
19:59:49: Particle Emitter Type 'Cylinder' registered
19:59:49: Particle Emitter Type 'Ring' registered
19:59:49: Particle Emitter Type 'HollowEllipsoid' registered
19:59:49: Particle Affector Type 'LinearForce' registered
19:59:49: Particle Affector Type 'ColourFader' registered
19:59:49: Particle Affector Type 'ColourFader2' registered
19:59:49: Particle Affector Type 'ColourImage' registered
19:59:49: Particle Affector Type 'ColourInterpolator' registered
19:59:49: Particle Affector Type 'Scaler' registered
19:59:49: Particle Affector Type 'Rotator' registered
19:59:49: Particle Affector Type 'DirectionRandomiser' registered
19:59:49: Particle Affector Type 'DeflectorPlane' registered
19:59:49: Plugin successfully installed
19:59:49: Loading library .\Plugin_BSPSceneManager_d
19:59:49: Installing plugin: BSP Scene Manager
19:59:49: Plugin successfully installed
19:59:49: Loading library .\Plugin_OctreeSceneManager_d
19:59:49: Installing plugin: Octree & Terrain Scene Manager
19:59:49: Plugin successfully installed
19:59:49: Loading library .\Plugin_CgProgramManager_d
19:59:49: Installing plugin: Cg Program Manager
19:59:49: Plugin successfully installed
19:59:49: *-*-* OGRE Initialising
19:59:49: *-*-* Version 1.6.1 (Shoggoth)
19:59:49: Creating resource group Bootstrap
19:59:49: Added resource location '../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
19:59:49: Added resource location '../media/packs/qgui.core.zip' of type 'Zip' to resource group 'Bootstrap'
19:59:49: Added resource location '../map' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/fonts' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/materials/scripts' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/materials/textures' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/models' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/overlays' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/gui' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
19:59:49: Added resource location '../media/materials/programs' of type 'FileSystem' to resource group 'General'
19:59:49: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
19:59:49: D3D9 : RenderSystem Option: Anti aliasing = None
19:59:49: D3D9 : RenderSystem Option: Floating-point mode = Fastest
19:59:49: D3D9 : RenderSystem Option: Full Screen = No
19:59:49: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce 8600M GS
19:59:49: D3D9 : RenderSystem Option: VSync = No
19:59:49: D3D9 : RenderSystem Option: Video Mode = 640 x 480 @ 32-bit colour
19:59:49: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
20:00:01: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
20:00:01: D3D9 : RenderSystem Option: Anti aliasing = None
20:00:01: D3D9 : RenderSystem Option: Floating-point mode = Fastest
20:00:01: D3D9 : RenderSystem Option: Full Screen = No
20:00:01: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce 8600M GS
20:00:01: D3D9 : RenderSystem Option: VSync = No
20:00:01: D3D9 : RenderSystem Option: Video Mode = 640 x 480 @ 32-bit colour
20:00:01: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
20:00:01: CPU Identifier & Features
20:00:01: -------------------------
20:00:01: * CPU ID: GenuineIntel: Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz
20:00:01: * SSE: yes
20:00:01: * SSE2: yes
20:00:01: * SSE3: yes
20:00:01: * MMX: yes
20:00:01: * MMXEXT: yes
20:00:01: * 3DNOW: no
20:00:01: * 3DNOWEXT: no
20:00:01: * CMOV: yes
20:00:01: * TSC: yes
20:00:01: * FPU: yes
20:00:01: * PRO: yes
20:00:01: * HT: no
20:00:01: -------------------------
20:00:01: D3D9 : Subsystem Initialising
20:00:01: D3D9RenderSystem::_createRenderWindow "MoB_Client", 640x480 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 gamma=false useNVPerfHUD=false vsync=false
20:00:01: D3D9 : Created D3D9 Rendering Window 'MoB_Client' : 640x480, 32bpp
20:00:01: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
20:00:01: Registering ResourceManager for type Texture
20:00:01: Registering ResourceManager for type GpuProgram
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT16_R
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT32_R
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT16_GR
20:00:01: D3D9: Vertex texture format supported - PF_FLOAT32_GR
20:00:01: RenderSystem capabilities
20:00:01: -------------------------
20:00:01: RenderSystem Name: Direct3D9 Rendering Subsystem
20:00:01: GPU Vendor: nvidia
20:00:01: Device Name: NVIDIA GeForce 8600M GS
20:00:01: Driver Version: 8.16.11.8681
20:00:01: * Fixed function pipeline: yes
20:00:01: * Hardware generation of mipmaps: yes
20:00:01: * Texture blending: yes
20:00:01: * Anisotropic texture filtering: yes
20:00:01: * Dot product texture operation: yes
20:00:01: * Cube mapping: yes
20:00:01: * Hardware stencil buffer: yes
20:00:01: - Stencil depth: 8
20:00:01: - Two sided stencil support: yes
20:00:01: - Wrap stencil values: yes
20:00:01: * Hardware vertex / index buffers: yes
20:00:01: * Vertex programs: yes
20:00:01: * Fragment programs: yes
20:00:01: * Geometry programs: no
20:00:01: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
20:00:01: * Texture Compression: yes
20:00:01: - DXT: yes
20:00:01: - VTC: no
20:00:01: * Scissor Rectangle: yes
20:00:01: * Hardware Occlusion Query: yes
20:00:01: * User clip planes: yes
20:00:01: * VET_UBYTE4 vertex element type: yes
20:00:01: * Infinite far plane projection: yes
20:00:01: * Hardware render-to-texture: yes
20:00:01: * Floating point textures: yes
20:00:01: * Non-power-of-two textures: yes
20:00:01: * Volume textures: yes
20:00:01: * Multiple Render Targets: 4
20:00:01: - With different bit depths: yes
20:00:01: * Point Sprites: yes
20:00:01: * Extended point parameters: yes
20:00:01: * Max Point Size: 8192
20:00:01: * Vertex texture fetch: yes
20:00:01: - Max vertex textures: 4
20:00:01: - Vertex textures shared: no
20:00:01: * Render to Vertex Buffer : no
20:00:01: * DirectX per stage constants: yes
20:00:01: ***************************************
20:00:01: *** D3D9 : Subsystem Initialised OK ***
20:00:01: ***************************************
20:00:01: ResourceBackgroundQueue - threading enabled, starting own thread
20:00:01: ResourceBackgroundQueue - thread starting.
20:00:01: Particle Renderer Type 'billboard' registered
20:00:01: SceneManagerFactory for type 'BspSceneManager' registered.
20:00:01: Registering ResourceManager for type BspLevel
20:00:01: SceneManagerFactory for type 'OctreeSceneManager' registered.
20:00:01: SceneManagerFactory for type 'TerrainSceneManager' registered.
20:00:01: Parsing scripts for resource group Autodetect
20:00:01: Finished parsing scripts for resource group Autodetect
20:00:01: Parsing scripts for resource group Bootstrap
20:00:01: Parsing script OgreCore.material
20:00:01: Parsing script OgreProfiler.material
20:00:01: Parsing script qgui.skinTypes
20:00:01: Parsing script Ogre.fontdef
20:00:01: Parsing script micross.fontdef
20:00:01: Parsing script OgreDebugPanel.overlay
20:00:01: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
20:00:01: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
20:00:01: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
20:00:01: Font BlueHighwayusing texture size 512x512
20:00:01: Info: Freetype returned null for character 127 in font BlueHighway
20:00:01: Info: Freetype returned null for character 128 in font BlueHighway
20:00:01: Info: Freetype returned null for character 129 in font BlueHighway
20:00:01: Info: Freetype returned null for character 130 in font BlueHighway
20:00:01: Info: Freetype returned null for character 131 in font BlueHighway
20:00:01: Info: Freetype returned null for character 132 in font BlueHighway
20:00:01: Info: Freetype returned null for character 133 in font BlueHighway
20:00:01: Info: Freetype returned null for character 134 in font BlueHighway
20:00:01: Info: Freetype returned null for character 135 in font BlueHighway
20:00:01: Info: Freetype returned null for character 136 in font BlueHighway
20:00:01: Info: Freetype returned null for character 137 in font BlueHighway
20:00:01: Info: Freetype returned null for character 138 in font BlueHighway
20:00:01: Info: Freetype returned null for character 139 in font BlueHighway
20:00:01: Info: Freetype returned null for character 140 in font BlueHighway
20:00:01: Info: Freetype returned null for character 141 in font BlueHighway
20:00:01: Info: Freetype returned null for character 142 in font BlueHighway
20:00:01: Info: Freetype returned null for character 143 in font BlueHighway
20:00:01: Info: Freetype returned null for character 144 in font BlueHighway
20:00:01: Info: Freetype returned null for character 145 in font BlueHighway
20:00:01: Info: Freetype returned null for character 146 in font BlueHighway
20:00:01: Info: Freetype returned null for character 147 in font BlueHighway
20:00:01: Info: Freetype returned null for character 148 in font BlueHighway
20:00:01: Info: Freetype returned null for character 149 in font BlueHighway
20:00:01: Info: Freetype returned null for character 150 in font BlueHighway
20:00:01: Info: Freetype returned null for character 151 in font BlueHighway
20:00:01: Info: Freetype returned null for character 152 in font BlueHighway
20:00:01: Info: Freetype returned null for character 153 in font BlueHighway
20:00:01: Info: Freetype returned null for character 154 in font BlueHighway
20:00:01: Info: Freetype returned null for character 155 in font BlueHighway
20:00:01: Info: Freetype returned null for character 156 in font BlueHighway
20:00:01: Info: Freetype returned null for character 157 in font BlueHighway
20:00:01: Info: Freetype returned null for character 158 in font BlueHighway
20:00:01: Info: Freetype returned null for character 159 in font BlueHighway
20:00:01: Info: Freetype returned null for character 160 in font BlueHighway
20:00:01: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
20:00:01: Texture: ogretext.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
20:00:01: Parsing script OgreLoadingPanel.overlay
20:00:01: Finished parsing scripts for resource group Bootstrap
20:00:01: Parsing scripts for resource group General
20:00:01: Parsing script Examples.program
20:00:01: Parsing script StdQuad_vp.program
20:00:01: Parsing script BlackAndWhite.material
20:00:01: Parsing script Bloom.material
20:00:01: Parsing script color.material
20:00:01: Parsing script cy.material
20:00:01: Parsing script DepthShadowmap.material
20:00:01: Parsing script DOF.material
20:00:01: Compiler error: object name expected in DOF.material(55)
20:00:01: Parsing script Embossed.material
20:00:01: Parsing script Example-DynTex.material
20:00:01: Parsing script Example-Water.material
20:00:01: Parsing script Example.material
20:00:01: Parsing script Examples-Advanced.material
20:00:01: Compiler error: number expected in Examples-Advanced.material(679): incorrect float constant declaration
20:00:02: Parsing script facial.material
20:00:02: Parsing script Glass.material
20:00:02: Parsing script gruen.material
20:00:02: Parsing script haus.material
20:00:02: Parsing script hdr.material
20:00:02: Parsing script HeatVision.material
20:00:02: Parsing script human.material
20:00:02: Parsing script Hurt.material
20:00:02: Parsing script instancing.material
20:00:02: Parsing script Invert.material
20:00:02: Parsing script Laplace.material
20:00:02: Parsing script map.material
20:00:02: Parsing script MotionBlur.material
20:00:02: Parsing script Ocean.material
20:00:02: Parsing script OffsetMapping.material
20:00:02: Parsing script Ogre.material
20:00:02: Parsing script OldMovie.material
20:00:02: Parsing script OldTV.material
20:00:02: Parsing script Posterize.material
20:00:02: Parsing script RZR-002.material
20:00:02: Parsing script Scene.material
20:00:02: Parsing script SharpenEdges.material
20:00:02: Parsing script smoke.material
20:00:02: Parsing script Tiling.material
20:00:02: Parsing script VarianceShadowmap.material
20:00:02: Parsing script Scene.material
20:00:02: Parsing script Examples.compositor
20:00:02: Parsing script Ogre.fontdef
20:00:02: Parsing script sample.fontdef
20:00:02: Parsing script Compositor.overlay
20:00:02: Parsing script DP3.overlay
20:00:02: Parsing script Example-CubeMapping.overlay
20:00:02: Parsing script Example-DynTex.overlay
20:00:02: Parsing script Example-Water.overlay
20:00:02: Parsing script Shadows.overlay
20:00:02: Finished parsing scripts for resource group General
20:00:02: Parsing scripts for resource group Internal
20:00:02: Finished parsing scripts for resource group Internal
20:00:02: MOB_Application.cpp(199):World::createFrameListener()->441027512
20:00:02: MOB_FrameListener.cpp(21):World::MOB_FrameListener()->441027512
20:00:02: *** Initializing OIS ***
20:00:02: [QGUI] Loading SkinClass and SkinType definitions...
20:00:02: [QGUI] Skin definition for class "Button" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.close" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.comboboxdropdown" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.hscrollleft" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.hscrollright" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.hslider" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.treeviewnode.expand" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.treeviewnode.minimize" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.vscrolldown" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.vscrollup" found.
20:00:02: [QGUI] Skin definition for class "Button" with ID "default.vslider" found.
20:00:02: [QGUI] Skin definition for class "CheckBox" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "CheckBox" with ID "default.treeviewcheckboxnode" found.
20:00:02: [QGUI] Skin definition for class "ColorPicker" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "ComboBox" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Console" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "ContextMenu" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "HScrollBar" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Image" with ID "ColorPallette" found.
20:00:02: [QGUI] Skin definition for class "Image" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Label" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "List" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "ListImageItem" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "ListTextItem" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Menu" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "MenuImageItem" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "MenuPanel" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "MenuPanel" with ID "default.dropdownlist" found.
20:00:02: [QGUI] Skin definition for class "MenuTextItem" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "ModalWindow" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "MouseCursor" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "MouseCursor" with ID "diag1resize" found.
20:00:02: [QGUI] Skin definition for class "MouseCursor" with ID "diag2resize" found.
20:00:02: [QGUI] Skin definition for class "MouseCursor" with ID "grabable" found.
20:00:02: [QGUI] Skin definition for class "MouseCursor" with ID "grabbed" found.
20:00:02: [QGUI] Skin definition for class "MouseCursor" with ID "hresize" found.
20:00:02: [QGUI] Skin definition for class "MouseCursor" with ID "vresize" found.
20:00:02: [QGUI] Skin definition for class "Panel" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Panel" with ID "editor.tabpage.area" found.
20:00:02: [QGUI] Skin definition for class "ProgressBar" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "PropertyGrid" with ID "QuickGUIEditor" found.
20:00:02: [QGUI] Skin definition for class "PropertyGrid" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "PropertyGridBoolProperty" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "PropertyGridComboBoxProperty" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "PropertyGridSection" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "PropertyGridTextProperty" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "RadioButton" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "RadioButton" with ID "default.treeviewradiobuttonnode" found.
20:00:02: [QGUI] Skin definition for class "Sheet" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Tab" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TabControl" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TabControl" with ID "editor" found.
20:00:02: [QGUI] Skin definition for class "TabPage" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TabPage" with ID "editor" found.
20:00:02: [QGUI] Skin definition for class "TextArea" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TextBox" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TextCursor" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TextCursor" with ID "test" found.
20:00:02: [QGUI] Skin definition for class "TitleBar" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "ToolBar" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TreeView" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TreeViewCheckBoxNode" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TreeViewNode" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "TreeViewRadioButtonNode" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "VScrollBar" with ID "default" found.
20:00:02: [QGUI] Skin definition for class "Window" with ID "default" found.
20:00:02: Texture: qgui.cursor.textselect.png: Loading 1 faces(PF_A8R8G8B8,15x26x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,15x26x1.

doppler

22-11-2009 11:50:45

I am experiencing the same issue with OgreNewt rev 2757. Any ideas?

kallitokaco

22-11-2009 12:22:56

Do you use Mingw ? and wich version of ogre?
btw Rev.2728 and Rev.2757 are the same (use TortoiseSVN and browse http://svn.ogre3d.org/svnroot/ogreaddons)
In Rev 2728 OgreNewt was updated the last time. Rev 2729-2757 are updates of other projects.

My "workaround" :
class MOB_NewtDebug : public OgreNewt::Debugger
{
public:
MOB_NewtDebug(OgreNewt::World* world) : OgreNewt::Debugger(world)
{

};
void showNiceDebugInformation()
{
if (!m_debugnode)
return;

m_debugnode->removeAllChildren();

// make the new lines.
for( OgreNewt::Body* body = m_world->getFirstBody(); body; body = body->getNext() )
{
processNiceBody(body);
}



// delete old entries
BodyDebugDataMap newmap;
for(BodyDebugDataMap::iterator it = m_cachemap.begin(); it != m_cachemap.end(); it++)
{
if( it->second.m_updated )
newmap.insert(*it);
else
{
Ogre::ManualObject* mo = it->second.m_lines;
if( mo )
delete mo;
OgreNewt::OgreAddons::MovableText *text = it->second.m_text;
if( text )
delete text;
}
}
m_cachemap.swap(newmap);
};
void processNiceBody(OgreNewt::Body* bod)
{

NewtonBody* newtonBody = bod->getNewtonBody();
MaterialIdColorMap::iterator it = m_materialcolors.find( NewtonBodyGetMaterialGroupID(newtonBody) );


Ogre::Vector3 pos;
Ogre::Quaternion ori;
bod->getPositionOrientation(pos, ori);


// ----------- create debug-text ------------
std::ostringstream oss_name;
oss_name << "__OgreNewt__Debugger__Body__" << bod << "__";
std::ostringstream oss_info;
oss_info.precision(2);
oss_info.setf(std::ios::fixed,std::ios::floatfield);
Ogre::Vector3 inertia;
Ogre::Real mass;
bod->getMassMatrix(mass, inertia);
oss_info << "mass: " << mass << std::endl << "inertia: " << inertia << std::endl;
oss_info << "pos: " << pos << std::endl << "ori: " << ori << std::endl;
oss_info << "vel: " << bod->getVelocity() << std::endl << "omega: " << bod->getOmega() << std::endl;
// ----------- ------------------ ------------



// look for cached data
BodyDebugData* data = &m_cachemap[bod];
if( data->m_lastcol == bod->getCollision() ) // use cached data
{
// set new position...
data->m_node->setPosition(pos);
data->m_node->setOrientation(ori);
data->m_updated = 1;
m_debugnode->addChild(data->m_node);
//data->m_text->setCaption(oss_info.str());
//data->m_text->setLocalTranslation(bod->getAABB().getSize().y*1.1*Ogre::Vector3::UNIT_Y);
}
else
{
data->m_lastcol = bod->getCollision();
data->m_updated = 1;

if( data->m_node )
{
data->m_node->detachAllObjects();
data->m_node->setPosition(pos);
data->m_node->setOrientation(ori);
}
else
data->m_node = m_debugnode->createChildSceneNode(pos, ori);

if( data->m_lines )
data->m_lines->clear();
else
{
std::ostringstream oss;
oss << "__OgreNewt__Debugger__Lines__" << bod << "__";
data->m_lines = new Ogre::ManualObject(oss.str());
}

if( data->m_text )
{
//data->m_text->setCaption(oss_info.str());
//data->m_text->setLocalTranslation(bod->getAABB().getMaximum().y*1.1*Ogre::Vector3::UNIT_Y);
}
/*else
{
data->m_text = new OgreNewt::OgreAddons::MovableText( Ogre::String(oss_name.str()), Ogre::String(oss_info.str()),"BlueHighway",1.0);
data->m_text->setLocalTranslation(bod->getAABB().getMaximum().y/2*Ogre::Vector3::UNIT_Y+Ogre::Vector3::UNIT_Y*0.1);
data->m_text->setTextAlignment( OgreNewt::OgreAddons::MovableText::H_LEFT, OgreNewt::OgreAddons::MovableText::V_ABOVE );
}
data->m_node->attachObject(data->m_text);
*/


data->m_lines->begin("BaseWhiteNoLighting", Ogre::RenderOperation::OT_LINE_LIST );

// set color
if( it != m_materialcolors.end() )
data->m_lines->colour(it->second);
else
data->m_lines->colour(m_defaultcolor);

float matrix[16];
OgreNewt::Converters::QuatPosToMatrix(Ogre::Quaternion::IDENTITY, Ogre::Vector3::ZERO, &matrix[0]);

NewtonCollisionForEachPolygonDo( NewtonBodyGetCollision(newtonBody), &matrix[0], newtonPerPoly, data->m_lines );

data->m_lines->end();
data->m_node->attachObject(data->m_lines);
}
};
static void _CDECL newtonPerPoly( void* userData, int vertexCount, const float* faceVertec, int id )
{
Ogre::ManualObject* lines = (Ogre::ManualObject*)userData;
Ogre::Vector3 p0, p1;

if( vertexCount < 2 )
return;

int i= vertexCount - 1;
p0 = Ogre::Vector3( faceVertec[(i*3) + 0], faceVertec[(i*3) + 1], faceVertec[(i*3) + 2] );


for (i=0;i<vertexCount;i++)
{
p1 = Ogre::Vector3( faceVertec[(i*3) + 0], faceVertec[(i*3) + 1], faceVertec[(i*3) + 2] );

lines->position( p0 );
lines->position( p1 );

p0 = p1;
}
};
};


It "works" I you replace "m_NewtDebug.showDebugInformation();" with "m_NewtDebug.showNiceDebugInformation();"

you can see the wireframe of all OgreNewt::Bodys but NO MovableText with additional infomation.