Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot crashes when importing .vox file #601

Open
beicause opened this issue Feb 17, 2024 · 8 comments
Open

Godot crashes when importing .vox file #601

beicause opened this issue Feb 17, 2024 · 8 comments
Labels
bug Reproduction needed Cannot be fixed until a minimal test project or precise steps that reproduce the issue are provided

Comments

@beicause
Copy link

beicause commented Feb 17, 2024

Describe the bug
When project contains .vox file, godot automatically imports it and crashes.

To Reproduce
Open a project that contains .vox file.

Expected behavior
It shouldn't crash

Screenshots
The console log:

ERROR: Unimplemented _get_import_order in add-on.
   at: get_import_order (editor/import/editor_import_plugin.cpp:112)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.2.2.rc.custom_build (474589eb838623f4a59628c0316d0d27f83ed3d1)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fb9e45a9520] (??:0)
[2] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0xfbf879] (??:0)
[3] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x15b529f] (??:0)
[4] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x15ba2bd] (??:0)
[5] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x15c3d9f] (??:0)
[6] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x15c51ff] (??:0)
[7] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x3f73268] (??:0)
[8] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x24eaeb4] (??:0)
[9] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x253d59b] (??:0)
[10] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x253de41] (??:0)
[11] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x482d69] (??:0)
[12] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x4200e8] (??:0)
[13] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fb9e4590d90] (??:0)
[14] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fb9e4590e40] (??:0)
[15] /home/luo/Dowload/godot.linuxbsd.editor.x86_64() [0x431dca] (??:0)
-- END OF BACKTRACE --
================================================================

Environment
Godot v4.2.2.rc (474589eb8) - Linux Mint 21.3 (Virginia) - X11 - Vulkan (Mobile) - integrated AMD Unknown (RADV RENOIR) () - AMD Ryzen 7 4800U with Radeon Graphics (16 Threads)

@Zylann
Copy link
Owner

Zylann commented Feb 17, 2024

Eww given the error printed I wonder if that's actually a Godot bug, which nobody noticed because so few people make custom importers...
That backtrace is useless unfortunately, it has no information about where the crash happened.
Also it may be useful to provide the .vox file you used, because it could also be related to what this one specifically contains.

@Zylann Zylann added bug Needs more info Couldn't repro / more info needed labels Feb 17, 2024
@beicause
Copy link
Author

beicause commented Feb 17, 2024

// int get_import_order() const override;

I guess the reason is get_import_order isn't implemented.

The error is from:
https://github.com/godotengine/godot/blob/4ce5e261b31566f06b457f402488b6a26baa7fd1/editor/import/editor_import_plugin.cpp#L112

@Zylann
Copy link
Owner

Zylann commented Feb 17, 2024

I know, but if that error is actually what causes Godot to crash, then that's also a Godot bug. Godot must never crash if possible even if there is an error like this (someone could write a GDScript importer and crash the engine which is pretty bad).
But having the .vox file would help to figure out if the crash really happens in Godot or in the importer.

@Zylann
Copy link
Owner

Zylann commented Mar 3, 2024

I just tried importing monu1.vox, a file provided by default in MagicaVoxel. The error printed, but it didn't crash, and the model shows up properly:
image

So you will have to provide the vox file or project you used, because it probably contains something the importer didn't handle.

@Derpysphere
Copy link

Are you using a C++ voxel importer? because in the current state of godot, Vox files will crash the game 9/10 times. Don't ask why they just do. this isn't a problem with the godot voxel engine

@Zylann
Copy link
Owner

Zylann commented Jun 4, 2024

having the .vox file would help to figure out if the crash really happens in Godot or in the importer.

you will have to provide the vox file or project you used, because it probably contains something the importer didn't handle.

Please provide a minimal project and instructions to reproduce, because as I already said, I tried importing a vox file on my computer and it worked fine.
This module is entirely in C++, but the import pipeline is from Godot. Until figured out, that crash could come from either side.

@beicause
Copy link
Author

beicause commented Jun 5, 2024

The .vox file was exported with https://github.com/vengi-voxel/vengi. Maybe its .vox format isn't compatible with the importer of this module.

@Zylann
Copy link
Owner

Zylann commented Jun 5, 2024

Well either way, if someone has an issue importing some files, I need to be able to test them to see what's going on, and if any, I'd like to know what kind of special things happen with those files. It could be an unhandled format difference, could be the model is too big, could be Godot bug, could be module bug... it's still all speculation because nobody sent me a test case.
I just opened the Vengi web version, added some cubes, exported to vox, dropped into Godot and it loaded fine.
The module only implements what's described in this specification: https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox.txt

@Zylann Zylann added Reproduction needed Cannot be fixed until a minimal test project or precise steps that reproduce the issue are provided and removed Needs more info Couldn't repro / more info needed labels Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproduction needed Cannot be fixed until a minimal test project or precise steps that reproduce the issue are provided
Projects
None yet
Development

No branches or pull requests

3 participants