Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#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 Bro, 9 years ago

Status: newassigned
Summary: GTKUI shutdown procedure is brokenGTKUI classic mode shutdown procedure is broken

comment:2 by Calum, 9 years ago

Resolution: Fixed
Status: assignedclosed

Fixed in develop: [47f14845ca]

comment:3 by Calum, 6 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.