carl.sutton Posted August 10, 2012 Share Posted August 10, 2012 Due to the issues I have had with lower end graphics cards (https://developer.un...dgetspritenode/) the use of WidgetSpirteNode in my project has been disabled for some time. As I'm trying to now make this compatible with all hardware, I've re-enabled it, and it seems I've found a bug with later version of the SDK. Using setNode on a WidgetSpriteNode on an Object with a material assigned will cause the dreaded "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." on reaching UnigineApp::update(). Nothing appears suspicious in log file. Example crash code; Gui gui = engine.getGui(); viewport = new WidgetSpriteNode(gui, 200, 200); viewport.setViewportMask(bitmask); viewport.setBlendFunc(GUI_BLEND_SRC_ALPHA,GUI_BLEND_ONE_MINUS_SRC_ALPHA); viewport.setLayerTexCoord(0,vec4(0, 1, 1, 0)); Object mesh = Unigine::createBox(vec3(1,1,1)); mesh..setViewportMask(bitmask, 0); mesh.setMaterial("basic_material","*"); //ensure you set a material or it won't crash viewport.setNode(mesh); gui.addChild(viewport, GUI_ALIGN_OVERLAP); Funnily enough I did a similar thing somewhere else in my project with the Unigine::createPlane function and added it to the WidgetSpriteNode and it ran fine? I confirmed this bug by rolling back to 02-27 build of the SDK (where this code executes fine). I'm currently using 07-17, but the bug may have existed earlier than this. Link to comment
frustum Posted August 12, 2012 Share Posted August 12, 2012 Can't reproduce the carsh. Link to comment
carl.sutton Posted August 13, 2012 Author Share Posted August 13, 2012 I did make a test scene and it was pretty simple to reproduce. I'll dig it up and post it here and see if we can make it happen your side. Link to comment
carl.sutton Posted August 13, 2012 Author Share Posted August 13, 2012 http://dl.dropbox.com/u/12843270/WidgetSpriteNodeCrash.zip this small test project using WidgetSpriteNode will crash for me every time. Hopefully this can get to the root of the problem :-) Link to comment
frustum Posted August 13, 2012 Share Posted August 13, 2012 No crash also. Maybe this bug was fixed. Link to comment
carl.sutton Posted August 14, 2012 Author Share Posted August 14, 2012 It crashes on the 2 computers I tried it on in the office, so hopefully thats the case, will report back next update I guess. Link to comment
carl.sutton Posted September 10, 2012 Author Share Posted September 10, 2012 As of the 2012-09-07 update the problem still persists. (Using the same code as before; http://dl.dropbox.co...teNodeCrash.zip). Can nobody else reproduce this crash? Link to comment
silent Posted September 10, 2012 Share Posted September 10, 2012 Hi, I've tried to reproduce it and I also get crash. I will pass this information to Frustum, so he would able to fix this. 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
carl.sutton Posted September 10, 2012 Author Share Posted September 10, 2012 Ty silent Link to comment
silent Posted September 10, 2012 Share Posted September 10, 2012 Small UPD #1:I've put test folder in archive to the %SDK%/data/test. Open Samples & Demos tab in SDK library. Load Cool Materials library. Type in consoleworld_load ../data/test/test_sample And it is launched correctly. But when I try to launch through the bat file I get crash. I've tried in Windows 7 x64/x86 and Ubuntu 12.04 x64/x86 - everything was fine. Maybe it will be useful for you 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
carl.sutton Posted September 10, 2012 Author Share Posted September 10, 2012 How peculiar! I too can get this to run using the steps you provided, but it looks as if I need to write a horrible hack in code that loads an empty world on start before loading the main one (if indeed thats what is enabling the WidgetSpirteNode to function properly). I'd rather keep the WidgetSpirteNode objects disabled than resort to that, so I'll be patient and wait for the bug to be fixed. Link to comment
Recommended Posts