Opened 8 years ago

Closed 8 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 Changed 8 years ago by bro

  • Status changed from new to assigned
  • Summary changed from GTKUI shutdown procedure is broken to GTKUI classic mode shutdown procedure is broken

comment:2 Changed 8 years ago by Cas

  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed in develop: [47f14845ca]

comment:3 Changed 6 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.