Loading from a zip file

rluck

12-06-2007 21:57:11

nvm

I'm writing a preview of Visual Studio 9.0 for my schools publication, and it seems loading an OSM at all with the Scene Loader causes a crash.

Lioric

12-06-2007 22:17:28

Could you provide more details? the ogre.log file from your application, the stack trace, some debbuger details of the state before the issue

rluck

12-06-2007 22:26:51

Could you provide more details? the ogre.log file from your application, the stack trace, some debbuger details of the state before the issue
Sure thing, wasn't expecting a quick response, or one at all, since it IS a beta version of Visual Studio :p

Ogre.log

17:21:03: Creating resource group General
17:21:03: Creating resource group Internal
17:21:03: Creating resource group Autodetect
17:21:03: SceneManagerFactory for type 'DefaultSceneManager' registered.
17:21:03: Registering ResourceManager for type Material
17:21:03: Registering ResourceManager for type Mesh
17:21:03: Registering ResourceManager for type Skeleton
17:21:03: MovableObjectFactory for type 'ParticleSystem' registered.
17:21:03: OverlayElementFactory for type Panel registered.
17:21:03: OverlayElementFactory for type BorderPanel registered.
17:21:03: OverlayElementFactory for type TextArea registered.
17:21:03: Registering ResourceManager for type Font
17:21:03: ArchiveFactory for archive type FileSystem registered.
17:21:03: ArchiveFactory for archive type Zip registered.
17:21:03: FreeImage version: 3.9.2
17:21:03: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
17:21:03: 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
17:21:03: DDS codec registering
17:21:03: Registering ResourceManager for type HighLevelGpuProgram
17:21:03: Registering ResourceManager for type Compositor
17:21:03: MovableObjectFactory for type 'Entity' registered.
17:21:03: MovableObjectFactory for type 'Light' registered.
17:21:03: MovableObjectFactory for type 'BillboardSet' registered.
17:21:03: MovableObjectFactory for type 'ManualObject' registered.
17:21:03: MovableObjectFactory for type 'BillboardChain' registered.
17:21:03: MovableObjectFactory for type 'RibbonTrail' registered.
17:21:03: Loading library .\RenderSystem_Direct3D9_d
17:21:03: Installing plugin: D3D9 RenderSystem
17:21:03: D3D9 : Direct3D9 Rendering Subsystem created.
17:21:03: D3D9: Driver Detection Starts
17:21:03: D3D9: Driver Detection Ends
17:21:03: Plugin successfully installed
17:21:03: Loading library .\RenderSystem_GL_d
17:21:03: Installing plugin: GL RenderSystem
17:21:03: OpenGL Rendering Subsystem created.
17:21:03: Plugin successfully installed
17:21:03: Loading library .\Plugin_ParticleFX_d
17:21:03: Installing plugin: ParticleFX
17:21:03: Particle Emitter Type 'Point' registered
17:21:03: Particle Emitter Type 'Box' registered
17:21:03: Particle Emitter Type 'Ellipsoid' registered
17:21:03: Particle Emitter Type 'Cylinder' registered
17:21:03: Particle Emitter Type 'Ring' registered
17:21:03: Particle Emitter Type 'HollowEllipsoid' registered
17:21:03: Particle Affector Type 'LinearForce' registered
17:21:03: Particle Affector Type 'ColourFader' registered
17:21:03: Particle Affector Type 'ColourFader2' registered
17:21:03: Particle Affector Type 'ColourImage' registered
17:21:03: Particle Affector Type 'ColourInterpolator' registered
17:21:03: Particle Affector Type 'Scaler' registered
17:21:03: Particle Affector Type 'Rotator' registered
17:21:03: Particle Affector Type 'DirectionRandomiser' registered
17:21:03: Particle Affector Type 'DeflectorPlane' registered
17:21:03: Plugin successfully installed
17:21:03: Loading library .\Plugin_BSPSceneManager_d
17:21:03: Installing plugin: BSP Scene Manager
17:21:03: Plugin successfully installed
17:21:03: Loading library .\Plugin_OctreeSceneManager_d
17:21:03: Installing plugin: Octree & Terrain Scene Manager
17:21:03: Plugin successfully installed
17:21:03: Loading library .\Plugin_CgProgramManager_d
17:21:03: Installing plugin: Cg Program Manager
17:21:03: Plugin successfully installed
17:21:03: *-*-* OGRE Initialising
17:21:03: *-*-* Version 1.4.2 (Eihort)
17:21:03: Creating resource group Bootstrap
17:21:03: Added resource location '../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
17:21:03: Added resource location '../media' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/fonts' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/materials/programs' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/materials/scripts' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/materials/textures' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/models' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/overlays' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/particle' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/gui' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/Skins' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/Skins/qgui' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/Skins/qgui_demo' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/audio' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/audio/ambience' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/audio/music' of type 'FileSystem' to resource group 'General'
17:21:03: Added resource location '../media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
17:21:03: Added resource location '../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
17:21:03: Added resource location '../media/packs/dragon.zip' of type 'Zip' to resource group 'General'
17:21:03: Added resource location '../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
17:21:04: Added resource location '../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
17:21:04: Added resource location '../media/packs/skybox.zip' of type 'Zip' to resource group 'General'
17:21:04: Added resource location '../media/levels.zip' of type 'Zip' to resource group 'General'
17:21:04: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
17:21:04: D3D9 : RenderSystem Option: Anti aliasing = Level 4
17:21:04: D3D9 : RenderSystem Option: Floating-point mode = Fastest
17:21:04: D3D9 : RenderSystem Option: Full Screen = No
17:21:04: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce 7950 GT
17:21:04: D3D9 : RenderSystem Option: VSync = No
17:21:04: D3D9 : RenderSystem Option: Video Mode = 1152 x 864 @ 32-bit colour
17:21:16: CPU Identifier & Features
17:21:16: -------------------------
17:21:16: * CPU ID: AuthenticAMD: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
17:21:16: * SSE: yes
17:21:16: * SSE2: yes
17:21:16: * SSE3: yes
17:21:16: * MMX: yes
17:21:16: * MMXEXT: yes
17:21:16: * 3DNOW: yes
17:21:16: * 3DNOWEXT: yes
17:21:16: * CMOV: yes
17:21:16: * TSC: yes
17:21:16: * FPU: yes
17:21:16: * PRO: yes
17:21:16: * HT: no
17:21:16: -------------------------
17:21:16: D3D9 : Subsystem Initialising
17:21:16: D3D9RenderSystem::createRenderWindow "Window", 1152x864 windowed miscParams: FSAA=4 FSAAQuality=0 colourDepth=32 useNVPerfHUD=false vsync=false
17:21:16: D3D9 : Created D3D9 Rendering Window 'Window' : 1152x864, 32bpp
17:21:16: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
17:21:16: Registering ResourceManager for type Texture
17:21:16: Registering ResourceManager for type GpuProgram
17:21:16: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
17:21:16: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
17:21:16: D3D9: Vertex texture format supported - PF_FLOAT32_R
17:21:16: RenderSystem capabilities
17:21:16: -------------------------
17:21:16: * Hardware generation of mipmaps: yes
17:21:16: * Texture blending: yes
17:21:16: * Anisotropic texture filtering: yes
17:21:16: * Dot product texture operation: yes
17:21:16: * Cube mapping: yes
17:21:16: * Hardware stencil buffer: yes
17:21:16: - Stencil depth: 8
17:21:16: - Two sided stencil support: yes
17:21:16: - Wrap stencil values: yes
17:21:16: * Hardware vertex / index buffers: yes
17:21:16: * Vertex programs: yes
17:21:16: - Max vertex program version: vs_3_0
17:21:16: * Fragment programs: yes
17:21:16: - Max fragment program version: ps_3_0
17:21:16: * Texture Compression: yes
17:21:16: - DXT: yes
17:21:16: - VTC: no
17:21:16: * Scissor Rectangle: yes
17:21:16: * Hardware Occlusion Query: yes
17:21:16: * User clip planes: yes
17:21:16: * VET_UBYTE4 vertex element type: yes
17:21:16: * Infinite far plane projection: yes
17:21:16: * Hardware render-to-texture: yes
17:21:16: * Floating point textures: yes
17:21:16: * Non-power-of-two textures: yes
17:21:16: * Volume textures: yes
17:21:16: * Multiple Render Targets: 4
17:21:16: * Point Sprites: yes
17:21:16: * Extended point parameters: yes
17:21:16: * Max Point Size: 8192
17:21:16: * Vertex texture fetch: yes
17:21:16: - Max vertex textures: 4
17:21:16: - Vertex textures shared: no
17:21:16: ***************************************
17:21:16: *** D3D9 : Subsystem Initialised OK ***
17:21:16: ***************************************
17:21:16: ResourceBackgroundQueue - threading disabled
17:21:16: Particle Renderer Type 'billboard' registered
17:21:16: SceneManagerFactory for type 'OctreeSceneManager' registered.
17:21:16: SceneManagerFactory for type 'TerrainSceneManager' registered.
17:21:16: SceneManagerFactory for type 'BspSceneManager' registered.
17:21:16: Registering ResourceManager for type BspLevel
17:21:16: Parsing scripts for resource group Autodetect
17:21:16: Finished parsing scripts for resource group Autodetect
17:21:16: Parsing scripts for resource group Bootstrap
17:21:16: Parsing script OgreCore.material
17:21:16: Parsing script OgreProfiler.material
17:21:16: Parsing script Ogre.fontdef
17:21:16: Parsing script OgreDebugPanel.overlay
17:21:16: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
17:21:16: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
17:21:16: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
17:21:16: Font BlueHighwayusing texture size 512x512
17:21:16: Info: Freetype returned null for character 127 in font BlueHighway
17:21:16: Info: Freetype returned null for character 128 in font BlueHighway
17:21:16: Info: Freetype returned null for character 129 in font BlueHighway
17:21:16: Info: Freetype returned null for character 130 in font BlueHighway
17:21:16: Info: Freetype returned null for character 131 in font BlueHighway
17:21:16: Info: Freetype returned null for character 132 in font BlueHighway
17:21:16: Info: Freetype returned null for character 133 in font BlueHighway
17:21:16: Info: Freetype returned null for character 134 in font BlueHighway
17:21:16: Info: Freetype returned null for character 135 in font BlueHighway
17:21:16: Info: Freetype returned null for character 136 in font BlueHighway
17:21:16: Info: Freetype returned null for character 137 in font BlueHighway
17:21:16: Info: Freetype returned null for character 138 in font BlueHighway
17:21:16: Info: Freetype returned null for character 139 in font BlueHighway
17:21:16: Info: Freetype returned null for character 140 in font BlueHighway
17:21:16: Info: Freetype returned null for character 141 in font BlueHighway
17:21:16: Info: Freetype returned null for character 142 in font BlueHighway
17:21:16: Info: Freetype returned null for character 143 in font BlueHighway
17:21:16: Info: Freetype returned null for character 144 in font BlueHighway
17:21:16: Info: Freetype returned null for character 145 in font BlueHighway
17:21:16: Info: Freetype returned null for character 146 in font BlueHighway
17:21:16: Info: Freetype returned null for character 147 in font BlueHighway
17:21:16: Info: Freetype returned null for character 148 in font BlueHighway
17:21:16: Info: Freetype returned null for character 149 in font BlueHighway
17:21:16: Info: Freetype returned null for character 150 in font BlueHighway
17:21:16: Info: Freetype returned null for character 151 in font BlueHighway
17:21:16: Info: Freetype returned null for character 152 in font BlueHighway
17:21:16: Info: Freetype returned null for character 153 in font BlueHighway
17:21:16: Info: Freetype returned null for character 154 in font BlueHighway
17:21:16: Info: Freetype returned null for character 155 in font BlueHighway
17:21:16: Info: Freetype returned null for character 156 in font BlueHighway
17:21:16: Info: Freetype returned null for character 157 in font BlueHighway
17:21:16: Info: Freetype returned null for character 158 in font BlueHighway
17:21:16: Info: Freetype returned null for character 159 in font BlueHighway
17:21:16: Info: Freetype returned null for character 160 in font BlueHighway
17:21:16: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
17:21:16: Texture: ogretext.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
17:21:16: Parsing script OgreLoadingPanel.overlay
17:21:16: Finished parsing scripts for resource group Bootstrap
17:21:16: Parsing scripts for resource group General
17:21:16: Parsing script Examples.program
17:21:16: Parsing script StdQuad_vp.program
17:21:17: Parsing script deferred.glsl.program
17:21:17: Parsing script deferred.hlsl.program
17:21:17: Parsing script deferred_post_debug.glsl.program
17:21:17: Parsing script deferred_post_debug.hlsl.program
17:21:17: Parsing script deferred_post_minilight.glsl.program
17:21:17: Parsing script deferred_post_minilight.hlsl.program
17:21:17: OGRE EXCEPTION(2:InvalidParametersException): Parameter called lightSpecularColor does not exist. in GpuProgramParameters::_findNamedConstantDefinition at e:\projects\ogrecvs\branches\eihort_vc8_clean\ogrenew\ogremain\src\ogregpuprogram.cpp (line 877)
17:21:17: Error at line 29 of deferred_post_minilight.hlsl.program: Invalid param_named_auto attribute - Parameter called lightSpecularColor does not exist.
17:21:17: Parsing script deferred_post_multipass.glsl.program
17:21:17: Parsing script deferred_post_multipass.hlsl.program
17:21:17: Parsing script deferred_post_onepass.glsl.program
17:21:17: Parsing script deferred_post_onepass.hlsl.program
17:21:17: Parsing script BlackAndWhite.material
17:21:17: Parsing script Bloom.material
17:21:17: Parsing script DepthShadowmap.material
17:21:17: Parsing script DOF.material
17:21:17: Parsing script Embossed.material
17:21:17: Parsing script Example-DynTex.material
17:21:17: Parsing script Example-Water.material
17:21:17: Parsing script Example.material
17:21:18: Parsing script Examples-Advanced.material
17:21:18: Parsing script facial.material
17:21:18: Parsing script Glass.material
17:21:18: Parsing script hdr.material
17:21:18: Parsing script HeatVision.material
17:21:18: Parsing script Hurt.material
17:21:18: Parsing script instancing.material
17:21:18: Parsing script Invert.material
17:21:18: Parsing script Laplace.material
17:21:18: Parsing script MotionBlur.material
17:21:18: Parsing script Ocean.material
17:21:19: Parsing script OffsetMapping.material
17:21:19: Parsing script Ogre.material
17:21:19: Parsing script OldMovie.material
17:21:19: Parsing script OldTV.material
17:21:19: Parsing script Posterize.material
17:21:19: Parsing script RZR-002.material
17:21:19: Parsing script SharpenEdges.material
17:21:19: Parsing script smoke.material
17:21:19: Parsing script Tiling.material
17:21:19: Parsing script VarianceShadowmap.material
17:21:19: Parsing script SkinTemplate.material
17:21:19: Parsing script Transparent.material
17:21:19: Parsing script qgui.material
17:21:19: Parsing script demo.material
17:21:19: Parsing script deferred.material
17:21:19: Parsing script deferreddemo.material
17:21:19: Parsing script deferred_post_debug.material
17:21:19: Parsing script deferred_post_minilight.material
17:21:19: Parsing script deferred_post_multipass.material
17:21:19: Parsing script deferred_post_onepass.material
17:21:19: Parsing script RomanBath.material
17:21:19: Parsing script dojo.material
17:21:19: Parsing script Examples.compositor
17:21:20: Parsing script sample.fontdef
17:21:20: Parsing script emitted_emitter.particle
17:21:20: Parsing script Example-Water.particle
17:21:20: Parsing script Example.particle
17:21:20: Parsing script smoke.particle
17:21:20: Parsing script Compositor.overlay
17:21:20: Parsing script DP3.overlay
17:21:20: Parsing script Example-CubeMapping.overlay
17:21:20: Parsing script Example-DynTex.overlay
17:21:20: Parsing script Example-Water.overlay
17:21:20: Parsing script Shadows.overlay
17:21:20: Finished parsing scripts for resource group General
17:21:20: Parsing scripts for resource group Internal
17:21:20: Finished parsing scripts for resource group Internal
17:21:20: SoundManager Initialized
17:21:20: Creating viewport on target 'Window', rendering from camera 'SimpleCamera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
17:21:20: Viewport for camera 'SimpleCamera', actual dimensions L: 0 T: 0 W: 1152 H: 864
17:21:20: SoundManager::CreateSound successful 'Harunoumi.ogg'
17:21:20: SoundManager::CreateSound successful 'Wind_Birds.ogg'
17:21:20: ********************************
17:21:20: ** oScene Loader Lib **
17:21:20: ********************************
17:21:20: oSceneLoader: Loading 'dojo.osm' file


