JMRI icon indicating copy to clipboard operation
JMRI copied to clipboard

Quiting JMRI with an AutoActiveTrain running fails to stop train before exiting.

Open DeanCording opened this issue 10 months ago • 9 comments

When you quit JMRI with a manual throttle in operation, the throttle is set to Stop before JMRI exits so as to prevent runaways.

For trains running as AutoActiveTrain under Dispatcher, the automatic control is not terminated and the throttle is not set to Stop before JMRI exits, potentially leading to runaways.

DeanCording avatar Mar 30 '24 02:03 DeanCording

@Pugwash1 Is this something for you to look at?

danielb987 avatar Apr 03 '24 21:04 danielb987

@danielb987 I don't think so. Dispatcher just uses the standard JMRI throttle. If JMRI crashes out do the WiFi throttles all set the speed to zero? Do web throttles set speed to zero? Warrant Throttles?

Pugwash1 avatar Apr 04 '24 01:04 Pugwash1

I don't know how these things works. Maybe it's only the throttle GUI that stops the train when JMRI shuts down.

Note that if I understands @DeanCording correctly, the issue is when JMRI exits cleanly, not when it crashes.

danielb987 avatar Apr 04 '24 02:04 danielb987

Note that if I understands @DeanCording correctly, the issue is when JMRI exits cleanly, not when it crashes.

That's correct. The reason I noticed is that when using the MQTT connected throttle it wasn't being set to speed 0 when I exited JMRI with an AutoTrain running. I know I spent quite a bit of effort to make sure MQTT throttles closed down safely with manual throttles, so this was a bit of a surprise.

DeanCording avatar Apr 04 '24 02:04 DeanCording

I know I spent quite a bit of effort to make sure MQTT throttles closed down safely with manual throttles, so this was a bit of a surprise.

How does MQTT throttles closes down safely? If I use a manual throttle to run the train, is it the throttle GUI or the MQTT throttle that stops the train when JMRI quits?

danielb987 avatar Apr 04 '24 02:04 danielb987

On Thursday, 4 April 2024 12:15:54 PM AEST Daniel wrote:

I know I spent quite a bit of effort to make sure MQTT throttles closed down safely with manual throttles, so this was a bit of a surprise. How does MQTT throttles closes down safely? If I use a manual throttle to run the train, is it the throttle GUI or the MQTT throttle that stops the train when JMRI quits?

It relies on the controlling throttle to properly dispose of the MQTT throttle (which wasn't happening correctly by manual throttle at the time). The manual throttle disposes of the MQTT throttle, and on disposal MQTT throttle cancels all of the current throttle commands.

DeanCording avatar Apr 04 '24 02:04 DeanCording

Here is the original issue involving manual throttles #12287

DeanCording avatar Apr 04 '24 02:04 DeanCording

To do this correctly it has to be in throttlemanager so its behavior is consistant across all platforms.

Pugwash1 avatar Apr 04 '24 08:04 Pugwash1

This issue is stale because it has been open for 45 days with no activity.

github-actions[bot] avatar May 20 '24 02:05 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Jul 29 '24 02:07 github-actions[bot]

This was addressed in #13082.

Pugwash1 avatar Jul 30 '24 00:07 Pugwash1