Skip to content
New issue

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

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

Already on GitHub? # to your account

Crashes when saving 16384x16384 terrain. #513

Closed
originalred opened this issue Oct 5, 2024 · 2 comments
Closed

Crashes when saving 16384x16384 terrain. #513

originalred opened this issue Oct 5, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@originalred
Copy link

Terrain3D version

v0.9.0, v0.9.2-beta

System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 32.0.15.6109) - 12th Gen Intel(R) Core(TM) i5-12450H (12 Threads)

Is the issue reproducable in the demo?

Not applicable

Issue description

Crashes when saving as .res file after generating. Can copy & paste and save, but not save as.

Crash not just limited to import tool - crashes when generated map is copied & pasted to Terrain3D in another scene.

Stack trace points to possible bug in engine - maybe because file was over 4gb?

Logs

C:\Godot_v4.3\bin\windows>godot.windows.editor.x86_64.console.exe --terrain3d-debug=EXTREME
Godot Engine v4.3.stable.custom_build.77dcf97d8 (2024-08-14 23:00:16 UTC) - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 561.09 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 4050 Laptop GPU

Editing project: D:/Godot/vrtest
Godot Engine v4.3.stable.custom_build.77dcf97d8 (2024-08-14 23:00:16 UTC) - https://godotengine.org
Vulkan 1.3.280 - Forward Mobile - Using Device #0: NVIDIA - NVIDIA GeForce RTX 4050 Laptop GPU

================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.stable.custom_build (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] <couldn't map PC to fn name>
[1] <couldn't map PC to fn name>
[2] <couldn't map PC to fn name>
[3] <couldn't map PC to fn name>
[4] <couldn't map PC to fn name>
[5] <couldn't map PC to fn name>
[6] <couldn't map PC to fn name>
[7] <couldn't map PC to fn name>
[8] <couldn't map PC to fn name>
[9] <couldn't map PC to fn name>
[10] <couldn't map PC to fn name>
[11] <couldn't map PC to fn name>
[12] <couldn't map PC to fn name>
[13] <couldn't map PC to fn name>
[14] <couldn't map PC to fn name>
[15] <couldn't map PC to fn name>
[16] <couldn't map PC to fn name>
[17] <couldn't map PC to fn name>
[18] <couldn't map PC to fn name>
[19] <couldn't map PC to fn name>
[20] <couldn't map PC to fn name>
[21] <couldn't map PC to fn name>
[22] <couldn't map PC to fn name>
[23] <couldn't map PC to fn name>
[24] <couldn't map PC to fn name>
[25] <couldn't map PC to fn name>
[26] <couldn't map PC to fn name>
[27] <couldn't map PC to fn name>
[28] <couldn't map PC to fn name>
[29] <couldn't map PC to fn name>
[30] <couldn't map PC to fn name>
[31] <couldn't map PC to fn name>
[32] <couldn't map PC to fn name>
[33] <couldn't map PC to fn name>
[34] <couldn't map PC to fn name>
[35] <couldn't map PC to fn name>
[36] <couldn't map PC to fn name>
[37] <couldn't map PC to fn name>
[38] <couldn't map PC to fn name>
[39] <couldn't map PC to fn name>
[40] <couldn't map PC to fn name>
[41] <couldn't map PC to fn name>
[42] <couldn't map PC to fn name>
[43] <couldn't map PC to fn name>
[44] <couldn't map PC to fn name>
[45] <couldn't map PC to fn name>
[46] <couldn't map PC to fn name>
[47] <couldn't map PC to fn name>
-- END OF BACKTRACE --
================================================================

Attached some more useful info...

Actual error:

Exception thrown: write access violation.
this->**write_ptr** was 0x111011181110112.

Stack trace:

