ataylor Posted July 13, 2015 Share Posted July 13, 2015 Main window has button that spawns permanent-focus DialogOne. DialogOne has button that spawns permanent-focus DialogTwo. DialogOne is always populated using UI file. DialogTwo is populated either using UI file or programmatically in UnigineScript, depending on if SHOW_BAD_BEHAVIOR is defined. If defined, it uses UI file. If not, it uses programmatic population. When DialogTwo uses UI file, opening it for the second time causes endless console errors. Reproduction steps: ------ Load the attached world Click button to open DialogOne Click button in DialogOne to open DialogTwo Close DialogTwo Close DialogOne Click button to open DialogOne Click button in DialogOne to open DialogTwo Endless console spam!? Optionally, edit test.cpp, comment out #define SHOW_BAD_BEHAVIOR, reload world, problem is not reproducible without 2nd dialog using UI file. What is going on here? test.zip Link to comment
silent Posted July 14, 2015 Share Posted July 14, 2015 Hi Adam, Thank you for the test scene and detailed description! I've successfully reproduced this issue and added it to our internal bug tracker. 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
silent Posted July 16, 2015 Share Posted July 16, 2015 Hi Adam, This is also not a bug, you forgot to delete widget when you no longer need it (if you call new, don't forget to call delete!). Just add delete d; at the end of OpenDialogOne() and OpenDialogTwo() functions and you will not get any script crashes. 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
ataylor Posted July 16, 2015 Author Share Posted July 16, 2015 I see. I had a misunderstanding about how UnigineScript does memory management. I will re-read docs. I am still confused and curious as to why this problem happens only when using a UserInterface. Link to comment
Recommended Posts