mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Also show error message if connection got reset without error code
When working with --external-backend, the engine just stops responding, and the operating system cleans up its socket connection. From Cura's front-end we then just see the socket reset. So we should interpret a reset socket to mean that the slicing process was halted. When not working with an external backend, a crash would always give a response code and we can base it on that instead (as previously implemented). Contributes to issue CURA-6568.
This commit is contained in:
parent
623b59d0e8
commit
40fe8b577d
1 changed files with 6 additions and 1 deletions
|
@ -610,10 +610,15 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
|
|
||||||
if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]:
|
if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]:
|
||||||
Logger.log("w", "A socket error caused the connection to be reset")
|
Logger.log("w", "A socket error caused the connection to be reset")
|
||||||
|
elif error.getErrorCode() == Arcus.ErrorCode.ConnectionResetError:
|
||||||
|
Logger.error("CuraEngine crashed abnormally! The socket connection was reset unexpectedly.")
|
||||||
|
self._slicing_error_message.show()
|
||||||
|
self.setState(BackendState.Error)
|
||||||
|
self.stopSlicing()
|
||||||
|
|
||||||
# _terminate()' function sets the job status to 'cancel', after reconnecting to another Port the job status
|
# _terminate()' function sets the job status to 'cancel', after reconnecting to another Port the job status
|
||||||
# needs to be updated. Otherwise backendState is "Unable To Slice"
|
# needs to be updated. Otherwise backendState is "Unable To Slice"
|
||||||
if error.getErrorCode() == Arcus.ErrorCode.BindFailedError and self._start_slice_job is not None:
|
elif error.getErrorCode() == Arcus.ErrorCode.BindFailedError and self._start_slice_job is not None:
|
||||||
self._start_slice_job.setIsCancelled(False)
|
self._start_slice_job.setIsCancelled(False)
|
||||||
|
|
||||||
# Check if there's any slicable object in the scene.
|
# Check if there's any slicable object in the scene.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue