Klimczak.Jan Posted November 28, 2017 Share Posted November 28, 2017 Hi, I observed that Editor2 crashes when I get runtime error e.g. make some operation at not existing object. I know that I should protect it in the code. But it is possible to just display error in console of Editor 2 instead crash entire Editor 2 ? Thank You Link to comment
silent Posted December 5, 2017 Share Posted December 5, 2017 Klimczak.Jan, Could you please attach any particular code example (*.world + .cpp) that can cause Editor 2 crash? 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
Klimczak.Jan Posted December 12, 2017 Author Share Posted December 12, 2017 On 5.12.2017 at 4:41 AM, silent said: Klimczak.Jan, Could you please attach any particular code example (*.world + .cpp) that can cause Editor 2 crash? Thanks! Here is sample code from Unigine script file (in my case from init function): Node node1 = engine.editor.getNode(index); node1.getTransform(); Operating at non existing object just crash Editor2 (see second line above) - here I provided not existing index. I think that better way could be just report such error in console and not load and execute script at all instead of crash editor. Link to comment
sebastianbah Posted December 18, 2017 Share Posted December 18, 2017 Hi, Do you edit .cpp file in assets/ or in data/ folder? Thanks! Link to comment
Klimczak.Jan Posted December 18, 2017 Author Share Posted December 18, 2017 4 hours ago, sebastianbah said: Hi, Do you edit .cpp file in assets/ or in data/ folder? Thanks! I am editing file in asset folder. The crash happens only when you have already loaded and opened world without in Editor2 ant then edit a script .cpp file from asset folder e.g.: Node node1 = engine.editor.getNode(7868); node1.getTransform(); In the case you have line as above without existing node with id 7868 and during loading a world at startup you will see just error message in console. So the crash only happens if you have already loaded world in engine and then you are try to operate at NULL object. Link to comment
Klimczak.Jan Posted January 1, 2018 Author Share Posted January 1, 2018 Little update for SDK 2.6.1, here in the case of error in script the Editor2 freeze and you should force to close it, and restart it again. Link to comment
Recommended Posts