>	godot.windows.editor.x86_64.exe!FileAccessCompressed::store_8(unsigned char p_dest) Line 349	C++
 	godot.windows.editor.x86_64.exe!FileAccess::store_buffer(const unsigned char * p_src, unsigned __int64 p_length) Line 716	C++
 	godot.windows.editor.x86_64.exe!ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const Variant & p_property, HashMap<Ref<Resource>,int,HashMapHasherDefault,HashMapComparatorDefault<Ref<Resource>>,DefaultTypedAllocator<HashMapElement<Ref<Resource>,int>>> & resource_map, HashMap<Ref<Resource>,int,HashMapHasherDefault,HashMapComparatorDefault<Ref<Resource>>,DefaultTypedAllocator<HashMapElement<Ref<Resource>,int>>> & external_resources, HashMap<StringName,int,HashMapHasherDefault,HashMapComparatorDefault<StringName>,DefaultTypedAllocator<HashMapElement<StringName,int>>> & string_map, const PropertyInfo & p_hint) Line 1884	C++
 	godot.windows.editor.x86_64.exe!ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const Variant & p_property, HashMap<Ref<Resource>,int,HashMapHasherDefault,HashMapComparatorDefault<Ref<Resource>>,DefaultTypedAllocator<HashMapElement<Ref<Resource>,int>>> & resource_map, HashMap<Ref<Resource>,int,HashMapHasherDefault,HashMapComparatorDefault<Ref<Resource>>,DefaultTypedAllocator<HashMapElement<Ref<Resource>,int>>> & external_resources, HashMap<StringName,int,HashMapHasherDefault,HashMapComparatorDefault<StringName>,DefaultTypedAllocator<HashMapElement<StringName,int>>> & string_map, const PropertyInfo & p_hint) Line 1864	C++
 	godot.windows.editor.x86_64.exe!ResourceFormatSaverBinaryInstance::save(const String & p_path, const Ref<Resource> & p_resource, unsigned int p_flags) Line 2341	C++
 	godot.windows.editor.x86_64.exe!ResourceFormatSaverBinary::save(const Ref<Resource> & p_resource, const String & p_path, unsigned int p_flags) Line 2482	C++
 	godot.windows.editor.x86_64.exe!ResourceSaver::save(const Ref<Resource> & p_resource, const String & p_path, unsigned int p_flags) Line 128	C++
 	godot.windows.editor.x86_64.exe!EditorNode::save_resource_in_path(const Ref<Resource> & p_resource, const String & p_path) Line 1317	C++
 	godot.windows.editor.x86_64.exe!EditorNode::_dialog_action(String p_file) Line 2154	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args_helper(EditorNode *) Line 304	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args(EditorNode * p_instance, void(EditorNode::*)(String) p_method, const Variant * *) Line 418	C++
 	godot.windows.editor.x86_64.exe!CallableCustomMethodPointer<EditorNode,String>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 103	C++
 	godot.windows.editor.x86_64.exe!Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
 	godot.windows.editor.x86_64.exe!Object::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 1190	C++
 	godot.windows.editor.x86_64.exe!Node::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 3896	C++
 	godot.windows.editor.x86_64.exe!Object::emit_signal<String>(const StringName & p_name, String <p_args_0>) Line 936	C++
 	godot.windows.editor.x86_64.exe!EditorFileDialog::_action_pressed() Line 617	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args_helper(EditorFileDialog *) Line 304	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args(EditorFileDialog * p_instance, void(EditorFileDialog::*)() p_method, const Variant * *) Line 418	C++
 	godot.windows.editor.x86_64.exe!CallableCustomMethodPointer<EditorFileDialog>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 104	C++
 	godot.windows.editor.x86_64.exe!Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
 	godot.windows.editor.x86_64.exe!Object::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 1190	C++
 	godot.windows.editor.x86_64.exe!Node::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 3896	C++
 	godot.windows.editor.x86_64.exe!Object::emit_signal<>(const StringName & p_name) Line 936	C++
 	godot.windows.editor.x86_64.exe!AcceptDialog::_ok_pressed() Line 138	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args_helper(AcceptDialog *) Line 304	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args(AcceptDialog * p_instance, void(AcceptDialog::*)() p_method, const Variant * *) Line 418	C++
 	godot.windows.editor.x86_64.exe!CallableCustomMethodPointer<AcceptDialog>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 104	C++
 	godot.windows.editor.x86_64.exe!Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
 	godot.windows.editor.x86_64.exe!Object::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 1190	C++
 	godot.windows.editor.x86_64.exe!Node::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 3896	C++
 	godot.windows.editor.x86_64.exe!Object::emit_signal<>(const StringName & p_name) Line 936	C++
 	godot.windows.editor.x86_64.exe!BaseButton::_pressed() Line 138	C++
 	godot.windows.editor.x86_64.exe!BaseButton::on_action_event(Ref<InputEvent> p_event) Line 176	C++
 	godot.windows.editor.x86_64.exe!BaseButton::gui_input(const Ref<InputEvent> & p_event) Line 69	C++
 	godot.windows.editor.x86_64.exe!Control::_call_gui_input(const Ref<InputEvent> & p_event) Line 1831	C++
 	godot.windows.editor.x86_64.exe!Viewport::_gui_call_input(Control * p_control, const Ref<InputEvent> & p_input) Line 1570	C++
 	godot.windows.editor.x86_64.exe!Viewport::_gui_input_event(Ref<InputEvent> p_event) Line 1836	C++
 	godot.windows.editor.x86_64.exe!Viewport::push_input(const Ref<InputEvent> & p_event, bool p_local_coords) Line 3259	C++
 	godot.windows.editor.x86_64.exe!Window::_window_input(const Ref<InputEvent> & p_ev) Line 1680	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args_helper(Window *) Line 304	C++
 	[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args(Window * p_instance, void(Window::*)(const Ref<InputEvent> &) p_method, const Variant * *) Line 418	C++
 	godot.windows.editor.x86_64.exe!CallableCustomMethodPointer<Window,Ref<InputEvent> const &>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 103	C++
 	godot.windows.editor.x86_64.exe!Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
 	godot.windows.editor.x86_64.exe!Callable::call<Ref<InputEvent>>(Ref<InputEvent> <p_args_0>) Line 876	C++
 	godot.windows.editor.x86_64.exe!DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> & p_event) Line 3557	C++
 	godot.windows.editor.x86_64.exe!Input::_parse_input_event_impl(const Ref<InputEvent> & p_event, bool p_is_emulated) Line 775	C++
 	godot.windows.editor.x86_64.exe!Input::flush_buffered_events() Line 1056	C++
 	godot.windows.editor.x86_64.exe!DisplayServerWindows::process_events() Line 3025	C++
 	godot.windows.editor.x86_64.exe!OS_Windows::run() Line 1666	C++
 	godot.windows.editor.x86_64.exe!widechar_main(int argc, wchar_t * * argv) Line 181	C++
 	godot.windows.editor.x86_64.exe!_main() Line 208	C++
 	godot.windows.editor.x86_64.exe!main(int argc, char * * argv) Line 220	C++
 	[External Code]	

