ivan.cuevas Posted November 10, 2010 Share Posted November 10, 2010 Hi all, Since I have updated to last Unigine version, I get the following assertion after loading a .node file and the content is visible in the viewport. 12:39:23 Loading "P:/_development_/gitsandbox/ae3dv4/bin/../data/beholder/unigine.cfg"... 12:39:23 Loading "opengl32.dll"... 12:39:23 Unigine engine http://unigine.com/ 12:39:23 Binary: Windows 32bit Visual C++ 1600 Debug Nov 1 2010 12:39:23 App path: P:/_development_/gitsandbox/ae3dv4/bin/ 12:39:23 Data path: P:/_development_/gitsandbox/ae3dv4/data/ 12:39:23 Save path: P:/_development_/gitsandbox/ae3dv4/bin/ 12:39:23 12:39:23 ---- System ---- 12:39:23 System: Windows 7 (build 7600) 32bit 12:39:23 CPU: Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz 2393MHz MMX SSE SSE2 SSE3 SSSE3 HTT 12:39:23 GPU: NVIDIA GeForce 8800 GTX 8.17.11.9745 12:39:23 System memory: 2047 Mb 12:39:23 Video memory: 768 Mb ... 12:39:51 Mesh::load_mesh(): wrong magic 0x2d5d48 in "common\2d\meshes\button_21670.mesh" file 12:40:31 D:\Unigine\source\engine\utils\Vector.h:129: Assertion: 'index >= 0 && (Counter)index < length && "Vector::operator[](): bad index"' 12:40:40 Shutdown I have used the upgrade script and I got error messages. Using meshupgrade_x86.exe directly I'm able to see exactly the error: MeshFileMESH::load(): unknown magic 0x3830696d in "button_21670.mesh" file I have re-exported meshes using last plugin, in 3D Studio MAX 2010, with the same result. Any suggestion? Thanks in advance, Iván. Link to comment
binstream Posted November 10, 2010 Share Posted November 10, 2010 Is your data packed into zip/ung pack? Link to comment
ivan.cuevas Posted November 10, 2010 Author Share Posted November 10, 2010 Is your data packed into zip/ung pack? No, they are independent files. I was able to load each mesh file in UnigineEditor, and in the ResourceEditor (looks like the problem only appears using the mesh upgrade tool and when the meshes are loaded from a node file) Here is the mesh file attached. button_21670.zip Link to comment
ulf.schroeter Posted November 10, 2010 Share Posted November 10, 2010 The problem seems to be more general, as we get similar error messages dds_read_header(): wrong magic in <texture_name>.dds when calling render_manager_reload on console. On initial world load all textures are loaded without any problem. Also when viewing the texture in the material editor texture view the texture is displayed correctly (so the binary dds file format should be correct) In some cases on render_manager_reload also previous visible animations for ObjectMeshSkinned instances are gone. Link to comment
ulf.schroeter Posted November 10, 2010 Share Posted November 10, 2010 After some debugging found possible root of problem 176-Missing FileSystem::getFile() Failure Check 1 Link to comment
binstream Posted November 11, 2010 Share Posted November 11, 2010 Ulf, thank you! It seems that we need to release a hotfix update pretty soon. Link to comment
ivan.cuevas Posted November 11, 2010 Author Share Posted November 11, 2010 Excelent!!! Thank you very much. Link to comment
ivan.cuevas Posted November 11, 2010 Author Share Posted November 11, 2010 I have applied the fix propossed by Ulf, the error in load mesh dissapears, but the assertion remains :( c:\Program Files\Unigine\SDK-source\source\engine\utils\Vector.h:125: Assertion: 'index >= 0 && (Counter)index < length && "Vector::operator[](): bad index"' Looks like there is something more, I'll wait for the hotfix. Link to comment
ulf.schroeter Posted November 11, 2010 Share Posted November 11, 2010 12:39:51 Mesh::load_mesh(): wrong magic 0x2d5d48 in "common\2d\meshes\button_21670.mesh" file 12:40:31 D:\Unigine\source\engine\utils\Vector.h:129: Assertion: 'index >= 0 && (Counter)index < length && "Vector::operator[](): bad index"' Based on time difference of 40s between your 2 error messages I don't think that they are related to each other. For tracking down the remaining error message you should put a breakpoint on Vector.h:129 and inspect call stack to get a hint for the cause of that invalid index operation. UNIGINE will not be able to find the cause without such additional information or even better a small test case for error reproduction Link to comment
ivan.cuevas Posted November 12, 2010 Author Share Posted November 12, 2010 The time difference is because it isn't a load process problem but a rendering problem (the assertion appears when the mesh must be rendered in the viewport) At the moment I discovered the assertion arises at Mesh.h (ln.98) when the Mesh::getBoundBox(0) and Mesh::surfaces vector is empty (I can't know why) The call stack is this: Unigine_x86d.dll!Mesh::getBoundBox(int surface=0) Line 100 C++ Unigine_x86d.dll!ObjectMesh::getBoundBox(int surface=0) Line 157 C++ Unigine_x86d.dll!Object::getTransparentDistance(const vec3 & camera={...}, int surface=0) Line 202 + 0x22 bytes C++ Unigine_x86d.dll!ObjectSurface::getTransparentDistance(const vec3 & camera={...}) Line 461 C++ Unigine_x86d.dll!SurfaceTransparentCompare::SurfaceTransparentCompare(Vector<ObjectSurface *,int> & surfaces={...}, const vec3 & camera={...}) Line 452 + 0xe bytes C++ Unigine_x86d.dll!SortSurfaceTransparent(Vector<ObjectSurface *,int> & surfaces={...}, const vec3 & camera={...}) Line 506 C++ Unigine_x86d.dll!RenderRenderer::render_scene_viewport(RenderScene * scene=0x025265e0, RenderDeferred * deferred=0x00000000, int reflections=0, int shadows=0) Line 2308 C++ Unigine_x86d.dll!RenderRenderer::render_reflection_2d(const Vector<ObjectSurface *,int> & surfaces={...}) Line 1402 C++ Unigine_x86d.dll!RenderRenderer::render_reflections(RenderScene * scene=0x02526510) Line 1750 C++ Unigine_x86d.dll!RenderRenderer::render_world(const char * materials=0x0027ec84, int shadows=1) Line 2633 C++ Unigine_x86d.dll!Render::renderWorld() Line 728 C++ Unigine_x86d.dll!Engine::do_render() Line 1679 C++ Unigine_x86d.dll!GLAppWindow::do_render(void * * data=0x0027f554) Line 265 C++ Unigine_x86d.dll!AppWindow::doRender() Line 901 C++ Unigine_x86d.dll!Engine::main() Line 1925 C++ ae3dcorev4_d.dll!aE3D::Core::run() Line 168 + 0x20 bytes C++ beholderv4_d.exe!mainBeholder(int argc=11, char * * argv=0x004b5ef8) Line 25 + 0x19 bytes C++ beholderv4_d.exe!main(int argc=11, char * * argv=0x004b5ef8) Line 54 + 0xd bytes C++ beholderv4_d.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C beholderv4_d.exe!mainCRTStartup() Line 403 C kernel32.dll!77581194() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!777cb495() ntdll.dll!777cb468() I know is not enough information, but it's hard to me to find time to debug this. I'm preparing a simple sample reproducing the error. Thanks again for your help. Link to comment
ivan.cuevas Posted November 13, 2010 Author Share Posted November 13, 2010 Here is test: I've rebuilt unigine with two modifications: removing the /NODEFAULTLIB:"libcmt.lib" (because it was generating many link errors) modifyng FileSystem.cpp applying the Ulf fix. I've created the test folder with the attached files. I've modified the %UNIGINE_DIR%\data\samples\materials\refraction_00.cpp with the following code: void create_scene() { add_editor(node_load("test/button.node")); return 1; } After executing the materials_gl.bat, this is the log file: 21:31:41 Loading "D:/_development_/_external_/UNIGINE/Unigine-20101101-src/bin/unigine.cfg"... 21:31:41 Loading "opengl32.dll"... 21:31:41 Loading "openal32.dll"... 21:31:42 Set 1024x768 windowed video mode 21:31:42 Set 1.00 gamma value 21:31:42 Unigine engine http://unigine.com/ 21:31:42 Binary: Windows 32bit Visual C++ 1500 Debug Nov 13 2010 21:31:42 App path: D:/_development_/_external_/UNIGINE/Unigine-20101101-src/bin/ 21:31:42 Data path: D:/_development_/_external_/UNIGINE/Unigine-20101101-src/data/ 21:31:42 Save path: D:/_development_/_external_/UNIGINE/Unigine-20101101-src/bin/ 21:31:42 21:31:42 ---- System ---- 21:31:42 System: Windows 7 (build 7600) 32bit 21:31:42 CPU: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz 2832MHz MMX SSE SSE2 SSE3 SSSE3 SSE41 HTT 21:31:42 GPU: NVIDIA GeForce GTX 260 8.17.12.5896 21:31:42 System memory: 2047 Mb 21:31:42 Video memory: 896 Mb 21:31:42 21:31:42 ---- MathLib ---- 21:31:42 Set SSE simd processor 21:31:42 21:31:42 ---- Sound ---- 21:31:42 Renderer: Generic Software 21:31:42 OpenAL vendor: Creative Labs Inc. 21:31:42 OpenAL renderer: Software 21:31:42 OpenAL version: 1.1 21:31:42 Found AL_EXT_LINEAR_DISTANCE 21:31:42 Found AL_EXT_OFFSET 21:31:42 Found ALC_EXT_EFX 21:31:42 Found EFX Filter 21:31:42 Found EFX Reverb 21:31:42 Found EAX Reverb 21:31:42 Found QUAD16 format 21:31:42 Found 51CHN16 format 21:31:42 Found 61CHN16 format 21:31:42 Found 71CHN16 format 21:31:42 Maximum sources: 256 21:31:42 Maximum effect slots: 1 21:31:42 Maximum auxiliary sends: 1 21:31:42 21:31:42 ---- Render ---- 21:31:42 Renderer: NVIDIA NV50 896Mb 21:31:42 OpenGL vendor: NVIDIA Corporation 21:31:42 OpenGL renderer: GeForce GTX 260/PCI/SSE2 21:31:42 OpenGL version: 3.3.0 21:31:42 Found required GL_ARB_map_buffer_range 21:31:42 Found required GL_ARB_vertex_array_object 21:31:42 Found required GL_ARB_vertex_buffer_object 21:31:42 Found required GL_ARB_half_float_vertex 21:31:42 Found required GL_ARB_half_float_pixel 21:31:42 Found required GL_ARB_occlusion_query 21:31:42 Found required GL_EXT_texture3D 21:31:42 Found required GL_EXT_texture_cube_map 21:31:42 Found required GL_EXT_texture_sRGB 21:31:42 Found required GL_EXT_texture_swizzle 21:31:42 Found required GL_ARB_shader_object 21:31:42 Found required GL_ARB_vertex_shader 21:31:42 Found required GL_ARB_fragment_shader 21:31:42 Found required GL_ARB_draw_buffers 21:31:42 Found required GL_ARB_framebuffer_object 21:31:42 Found required GL_EXT_framebuffer_blit 21:31:42 Found required GL_EXT_framebuffer_multisample 21:31:42 Found optional GL_ARB_draw_instanced 21:31:42 Found optional GL_ARB_transform_feedback 21:31:42 Found optional GL_ARB_draw_elements_base_vertex 21:31:42 Found optional GL_EXT_draw_buffers2 21:31:42 Found optional GL_ARB_blend_func_extended 21:31:42 Found optional GL_ARB_uniform_buffer_object 21:31:42 Found optional GL_ARB_geometry_shader4 21:31:42 Found optional GL_ARB_gpu_shader4 21:31:42 Found optional GL_EXT_Cg_shader 21:31:42 Found optional GL_ARB_texture_rg 21:31:42 Found optional GL_ARB_texture_array 21:31:42 Found optional GL_ARB_texture_snorm 21:31:42 Found optional GL_ARB_texture_multisample 21:31:42 Found optional GL_ARB_texture_compression 21:31:42 Found optional GL_ARB_texture_compression_rgtc 21:31:42 Found optional GL_ARB_seamless_cube_map 21:31:42 Found optional RGB10A2 render texture format 21:31:42 Shading language: 3.30 NVIDIA via Cg compiler 21:31:42 Maximum texture size: 8192 21:31:42 Maximum texture units: 32 21:31:42 Maximum draw buffers: 8 21:31:42 21:31:42 ---- Physics ---- 21:31:42 Physics: Multi-threaded 21:31:42 21:31:42 Unigine~# editor_quit && world_load samples/materials/refraction_00 21:31:42 ---- Interpreter ---- 21:31:42 Version: 2.37 21:31:42 21:31:42 Loading "core/unigine.cpp" 13ms 21:31:42 Loading "core/locale/unigine.en" dictionary 21:31:42 Loading "core/materials/unigine_post.mat" 11 materials 11 shaders 0ms 21:31:42 Loading "core/materials/unigine_render.mat" 38 materials 178 shaders 6ms 21:31:42 Loading "core/materials/unigine_meshes.mat" 17 materials 11532 shaders 55ms 21:31:42 Loading "core/materials/unigine_terrains.mat" 1 material 144 shaders 1ms 21:31:42 Loading "core/materials/unigine_grass.mat" 1 material 69 shaders 2ms 21:31:42 Loading "core/materials/unigine_particles.mat" 1 material 45 shaders 3ms 21:31:42 Loading "core/materials/unigine_billboards.mat" 1 material 69 shaders 3ms 21:31:42 Loading "core/materials/unigine_volumes.mat" 6 materials 45 shaders 5ms 21:31:42 Loading "core/materials/unigine_guis.mat" 1 material 70 shaders 1ms 21:31:42 Loading "core/materials/unigine_water.mat" 1 material 101 shaders 4ms 21:31:42 Loading "core/materials/unigine_skies.mat" 1 material 13 shaders 4ms 21:31:42 Loading "core/materials/unigine_decals.mat" 1 material 55 shaders 2ms 21:31:42 Loading "core/properties/unigine.prop" 2 properties 0ms 21:31:42 Unigine~# editor_load 21:31:42 Editor::editor_quit(): editor is not loaded 21:31:42 Loading "samples/materials/refraction_00.cpp" 34ms 21:31:42 Loading "samples/materials/common/materials.mat" 31 materials 19ms 21:31:42 Loading "samples/materials/refraction_00.world" 20ms 21:31:42 Loading "test\button.mat" 5 materials 2ms 21:31:42 Loading "data/core/editor/editor.cpp" 302ms 21:31:42 21:31:42 ---- Editor ---- 21:31:42 Version: 0.54 21:31:42 21:31:44 Mesh::load_mesh(): can't open "test\button_21670.mesh" file 21:31:44 Mesh::load_mesh(): can't open "test\button_21669.mesh" file 21:31:44 Mesh::load_mesh(): can't open "test\button_21668.mesh" file 21:31:44 d:\_development_\_external_\UNIGINE\Unigine-20101101-src\source\engine\utils\Vector.h:129: Assertion: 'index >= 0 && (Counter)index < length && "Vector::operator[](): bad index"' 21:31:45 Shutdown I don't know why the mesh files aren't properly loaded, I think the assertion is consequence of these errors. What do you think? test.rar Link to comment
binstream Posted November 15, 2010 Share Posted November 15, 2010 The problem is fixed, the solution will be available in the next Unigine SDK update. Link to comment
binstream Posted November 30, 2010 Share Posted November 30, 2010 Please update to 2010-11-29 version: https://developer.unigine.com/forum/topic/219-unigine-sdk-2010-11-29/ Link to comment
ivan.cuevas Posted December 1, 2010 Author Share Posted December 1, 2010 Updating..., thank you very much. Link to comment
Recommended Posts