How to tell what's destroying my GUI?

Backstory:

I have a timer that I set up in my gui_script init(), but it’s not firing. I’ve traced it back to the fact that the gui is getting destroyed (final() gets called) and then re-created. For various reasons, the timer doesn’t get created the second time (this is mostly intentional). I’m using Monarch, if that helps.

So the GUI is getting destroyed somehow, but if I set a breakpoint in either final() or init() of my gui_script, the stacktrace doesn’t tell me anything about where. So I don’t know how to find why it’s trying to create it twice. I set a breakpoint at monarch.show(...) for this screen, but that only gets called once.

Are you using the same .gui_script in two different guis? Are you using any global functions?

No, the gui_script is only used in one GUI. The monarch scene is a popup, though.

yeah, probably? I’ve been trying to keep everything pretty modular, but I’ve probably got some global functions scattered around the project. Is there anything in particular I should be looking for?

Can you isolated this to a small project that you can share with me?

Or if you call monarch.debug() and share the additional log data here.