What is the problem?
As soon as I cancel the print using the plugin "emergency stop simplified", Octoprint just "shuts down" and I get a "not running" page instead. Octoprint.log does not show any errors or notifications that it encountered an error and had to shut down somehow, it literally "disappeared". The octoprint service kept saying that the PID was still alive, although there was no python scripts running anymore (verified using ps).
What did you already try to solve it?
I found out that if I removed the gcode from the "cancel print" option (Settings -> Gcode scripts) the plugin kept working as expected and there is no forced closing of octoprint. It did complain about the serial port being "disconnected", which was expected behaviour since the printer was resetting. Most likely octoprint crashes while writing gcode to a closed serial port.
serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!)
I can show logs, but it seems the culprit can not be found in the logs (at least I did not witness any errors or issues in the logs).
The last output from the Serial command is M112, followed by a warning that the serial port is disconnected. The "cancel" gcode does not seem to be executed (most likely error'd while writing to a closed serial).
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)
Ender 3 Printer with modified marlin, supports M112 "Emergency stop" which will trigger a full reset of the printer (including closing the serial port).
Runs: OctoPrint 1.4.0 running on OctoPi 0.17.0
My thought is that Octoprint should threat M112 commands as a fatal "Error" commands and should not execute any Cancel scripts.