Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2021-07-15 18:01:07 +0300
committerGhostkeeper <rubend@tutanota.com>2021-07-15 18:01:07 +0300
commit40fe8b577d004d1357235e931ee7344b013d96ad (patch)
tree9f81815f3377dc526782aae0ddeb159b2c530d3c /plugins/CuraEngineBackend/CuraEngineBackend.py
parent623b59d0e85190b0477c16f47295dfb44f81a879 (diff)
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.
Diffstat (limited to 'plugins/CuraEngineBackend/CuraEngineBackend.py')
-rwxr-xr-xplugins/CuraEngineBackend/CuraEngineBackend.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py
index fa9a8c5474..272ad3a7e9 100755
--- a/plugins/CuraEngineBackend/CuraEngineBackend.py
+++ b/plugins/CuraEngineBackend/CuraEngineBackend.py
@@ -610,10 +610,15 @@ class CuraEngineBackend(QObject, Backend):
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")
+ 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
# 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)
# Check if there's any slicable object in the scene.