And the state of the scoped vars:

<!--StartFragment-->
  | Name | Value | Type
-- | -- | -- | --
◢ | this | 0x000001d959b48ff0 {cmode=MODE_ZSTD (2) writing=true write_pos=2147483648 ...} | FileAccessCompressed *
  | ▶ FileAccess | {big_endian=false real_is_double=false _access_type=ACCESS_FILESYSTEM (2) } | FileAccess
  | cmode | MODE_ZSTD (2) | Compression::Mode
  | writing | true | bool
  | write_pos | 2147483648 | unsigned __int64
  | ▶ write_ptr | 0x0000000000000000 <NULL> | unsigned char *
  | write_buffer_size | 0 | unsigned int
  | write_max | 2147483649 | unsigned __int64
  | block_size | 4096 | unsigned int
  | read_eof | false | bool
  | at_end | false | bool
  | ▶ comp_buffer | {[size]=0 } | Vector<unsigned char>
  | ▶ read_ptr | 0x0000000000000000 <NULL> | unsigned char *
  | read_block | 0 | unsigned int
  | read_block_count | 0 | unsigned int
  | read_block_size | 0 | unsigned int
  | read_pos | 0 | unsigned __int64
  | ▶ read_blocks | {[size]=0 } | Vector<FileAccessCompressed::ReadBlock>
  | read_total | 0 | unsigned __int64
  | ▶ magic | U"RSCC" | String
  | ▶ buffer | {[size]=0 } | Vector<unsigned char>
  | ▶ f | {reference=0x000001d9401d46e0 {f=0x000001d9131bad90 {_Placeholder=0x0000000000000000 {...} } flags=2 ...} } | Ref<FileAccess>
  | write_pos | 2147483648 | unsigned __int64
◢ | write_ptr | 0x0000000000000000 <NULL> | unsigned char *
  |   | <Unable to read memory> | unsigned char
  | writing | true | bool

<!--EndFragment-->

@TokisanGames TokisanGames added the duplicate This issue or pull request already exists label Oct 5, 2024
@TokisanGames
Copy link
Owner

Duplicate #159 fixed in #374. Use a nightly build.

@TokisanGames TokisanGames closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2024
@TokisanGames
Copy link
Owner

Thanks for the detailed issue though. Now you should be able to save up to 65.5 x 65.5km, though you'll probably run out of ram or vram until we get streaming in.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants