Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.69k stars 251 forks source link

when adding jolt to my project godot crashes and cant be re opened the project #637

Closed namenmalkav closed 6 months ago

namenmalkav commented 6 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'assets install jolt'
  2. Click on '....'
  3. Scroll down to '....'
    
    Godot Engine v4.2.2.stable.custom_build.15073afe3 - https://godotengine.org
    Vulkan API 1.3.277 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3080

================================================================ handle_crash: Program crashed with signal 11 Engine version: Godot Engine v4.2.2.stable.custom_build (15073afe3856abd2aa1622492fe50026c7d63dc1) Dumping the backtrace. Please include this when reporting the bug to the project developer. [1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x740500442520] (??:0) [2] godot.linuxbsd.editor.double.x86_64() [0x3e28fb6] (??:0) [3] /home/namen/_home/godot/se-gpt/addons/godot-jolt/linux/godot-jolt_linux-x64_editor.so(+0x2d5a3f) [0x7404f28d5a3f] (??:0) [4] /home/namen/_home/godot/se-gpt/addons/godot-jolt/linux/godot-jolt_linux-x64_editor.so(+0x2d3d59) [0x7404f28d3d59] (??:0) [5] /home/namen/_home/godot/se-gpt/addons/godot-jolt/linux/godot-jolt_linux-x64_editor.so(+0x28162a) [0x7404f288162a] (??:0) [6] /home/namen/_home/godot/se-gpt/addons/godot-jolt/linux/godot-jolt_linux-x64_editor.so(+0x3a72a4) [0x7404f29a72a4] (??:0) [7] godot.linuxbsd.editor.double.x86_64() [0x406d9bb] (??:0) [8] godot.linuxbsd.editor.double.x86_64() [0x4b705f] (??:0) [9] godot.linuxbsd.editor.double.x86_64() [0x44ed05f] (??:0) [10] godot.linuxbsd.editor.double.x86_64() [0x42096d] (??:0) [11] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x740500429d90] (??:0) [12] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x740500429e40] (??:0) [13] godot.linuxbsd.editor.double.x86_64() [0x4329aa] (??:0) -- END OF BACKTRACE --


it happens with a new project also but here is a link to my repo:
https://github.com/unformated-space/poc2/tree/develop

**Environment**
- OS: linux (ubuntu 22.04)
- Graphics card (you can find out in Godot's console log)
- Godot version 4.2.2
- Module version: last release
Zylann commented 6 months ago

See https://github.com/Zylann/godot_voxel/issues/618#issuecomment-2094960928

This is likely not an issue with the voxel module, this is a problem with the Jolt addon. It is supposed to be a drop-in replacement for GodotPhysics and the voxel module doesn't do anything "special" regarding that.

Maybe one thing I notice is that you are trying to use a build of the editor that has double-precision floats. This is not a typical Godot build. Have you tried a version of the editor that does NOT use double-precision floats? Maybe the version of GodotJolt you are using is not built for double-precision, and you need to use one that is?

Edit: just tested GodotJolt on Windows with the normal (single-precision float) build of Godot4.2.2+VoxelTools and GodotJolt downloaded from assetlib, and it works fine. So I'm pretty sure now your case is because you're using the wrong build of either the editor or GodotJolt. It would be nice if Godot could tell you that instead of crashing though :(

mihe commented 6 months ago

Judging by the backtrace this is almost certainly because you're running Godot Jolt (which is currently only single-precision on Godot Asset Library) in a double-precision build of Godot, which are not binary compatible.

If you build Godot Jolt from source you can enable double-precision, the instructions for which you'll find here.

Ideally this wouldn't crash of course, and instead give you some helpful error message, but the feature tag support for detecting this as part of the *.gdextension file wasn't quite where it needed to be for Godot 4.2. I'm realizing now I probably could have checked this in the extension entry point instead though, maybe.

namenmalkav commented 6 months ago

that makes a lot of sense i will check using the single for the voxel for now i dont need dobles yet

namenmalkav commented 6 months ago

yes it was that ty for the help

Anyeos commented 3 months ago

Just want to contribute to help in cases like this one

If you do something that crashed the engine you can edit manually the .tscn file with a text editor and delete the part that crashed. Of course you must first pay some attention so you can understand how is it structured but it is a plain text file so it is possible to edit it manually. Take in account that every thing in a .tscn file is a reference of another reference and so. You must only pay attention of the ID and search for that ID inside the same file. So, in general it is not so complicated edit manually a .tscn file but I recommend doing a backup before proceding.

Of course if the crash was caused just adding some file you always can delete that file and don't forget to delete the associated .import.

I hope with this mini tutorial I can help somebody mitigates or recovering a crashed proyect.

bye