godot_voxel icon indicating copy to clipboard operation
godot_voxel copied to clipboard

Can't export extenstion.

Open CsloudX opened this issue 2 years ago • 2 comments

Describe the bug I'm not sure is this a bug, or maybe only I'm in the wrong way. I'm try use godot_voxel with gdextension. where was my voxel.gdextension: image and I'm download this file in https://github.com/Zylann/godot_voxel/actions/runs/6939448002 and put addons\zylann.voxel\bin image and in editor, it work ok. image But when export without debug, it crash and report image

To Reproduce

Expected behavior Can export project.

Environment

  • OS: Windows10 64bit
  • Graphics card (NVIDIA GeForce RTX 2060)
  • Godot version [v4.2.rc1.mono.official [ad72de508]]
  • Module version (or commit hash if you got it from Github directly)
  • Renderer used

CsloudX avatar Nov 21 '23 14:11 CsloudX

GDExtension is not well supported at the moment. I'm actually impressed it worked fine in editor, considering there was very little testing so far.

The error message might not explain the crash. The voxel engine had some issues in the past due to Godot not really providing any reliable module/extension initialization method that can access singletons such as RenderingServer (https://github.com/godotengine/godot-cpp/issues/1180). So currently, there are checks in place to avoid accessing it if it is null. But due to the fact the singleton is still checked for null, the getter is still called, so the error Failed to retrieve non-existent singleton will print anyways, even if the singleton is not actually being accessed (if it was, it would be the cause of the crash because it is null). The error message alone doesnt create a crash though. So the cause of the crash could be something else entirely. It needs to be investigated, but it isn't my current focus at the moment.

If you need a more reliable option, you should try using the module version instead of GDExtension.

Zylann avatar Nov 21 '23 18:11 Zylann

Thank you for providing such a detailed answer

CsloudX avatar Nov 22 '23 00:11 CsloudX