From the debug console

Windows has triggered a breakpoint in Martial Arts.exe.

This may be due to a corruption of the heap, and indicates a bug in Martial Arts.exe or any of the DLLs it has loaded.

The output window may have more diagnostic information


Where the above message points to

_BUF_SIZE 16 int
_Myres 31 unsigned int
- this "../media/levels.zip/" std::basic_string<char,std::char_traits<char>,std::allocator<char> > * const
- [actual members] {npos=4294967295 _Bx={...} _Mysize=20 ...} std::basic_string<char,std::char_traits<char>,std::allocator<char> >
- std::_String_val<char,std::allocator<char> > {_Alval={...} } std::_String_val<char,std::allocator<char> >
- std::_String_base {...} std::_String_base
- std::_Container_base {_Myfirstiter=0x00000000 } std::_Container_base
- _Myfirstiter 0x00000000 {_Mycont=??? _Mynextiter=??? } std::_Iterator_base *
_Mycont CXX0030: Error: expression cannot be evaluated
_Mynextiter CXX0030: Error: expression cannot be evaluated
- _Alval {...} std::allocator<char>
std::_Allocator_base<char> {...} std::_Allocator_base<char>
npos 4294967295 const unsigned int
- _Bx {_Buf=0x0017f5d4 "à\ÌÌÌÌÌÌÌÌÌÌÌÌ" _Ptr=0x011d5ce0 "../media/levels.zip/" } std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Bxty
- _Buf 0x0017f5d4 "à\ÌÌÌÌÌÌÌÌÌÌÌÌ" char [16]
[0] -32 'à' char
[1] 92 '\' char
[2] 29 '' char
[3] 1 '' char
[4] -52 'Ì' char
[5] -52 'Ì' char
[6] -52 'Ì' char
[7] -52 'Ì' char
[8] -52 'Ì' char
[9] -52 'Ì' char
[10] -52 'Ì' char
[11] -52 'Ì' char
[12] -52 'Ì' char
[13] -52 'Ì' char
[14] -52 'Ì' char
[15] -52 'Ì' char
- _Ptr 0x011d5ce0 "../media/levels.zip/" char *
46 '.' char
_Mysize 20 unsigned int
_Myres 31 unsigned int
[0] 46 '.' char
[1] 46 '.' char
[2] 47 '/' char
[3] 109 'm' char
[4] 101 'e' char
[5] 100 'd' char
[6] 105 'i' char
[7] 97 'a' char
[8] 47 '/' char
[9] 108 'l' char
[10] 101 'e' char
[11] 118 'v' char
[12] 101 'e' char
[13] 108 'l' char
[14] 115 's' char
[15] 46 '.' char
[16] 122 'z' char
[17] 105 'i' char
[18] 112 'p' char
[19] 47 '/' char



