#2802 closed bug (Fixed)
GTKUI classic mode shutdown procedure is broken
Reported by: | Bro | Owned by: | Bro |
---|---|---|---|
Priority: | major | Milestone: | 2.0.0 |
Component: | GTK UI | Version: | develop |
Keywords: | Cc: |
Description
In thin client mode, the shutdown routine does not have to do much, but in classic mode, all the components have to be shut down properly before closing.
There are two separate issues as far as I've found.
GTKUI component shutdown after reactor is stopped
When closing GTKUI main window (mainwindow.py#L227 ) the reactor is stopped.
The result is that this call to reactor.run()
returns:
gtkui.py#L246
The call to self.shutdown()
on the next line (gtkui.py#L247) in turn calls component.stop()
and component.shutdown()
, which is completely broken, as the reactor is no longer running which means async events like deferreds cannot be processed.
The reason the shutdown procedure in classic mode works anyways as that the daemon has addSystemEventTrigger("before", "shutdown", self._shutdown)
which calls component.shutdown()
:
daemon.py#L155
SIGINT stops reactor breaking components shutdown
Running GTKUI in terminal and trying to close with CTRL-C does not work very good. The process hangs and needs multiple signals to close, and sometimes doesn't even close at all and needs explicit call to kill.
The problem is that the reactor closes (reactor.run()
ends) resulting in deferreds from component.close
/component.shutdown
call not being fired.
Change History (3)
comment:1 by , 9 years ago
Status: | new → assigned |
---|---|
Summary: | GTKUI shutdown procedure is broken → GTKUI classic mode shutdown procedure is broken |
comment:2 by , 9 years ago
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
Fixed in develop: [47f14845ca]