Engine, ProbeManager : Stop tutorial and remove Proxy on activity close

Bug #488969 reported by Michael Janelle-Montcalm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tutorius
Confirmed
Undecided
Unassigned

Bug Description

When closing an activity, the Probe sends an unregister_probe message to the service with the activity_id. The service then warns the ProbeManager to remove the ProbeProxy associated to this id. The ProbeProxy will uninstall all the actions and events it installed before being removed.

This causes a problem as the TutorialRunner will not be closed properly. Thus, the TutorialRunner might still be waiting for notifications after an activity is closed. In this case, there are no pending callbacks, so the TutorialRunner will not receive a Dbus exception that the remote object cannot be reached, so it needs to be cleaned otherwise.

It also causes a problem when the TutorialRunner is in the process of installing actions (Setup Actions) or installed events (Setup Events). After sending the action installation messages, if the activity closes, the runner state must either ignore those messages if it doesn't know it is related to this activity or shutdown itself it it is related to it.

We propose to insert a new message on the Service that is Activity Stopped, to replace the unregister probe message on the Service. This message will trigger the maintenance of the TutorialRunner state as well as the removal of the ProbeProxy in the ProbeManager. As a pre-condition to this call, the Probe must have uninstalled all the actions and events it possessed.

In the case where there are multiple tutorial runners being executed, they should all receive a notification that the given activity was closed. They must switch to the IDLE state and ignore all the further incoming messages. Notably, the DBus error messages should not cause further installation in the tutorial.

We also suggest to rename the register probe function to Activity Started, for symmetry.

Another error message to be supported as a symptom of a crash-stopped activity is a DBus exception that no proxy exists. When receiving such a message, the tutorial should uninstall everything it installed (in other activities) and switch to the IDLE state. All further error messages will be ignored. The Tutorial Runner should be released once all the callbacks have been called. The ProbeManager itself must handle this error by uninstalling the ProbeProxy related to this activity.

Changed in tutorius:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.