Jump to content

[WONTFIX] Dialog 'this' becomes NULL after waiting for another dialog to be done


photo

Recommended Posts

Posted

Main window has button that spawn DialogOne. DialogOne has button that spawns DialogTwo. In callback for DialogOne's button, "this" is valid before waiting for DialogTwo.isDone. After DialogTwo.isDone, DialogOne "this" is NULL.

 

See attached test.cpp world.

 

Click "Open Test Dialog 1" button

Click "Open Dialog Two" button.

Note log.message output showing typeinfo for DialogOne instance -- info looks valid including pointer.

Dismiss Dialog Two using either button.

Note log.message output showing typeinfo for DialogOne with pointer as NULL.

 

Is this a bug? If so, is there a workaround? My development is severely impeded by this.

test.cpp

Posted

Hi Adam,

 

Thank you for the test scene. It looks like a but to me too. I've added it to our internal bug tracker. When I will have a feedback from developers I surely will let you know.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hi Adam,

 

Unfortunately, this is expected behavior when you are using wait operator. Please, check the documentation: https://developer.unigine.com/en/docs/1.0/scripting/language/control_statements/wait

 

Please, consider rewrite your code to use static functions instead. Maybe this topic will be useful in your case too.

 

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Ok, I will rewrite using static functions. Thank you.

×
×
  • Create New...