ivan.cuevas Posted March 23, 2016 Share Posted March 23, 2016 Hi all, After moving to new Ungine 2.2, I've realized Ungine fails at initialization trying to load gui resources in a folder different from core (by specifying <item name="gui_path" type="string">my_app/gui/</item> in config file) if these resources are packed in a .ung file. I've checked the .ung file by extracting the content and verifying the files are present and without any case variation in their names (they have exactly the same name as Unigine expects). In fact if the files are not archived the engine starts as expected. Link to comment
ded Posted March 25, 2016 Share Posted March 25, 2016 Hi, We have some success in reproducing this issue. It'll help however if you provide more detail. Which one engine binary are you using: debug or release? Are there any error messages in the log when engine fails? (by default engine saves log to the "bin/log.html") Link to comment
ivan.cuevas Posted March 25, 2016 Author Share Posted March 25, 2016 This is a log fragment from the start to the world loading... 12:15:57 12:15:57 ---- Plugins ---- 12:15:57 12:15:57 ---- Application ---- 12:16:00 Loading "dxgi.dll"... 12:16:00 Loading "openal32.dll"... 12:16:00 Set 1600x900 windowed video mode 12:16:00 FontTTF::FontTTF(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/font.ttf" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_mouse.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_background.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_selection.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_tooltip.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_vpaned.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_hpaned.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_border.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_tabbox.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_window.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_button.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_checkbox.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_combobox.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_treebox.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_vspacer.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_hspacer.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_vslider.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_hslider.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_vscroll.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_hscroll.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_spinbox.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_editor.png" file 12:16:00 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui_white.png" file 12:16:00 Xml::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui.rc" file 12:16:00 Gui::setResource(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/gui.rc" file 12:16:00 12:16:00 ---- Engine ---- 12:16:00 UNIGINE Engine 12:16:00 Version: 2.2 release-2.2-61859c1 Mar 16 2016 12:16:00 Binary: Windows 64-bit Visual C++ 1800 Release 12:16:00 Features: OpenGL OpenGL4.4 Direct3D11 OpenAL XAudio2 XPad360 Joystick Editor DoubleCoords HalfTexCoords Microprofile OpenEXR Geodetic 12:16:00 App path: F:/Izar/IPMS_v3/ALHD/apps/nux/bin/ 12:16:00 Data path: F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/ 12:16:00 Save path: F:/Izar/IPMS_v3/ALHD/apps/nux/bin/12:16:00 12:16:00 ---- System ---- 12:16:00 OS: Windows 8 64-bit 12:16:00 CPU: Intel® Core i7 CPU 960 @ 3.20GHz 3238MHz MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 HTT x4 12:16:00 GPU: NVIDIA GeForce GT 720 10.18.13.6191/NVIDIA GeForce GTX 970 10.18.13.6191 x1 12:16:00 System memory: 22526 MB 12:16:00 Video memory: 4096 MB 12:16:00 Sync threads: 3 12:16:00 Async threads: 4 12:16:00 12:16:00 ---- MathLib ---- 12:16:00 Set SSE2 simd processor 12:16:00 12:16:01 ---- Sound ---- 12:16:01 Renderer: OpenAL Soft 12:16:01 OpenAL vendor: OpenAL Community 12:16:01 OpenAL renderer: OpenAL Soft 12:16:01 OpenAL version: 1.1 ALSOFT 1.15.1 12:16:01 Found AL_EXT_LINEAR_DISTANCE 12:16:01 Found AL_EXT_OFFSET 12:16:01 Found ALC_EXT_EFX 12:16:01 Found EFX Filter 12:16:01 Found EFX Reverb 12:16:01 Found EAX Reverb 12:16:01 Found QUAD16 format 12:16:01 Found 51CHN16 format 12:16:01 Found 61CHN16 format 12:16:01 Found 71CHN16 format 12:16:01 Maximum sources: 256 12:16:01 Maximum effect slots: 4 12:16:01 Maximum auxiliary sends: 2 12:16:01 12:16:01 ---- Render ---- 12:16:01 Renderer: NVidia 4007MB 12:16:01 Direct3D11 desc: NVIDIA GeForce GTX 970 12:16:01 Maximum texture size: 16384 12:16:01 Maximum texture units: 16 12:16:01 Maximum texture renders: 8 12:16:01 12:16:01 ---- Physics ---- 12:16:01 Physics: Multi-threaded 12:16:01 12:16:01 ---- PathFind ---- 12:16:01 PathFind: Multi-threaded 12:16:01 12:16:01 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/dialog_ok.png" file 12:16:01 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/dialog_cancel.png" file 12:16:01 ImageFilePNG::load(): can't open "F:/Izar/IPMS_v3/ALHD/apps/nux/unigine/data/nux-sailing/gui/dialog_close.png" file 12:16:01 Loading "core/materials/default/unigine_post.mat" 31 materials 9225 shaders 12ms 12:16:01 Loading "core/materials/default/unigine_render.mat" 48 materials 103050 shaders 6ms 12:16:01 Loading "core/materials/default/unigine_render_light.mat" 2 materials 23850 shaders 4ms 12:16:01 Loading "core/materials/default/unigine_decal.mat" 1 material 131850 shaders 6ms 12:16:01 Loading "core/materials/default/unigine_mesh.mat" 1 material -5159252 shaders 8ms 12:16:01 Loading "core/materials/default/unigine_mesh_stem.mat" 2 materials 4ms 12:16:01 Loading "core/materials/default/unigine_terrain.mat" 1 material 232200 shaders 4ms 12:16:01 Loading "core/materials/default/unigine_grass.mat" 2 materials 68850 shaders 5ms 12:16:01 Loading "core/materials/default/unigine_particles.mat" 1 material 47025 shaders 4ms 12:16:01 Loading "core/materials/default/unigine_billboards.mat" 4 materials 131625 shaders 5ms 12:16:01 Loading "core/materials/default/unigine_volume.mat" 6 materials 10350 shaders 5ms 12:16:01 Loading "core/materials/default/unigine_gui.mat" 2 materials 4725 shaders 5ms 12:16:01 Loading "core/materials/default/unigine_water.mat" 1 material 3600 shaders 5ms 12:16:01 Loading "core/materials/default/unigine_sky.mat" 1 material 4725 shaders 6ms 12:16:01 Loading "core/materials/default/unigine_sensor.mat" 8 materials 900 shaders 5ms 12:16:01 Loading "core/materials/default/unigine_water_global.mat" 21 materials 137700 shaders 11ms 12:16:01 Loading "core/properties/unigine.prop" 2 properties 4ms 12:16:01 ---- Interpreter ---- 12:16:01 MicroProfile: Web server started on port 1337 12:16:01 Version: 2.8012:16:01 12:16:01 Loading "nux-sailing/unigine.cpp" 67ms 12:16:01 Loading "core/locale/unigine.locale" dictionary 5ms 12:16:01 Unigine~# world_load nux-sailing/main 12:16:04 Loading "nux-sailing/main.cpp" 2744ms Link to comment
paralyzah Posted March 28, 2016 Share Posted March 28, 2016 Hello Ivan We've found some problems in work with ung-files, but we could not reproduce your caseСan you send us small test scene for reproduction? Thanks Link to comment
silent Posted April 13, 2016 Share Posted April 13, 2016 Hi Iván, We've made some changes to ung resources loading in 2.2.1 update. Could you please check if that helps in your case? If not, could you please send us minimal test scene?Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
ivan.cuevas Posted May 10, 2016 Author Share Posted May 10, 2016 Hi paralyzah and silent, I'm afraid this problem isn't resolved in 2.2.1. I will prepare a test scene as soon as I can. Thanks for your help. Link to comment
ivan.cuevas Posted May 12, 2016 Author Share Posted May 12, 2016 Working in a test scene I've found a behaviour that is confusing me. I've created a project using browser. I've modified data folder into another called unigine. So in both .bat files and in the config files set -data_path "../unigine/" I've created two copies of <data>/core/gui folder inside <data>/test_data_path as gui and gui2. In both folders I've changed the gui_background.png image to quickly see what gui skin is using. Two .bat files to launch the application using each custom skin. And with another difference, the launch_debug_gui2.bat specifies gui parameter and launch_debug.bat using the gui path specified in config file. I've created the test_data_path.ung with the content of the folder with the same name. First test - Using test_data_path folder launch_debug_gui2.bat: the application works Ok. launch_debug.bat; the application works Ok. Second test - Using test_data_path.ung launch_debug_gui2.bat: the application works Ok. launch_debug.bat: looks like it uses default skin ignoring the configuration. It's not exactly the problem described above, but it's a strange behavior and maybe it can help to find a solution. Thanks. test_data_path.zip Link to comment
paralyzah Posted May 13, 2016 Share Posted May 13, 2016 Hello IvanThank you for test-scene - it very helped to understand what is the problemCorrect me if I am wrong: you want use custom gui_path, and it is not detected correctly, if engine_config was packed in ung-archive?Unfortunately, engine can not be initialized from cfg-files in ung - it's by design, we add remark in our documentation about itYou only have next ways: not to put cfg-file in ung-file or specify gui-path in command line as you do it in your test-scene, also you can replace default gui-folder in core.ungSorry for the inconvenience caused. Link to comment
Priyank.Jain2 Posted November 2, 2016 Share Posted November 2, 2016 I am facing similar issue. We are currently migrating our product from Unigine 1 to Unigine 2.3.1 We are using ung files to specify external directories. I have analysed the problem and checked the engine source code as well. Since in till Unigine 1, you can only set 1 data_path and gui_path default value is "core/gui/" BUT now in Unigine 2.3.1 we can set multiple data_paths and gui_path gets override // preparing gui path gui_path = normalize_dir_path(gui_path); if (!Dir::isAbsolute(gui_path)) gui_path = data_paths[0] + gui_path; Now I think even if I pass gui_path by config or command line, it will get override. Please let me know if my understanding is correct. Also provide me a workaround. Link to comment
ded Posted November 2, 2016 Share Posted November 2, 2016 Hi Priyank, This override for gui_path is wrong. As long as I can see all resources for GUI are loaded via engine file system and there is no need to provide an absolute path. I've removed this two lines in the development branch: if (!Dir::isAbsolute(gui_path)) gui_path = data_paths[0] + gui_path; I suggest you remove them too in your copy of SDK. Link to comment
Recommended Posts