Check if EditorNode exists before trying to generate preview#99846
Check if EditorNode exists before trying to generate preview#99846akien-mga merged 1 commit intogodotengine:masterfrom
Conversation
EditorNode is a very heavy object that current test harness cannot create, so after godotengine#96544 editor import cannot be tested. Split off from godotengine#98909
|
This seems fine as a stopgap solution but it will replace what I assume is now a crash (?) with an error. I missed #96544 before it was merged but this is a somewhat risky change, the preview generation code is known to be pretty problematic (lots of resource loading happening on threads and sometimes leading to race conditions), so doing it in even more cases may lead to bugs, like this one. I would suggest that for command line imports, no previews get generated at all. The main use case for command line import is for CI/CD and previews aren't useful in that scenario. |
|
I'll merge for now to workaround the regression, but this may require further work as suggested above. |
|
Thanks! |
|
Btw I could only reproduce the null de-reference when trying to do an import from test. I didn't check what command line import does. |
EditorNode is a very heavy object that current test harness cannot create, so after #96544 editor import cannot be tested as the new code path will try to create a screenshot.
Split off from #98909