Python error detection

This commit is contained in:
Laurent Clouet
2018-07-10 09:59:05 +02:00
parent 418bd4d75f
commit 6c9d645005
2 changed files with 9 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ public class Error {
CAN_NOT_CREATE_DIRECTORY(10), CAN_NOT_CREATE_DIRECTORY(10),
NETWORK_ISSUE(11), NETWORK_ISSUE(11),
RENDERER_CRASHED(12), RENDERER_CRASHED(12),
RENDERER_CRASHED_PYTHON_ERROR(24),
RENDERER_OUT_OF_VIDEO_MEMORY(13), RENDERER_OUT_OF_VIDEO_MEMORY(13),
RENDERER_OUT_OF_MEMORY(21), RENDERER_OUT_OF_MEMORY(21),
RENDERER_KILLED(14), RENDERER_KILLED(14),
@@ -160,6 +161,8 @@ public class Error {
return "Renderer has generated no output file, possibly a wrong project configuration or you are missing required libraries. Will try another project in a few minutes."; return "Renderer has generated no output file, possibly a wrong project configuration or you are missing required libraries. Will try another project in a few minutes.";
case RENDERER_CRASHED: case RENDERER_CRASHED:
return "Renderer has crashed. It's usually due to a bad project or not enough memory. There is nothing you can do about it. Will try another project in a few minutes."; return "Renderer has crashed. It's usually due to a bad project or not enough memory. There is nothing you can do about it. Will try another project in a few minutes.";
case RENDERER_CRASHED_PYTHON_ERROR:
return "Renderer has crashed due to Python error. Will try another project in a few minutes.";
case RENDERER_OUT_OF_VIDEO_MEMORY: case RENDERER_OUT_OF_VIDEO_MEMORY:
return "Renderer has crashed, due to not enough video memory (vram). There is nothing you can do about it. Will try another project in a few minutes."; return "Renderer has crashed, due to not enough video memory (vram). There is nothing you can do about it. Will try another project in a few minutes.";
case RENDERER_OUT_OF_MEMORY: case RENDERER_OUT_OF_MEMORY:

View File

@@ -752,6 +752,12 @@ public class Job {
// Error: EXCEPTION_ACCESS_VIOLATION // Error: EXCEPTION_ACCESS_VIOLATION
return Error.Type.RENDERER_CRASHED; return Error.Type.RENDERER_CRASHED;
} }
else if (line.indexOf("Fatal Python error: Py_Initialize") != -1) {
// Fatal Python error: Py_Initialize: unable to load the file system codec
// ImportError: No module named 'encodings'
// Current thread 0x0000388c (most recent call first):
return Error.Type.RENDERER_CRASHED_PYTHON_ERROR;
}
else if (line.indexOf("Calloc returns null") != -1) { else if (line.indexOf("Calloc returns null") != -1) {
// Fra:1 Mem:976.60M (0.00M, Peak 1000.54M) | Time:00:01.34 | Mem:0.00M, Peak:0.00M | Scene, RenderLayer | Synchronizing object | Left // Fra:1 Mem:976.60M (0.00M, Peak 1000.54M) | Time:00:01.34 | Mem:0.00M, Peak:0.00M | Scene, RenderLayer | Synchronizing object | Left
// Calloc returns null: len=7186416 in CDMLoopUV, total 2145859048 // Calloc returns null: len=7186416 in CDMLoopUV, total 2145859048