If I comment out my scene loader code, the program runs fine. Coincidentally, my school only has 7.1 (ugh), and if I attempt to run the same code there, it also crashes if I don't have the scene loader commented out.

Screen shot of the strange debug error, this is very similar, if not the exact same thing that happens on a 7.1 system.


edit: To test to make sure it wasn't that it was trying to load too much, I commented out everything EXCEPT my scene loader code.
OSMScene oScene(this->mSceneMgr, this->mWindow);
oScene.initialise("dojo.osm");
oScene.createScene();

Same error, I wanted to try compiling the example loader in 9.0, or 7.1, but I don't have dagon here with me. I'll attempt to do it at school tomorrow and let you know if it gives the same error. I will say this, when loading the sample code into 8.0, it didn't insist that I convert it. Was the loader written in 8.0?

Lioric

15-06-2007 02:35:27

Review that you are not mixing release and debug versions of your libraries (are you using ogre from the sdk?)

And that you are compiling with the same CRT

It seems that you are experiencing memory corruption in the string object and this is because your are using different memory handlers (release vs debug, or CRT single thread vs multi thread)

Paulov

15-06-2007 12:04:07

hello.

Just a question related with one I made in General question wich was about protecting artist media.

Can you add a pasword to your zip file and make thea plication run without making it run slower? this would be easy?

just this.


byebye

Evak

15-06-2007 15:26:39

Don't know, but you can call the zip anything you want, would deter casual glances, but a proper nose around and you would see the zip files defined in the resource.cfg

Would be cool to have some kind of zip encryption saved through the OSM and passed to the scene loader.

rluck

15-06-2007 21:20:08

Review that you are not mixing release and debug versions of your libraries (are you using ogre from the sdk?)

And that you are compiling with the same CRT

It seems that you are experiencing memory corruption in the string object and this is because your are using different memory handlers (release vs debug, or CRT single thread vs multi thread)

yeah, when using 7.1, I was using a 7.1 sdk and cleaning and rebuilding, only to get that error.