christian.wolf2 Posted March 2, 2022 Share Posted March 2, 2022 Hi, I am currently faced an issue while debugging the WidgetTreeBox with SDK 2.15 in Visual Studio 2019. I am getting the following error during hovering over the WidgetTreeBox-variable Quote Evaluating the function 'Unigine.WidgetTreeBox.NumSelectedItems.get' timed out and needed to be aborted in an unsafe way. The issue seems to occur, when accessing the WidgetTreeBox.NumSelectedItems. After some further testing the issue seems to be a general problem, when accessing the NumSelectedItems-function, when WidgetTreeBox.MultiSelection is set to false. Sample code: WidgetTreeBox sampleTreeBox = new WidgetTreeBox(Gui.Get()); sampleTreeBox.AddItem("Example 1"); sampleTreeBox.AddItem("Example 2"); sampleTreeBox.Arrange(); sampleTreeBox.MultiSelection = true; int size = sampleTreeBox.NumSelectedItems; //OK, returns 0 sampleTreeBox.MultiSelection = false; size = sampleTreeBox.NumSelectedItems; //crashes the application or debbuging of this item won't work Gui.Get().AddChild(sampleTreeBox,Gui.ALIGN_OVERLAP); I don't know if this is an intended behavior or not, but debbuging is a little bit harder when working without MultiSelection. Best Christian Link to comment
silent Posted March 2, 2022 Share Posted March 2, 2022 Hi Christian, According to documentation, NumSelectedItems is defined only for multi-selection mode: https://developer.unigine.com/en/docs/2.15/api/library/gui/class.widgettreebox?rlang=cs#NumSelectedItems So, you are getting an assert: 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
christian.wolf2 Posted March 2, 2022 Author Share Posted March 2, 2022 Hi silent, thanks for your reply. So than it is an "bug" from Visual Studio that during debug mode (when hovering over the variable during runtime to get insight of all parameters)? I never had such an issue before (well, with C++ code of course) and I didn't receive any assert code in c#, just an crash with above mentioned timeout. Link to comment
silent Posted March 3, 2022 Share Posted March 3, 2022 That's hard to say. We would need some time to spend here to better understand what's going on :) Maybe someday we would eventually find out what caused this. 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
Recommended Posts