Jump to content

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


photo

Recommended Posts

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

Link to comment

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:

Link to comment
×
×
  • Create New...