Godot version:
3.1 (March 13, 2019) and 3.0.6
OS/device including version:
Windows 10 x64
GeForce GTX 770/PCIe/SSE2
Issue description:
The game crashes after a while. The game window will freeze and then close, giving the error:
drivers/unix/net_socket_posix.cpp:190 - Socket error: 10054
Video:
imgur
Steps to reproduce:
Minimal reproduction project:
Godot Match 3 Part 30.zip
Original project -> Godot Match 3 Part 30
I got this backtrace, when I opened all scenes at once:
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: decode_variant: Condition ' (type & 0xFF) >= Variant::VARIANT_MAX ' is true. returned: ERR_INVALID_DATA
At: core/io/marshalls.cpp:113.
ERROR: decode_variant: Condition ' err ' is true. returned: err
At: core/io/marshalls.cpp:531.
ERROR: _poll_events: Condition ' err != OK ' is true. Continuing..:
At: core/script_debugger_remote.cpp:692.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f7d0f7d0f20] (??:0)
[2] UndoRedo::_process_operation_list(List<UndoRedo::Operation, DefaultAllocator>::Element*) (/home/rafal/Pulpit/godot/core/undo_redo.cpp:267)
[3] UndoRedo::redo() (/home/rafal/Pulpit/godot/core/undo_redo.cpp:333)
[4] UndoRedo::commit_action() (/home/rafal/Pulpit/godot/core/undo_redo.cpp:255)
[5] EditorNode::_scene_tab_changed(int) (/home/rafal/Pulpit/godot/editor/editor_node.cpp:4199 (discriminator 4))
[6] EditorNode::load_scene(String const&, bool, bool, bool, bool) (/home/rafal/Pulpit/godot/editor/editor_node.cpp:2952)
[7] EditorNode::open_request(String const&) (/home/rafal/Pulpit/godot/editor/editor_node.cpp:3100)
[8] FileSystemDock::_select_file(String, bool) (/home/rafal/Pulpit/godot/editor/filesystem_dock.cpp:787)
[9] FileSystemDock::_file_option(int, Vector<String>) (/home/rafal/Pulpit/godot/editor/filesystem_dock.cpp:1442 (discriminator 2))
[10] FileSystemDock::_tree_rmb_option(int) (/home/rafal/Pulpit/godot/editor/filesystem_dock.cpp:1411 (discriminator 3))
[11] MethodBind1<int>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[12] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:942 (discriminator 1))
[13] Object::emit_signal(StringName const&, Variant const**, int) (/home/rafal/Pulpit/godot/core/object.cpp:1228 (discriminator 1))
[14] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/core/object.cpp:1285)
[15] PopupMenu::activate_item(int) (/home/rafal/Pulpit/godot/scene/gui/popup_menu.cpp:1102 (discriminator 4))
[16] PopupMenu::_gui_input(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/gui/popup_menu.cpp:330)
[17] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[18] Object::call_multilevel(StringName const&, Variant const**, int) (/home/rafal/Pulpit/godot/core/object.cpp:777 (discriminator 1))
[19] Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/core/object.cpp:883)
[20] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:1533 (discriminator 2))
[21] Viewport::_gui_input_event(Ref<InputEvent>) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:1905 (discriminator 3))
[22] Viewport::input(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:2659 (discriminator 2))
[23] Viewport::_vp_input(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:1309)
[24] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[25] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:942 (discriminator 1))
[26] Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/core/object.cpp:867)
[27] SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:262)
[28] SceneTree::input_event(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:418 (discriminator 6))
[29] InputDefault::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/rafal/Pulpit/godot/main/input_default.cpp:416)
[30] InputDefault::parse_input_event(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/main/input_default.cpp:260)
[31] InputDefault::flush_accumulated_events() (/home/rafal/Pulpit/godot/main/input_default.cpp:680)
[32] OS_X11::process_xevents() (/home/rafal/Pulpit/godot/platform/x11/os_x11.cpp:2462)
[33] OS_X11::run() (/home/rafal/Pulpit/godot/platform/x11/os_x11.cpp:3004)
[34] /usr/bin/godot(main+0xdc) [0x1167183] (/home/rafal/Pulpit/godot/platform/x11/godot_x11.cpp:56)
[35] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f7d0f7b3b97] (??:0)
[36] /usr/bin/godot(_start+0x2a) [0x1166fea] (??:?)
-- END OF BACKTRACE --
rafal@rafal:~$ ERROR: _get_socket_error: Socket error: 104
At: drivers/unix/net_socket_posix.cpp:199.
Second backtrace:
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: encode_variant: Method/Function Failed, returning: ERR_BUG
At: core/io/marshalls.cpp:1389.
ERROR: decode_variant: Condition ' (type & 0xFF) >= Variant::VARIANT_MAX ' is true. returned: ERR_INVALID_DATA
At: core/io/marshalls.cpp:113.
ERROR: decode_variant: Condition ' err ' is true. returned: err
At: core/io/marshalls.cpp:531.
ERROR: _poll_events: Condition ' err != OK ' is true. Continuing..:
At: core/script_debugger_remote.cpp:692.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f7d0f7d0f20] (??:0)
[2] UndoRedo::_process_operation_list(List<UndoRedo::Operation, DefaultAllocator>::Element*) (/home/rafal/Pulpit/godot/core/undo_redo.cpp:267)
[3] UndoRedo::redo() (/home/rafal/Pulpit/godot/core/undo_redo.cpp:333)
[4] UndoRedo::commit_action() (/home/rafal/Pulpit/godot/core/undo_redo.cpp:255)
[5] EditorNode::_scene_tab_changed(int) (/home/rafal/Pulpit/godot/editor/editor_node.cpp:4199 (discriminator 4))
[6] EditorNode::load_scene(String const&, bool, bool, bool, bool) (/home/rafal/Pulpit/godot/editor/editor_node.cpp:2952)
[7] EditorNode::open_request(String const&) (/home/rafal/Pulpit/godot/editor/editor_node.cpp:3100)
[8] FileSystemDock::_select_file(String, bool) (/home/rafal/Pulpit/godot/editor/filesystem_dock.cpp:787)
[9] FileSystemDock::_file_option(int, Vector<String>) (/home/rafal/Pulpit/godot/editor/filesystem_dock.cpp:1442 (discriminator 2))
[10] FileSystemDock::_tree_rmb_option(int) (/home/rafal/Pulpit/godot/editor/filesystem_dock.cpp:1411 (discriminator 3))
[11] MethodBind1<int>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[12] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:942 (discriminator 1))
[13] Object::emit_signal(StringName const&, Variant const**, int) (/home/rafal/Pulpit/godot/core/object.cpp:1228 (discriminator 1))
[14] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/core/object.cpp:1285)
[15] PopupMenu::activate_item(int) (/home/rafal/Pulpit/godot/scene/gui/popup_menu.cpp:1102 (discriminator 4))
[16] PopupMenu::_gui_input(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/gui/popup_menu.cpp:330)
[17] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[18] Object::call_multilevel(StringName const&, Variant const**, int) (/home/rafal/Pulpit/godot/core/object.cpp:777 (discriminator 1))
[19] Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/core/object.cpp:883)
[20] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:1533 (discriminator 2))
[21] Viewport::_gui_input_event(Ref<InputEvent>) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:1905 (discriminator 3))
[22] Viewport::input(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:2659 (discriminator 2))
[23] Viewport::_vp_input(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/viewport.cpp:1309)
[24] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[25] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:942 (discriminator 1))
[26] Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/core/object.cpp:867)
[27] SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:262)
[28] SceneTree::input_event(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:418 (discriminator 6))
[29] InputDefault::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/rafal/Pulpit/godot/main/input_default.cpp:416)
[30] InputDefault::parse_input_event(Ref<InputEvent> const&) (/home/rafal/Pulpit/godot/main/input_default.cpp:260)
[31] InputDefault::flush_accumulated_events() (/home/rafal/Pulpit/godot/main/input_default.cpp:680)
[32] OS_X11::process_xevents() (/home/rafal/Pulpit/godot/platform/x11/os_x11.cpp:2462)
[33] OS_X11::run() (/home/rafal/Pulpit/godot/platform/x11/os_x11.cpp:3004)
[34] /usr/bin/godot(main+0xdc) [0x1167183] (/home/rafal/Pulpit/godot/platform/x11/godot_x11.cpp:56)
[35] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f7d0f7b3b97] (??:0)
[36] /usr/bin/godot(_start+0x2a) [0x1166fea] (??:?)
-- END OF BACKTRACE --
rafal@rafal:~$ ERROR: _get_socket_error: Socket error: 104
At: drivers/unix/net_socket_posix.cpp:199.
Also sometimes error about missing function happens:
ERROR: _process_operation_list: Error calling method from signal '': 'EditorNode::': Method not found.
At: core/undo_redo.cpp:291.
ERROR: _process_operation_list: Error calling method from signal '': 'EditorNode::': Method not found.
At: core/undo_redo.cpp:291.
ERROR: _process_operation_list: Error calling method from signal '': 'EditorNode::': Method not found.
At: core/undo_redo.cpp:291.
Play until the error appears
Can you bisect this bug to - Run the game and its crash?
I previously encountered this error in my tilemap game.
For me, the fix was to load in the textures to the tilemap node.
Maybe you have a node with a property that is not properly loaded..?
(I'm new to Godot so I'm not really the one to trust with this, but maybe I could help)
I looked up Godot's source code.
Error Print came from "drivers/unix/net_socket_posix.cpp:190" which is this:
https://github.com/godotengine/godot/blob/29a1202d39b0efb617a8ff4ee9764612f3e0124f/drivers/unix/net_socket_posix.cpp#L190
I think it has something to do with Winsock. And if it does, that means that the error is WSAECONNRESET (Error Code: 10054, see https://docs.microsoft.com/en-us/windows/desktop/winsock/windows-sockets-error-codes-2 for more info)
I don't really know how and why Godot is using Winsock, but these stuffs are beyond my current knowledge.
(I haven't reached college education yet. Don't blame me for not understanding these. lol :P )
Socket error 10054 is because the debugger is using Winsock, and it's disconnecting when the crash happens and/or it gets unexpected data. (Yes, I have had cases where the game runs perfectly IF I don't touch the remote tree tab, then it crashes, because the debugger for some reason cannot handle it)
Socket error 10054 is because the debugger is using Winsock, and it's disconnecting when the crash happens and/or it gets unexpected data. (Yes, I have had cases where the game runs perfectly IF I don't touch the remote tree tab, then it crashes, because the debugger for some reason cannot handle it)
Well now I know why Godot is using Winsock. Thanks! :D
Most probably your project is doing something which causes the project itself to crash... badly named variables, recursive references, missing assets could all be the reason.
Play until the error appears
Can you bisect this bug to - Run the game and its crash?
No. The game never crashed on launch. You need to play for a while until you get an error.
Most probably your project is doing something which causes the project itself to crash... badly named variables, recursive references, missing assets could all be the reason.
I am new to Godot. And this project was done strictly following the tutorial. Twice from scratch (on versions 3.0.6 and 3.1). And this problem occurred both times. The problem does not allow itself to be found (not an informative error without any specifics).
I have the same problem with my project in Godot_v3.1-stable_win64.
I completely deleted a lot of comments in which they hit lines like this - ("""some kind of code" value of the line "some kind of code""") and this helped, after this, such error stopped appearing. If there are relapses I will inform.
I have this problem too
Same error here, Windows 8.1 V3.1.1 Mono stable. After a reboot everything works fine again? I only get this on launch after messing around with 3D camera's.
I am getting this error when changing scenes or reloading scenes sometimes :(
I found out that disabling the debugger agent (in Project Settings/Mono/Debugger Agent/Wait For Debugger) will solve this issue.
I get this error + crash when trying to debug Godot using vs code.
The same problem appeared when I attempted to export all the scenes in circle(ther first exports the second, the seconde exports the third ... the last exports the first).
I've solved my problem. At the beggining I tried to use 'export(packedscene) var scene' to export the scene and then use function change_scene_to to get into another scene. The error occured in this way but when I tried to use change_scene with parameter of the path of the scene, everything was in order. So, I guess, the operation of export happens at the begginning of the programm and it is the first step. If the scenes are exported in circle just as what I said in the last comment, godot will stick on loading those scenes in dead circle. When it got the limit of memory or quantity of functions or anything else I'm not sure, godot got broken with this error because its debugger had been broken.
I have the same error message (only on windows, Linux seems to run smooth for me). I am not sure if it is caused by the same thing as the error message itself is not very descriptive. My project has only a few nodes. The only one with a script is a RigidBody with some _integrate_forces()
things. The error consistently appears after the game ran for a few seconds (basically the error appears when the body reaches a "stable" position). My code was a small test for an idea I had (limiting the movement of a RigidBody onto a Curve3D...). The code is far from perfect, however it should not make the engine crash.
If you think this is not related to this issue please let me know so I can create a separate issue. The error message itself does not really tell me what is wrong or why it appears.
Godot Version:
v3.2.dev.calinou.197b65f32
OS:
Windows 10 x64
Minimal reproduction project:
testing.zip
Code that enables the bug:
extends RigidBody
var curve := Curve3D.new()
onready var last_position := global_transform.origin
func _ready():
curve.add_point(Vector3(-2, 0, 0))
curve.add_point(Vector3(0, -1, 0))
curve.add_point(Vector3(+2, 0, 0))
func _integrate_forces(state: PhysicsDirectBodyState):
var new_offset := curve.get_closest_offset(state.transform.origin)
state.transform.origin = curve.interpolate_baked(new_offset)
state.linear_velocity = state.linear_velocity.project(
state.transform.origin - last_position
)
last_position = state.transform.origin
That doesn't look like GDScript, nor C#. What language/bindings is that?
Do you mean my example? It is GDScript (using type annotations)
After further investigation I think the drivers/unix/net_socket_posix.cpp:190 - Socket error: 10054
error is only hiding another error which causes the game to crash. In my case I found an error in my code:
state.linear_velocity = state.linear_velocity.project(
state.transform.origin - last_position
)
This code fragment can lead to linear_velocity
being (-1.#IND, -1.#IND, -1.#IND)
. This happens when the body is not moving because then the Vector3.project
function is called with (0, 0, 0)
and therefore (-1.#IND, -1.#IND, -1.#IND)
is returned. When I eliminate this bug also the socket error disappears. Because of this I suspect that (at least in my case) the socket error is only appearing because the game crashed based on a different error.
Hi iam currently doing the "Discovering Godot: Make Video Games in Python-like GDScript" on udemy. While trying around for an exercise ive also run into this bug. Heres the bugged project:
@Klassix, this happens because you have infinite recurrence.
$VBoxContainer/HBoxContainer/PlayerText.clear()
function is connected via signal with func _on_PlayerText_text_changed(text):
which execute func _on_TextureButton_pressed():
which execute $VBoxContainer/HBoxContainer/PlayerText.clear()
and so on.
Having this problem occur sporadically with my game, usually only when telling the master state machine to swap out large scenes. Debug log looked like this:
Code executed looks like this:
This was happening to me on Win 10 x64.
I just went to the Internet Options -> Connections -> Lan Settings then enabled the proxy, hit OK and then disabled it again and hit OK.
The error was gone.
I also have this Error (Win 7 64). Although I'm certain we all have other underlying issue that is obstructed by this error.
My project crashes with a white screen as soon as I try to run it and there is no other error message, so it's really hard to investigate what the actual issue is and where to find the problem in my code.
drivers/unix/net_socket_posix.cpp:190 - Socket error: 10054
just means that the debugger's connection was severed, because the game crashed. It's not the relevant part of whatever problem each of you are experiencing, and it shouldn't be reported as a bug.
It is a bug, only I'm not sure it's in Godot. Could be something with Windows.
If you thinks it might be a Godot bug, then attach here a minimal project to reproduce it.
Only after shutting down and restarting Windows, Godot stopped crashing when I started to run my project.
This crashing behavior and error cost me way too much time though. I did not consider restart earlier, because I had no problem with Windows or other Window applications while the issue was present. I also had no problem working within the Godot editor while the crashing was occurring, as it only crashed the window in which I tried to run my project. Restarting Godot itself did not help.
After trying to run another Godot project which I did not touch that day with the same crash and error was it clear that I had to restart my system.
_Even if this is not a Godot bug, the error message (as it is so often) could be a lot more informative about what is going on and how to solve the issue._
It happened to me when I deleted a material on which a model was depended on. Making the material with same name and extension fixed it.
To everyone who reported issues in this thread apart from OP, please open your own issues.
This issue should have been renamed earlier but "Socket error: 10054" is NOT A BUG and this is also not a common denominator between the issues you are facing. It's just a message from the debugger telling you that the debugger can't connect anymore -- because your game process crashed.
As such this issue is basically a collection of "my game can crash" comments, which you can easily imagine might have a thousand different causes for every single commenter here.
This issue should be solely about debugging the crash when playing the game in https://github.com/godotengine/godot/issues/27444#issue-425530537, all other issues should have their own ticket with detailed steps to reproduce and reproduction project, otherwise they have no change to be fixed.
@Ratinod I played the match3 game for a few minutes on Godot 3.2 alpha 1 and did not get any issue. Can you still reproduce the crash?
@akien-mga, to my understanding what happens is what is mentioned here:
Socket error 10054 is because the debugger is using Winsock, and it's disconnecting when the crash happens and/or it gets unexpected data. (Yes, I have had cases where the game runs perfectly IF I don't touch the remote tree tab, then it crashes, because the debugger for some reason cannot handle it)
Based on this comment https://github.com/godotengine/godot/issues/27444#issuecomment-478885441
So, if the debugger cannot handle the error, there's no error message to look at. And, this way it becomes very hard to debug the issue. Meaning that it would become very hard to create a minimal reproduction project, as the CAUSE of the issue is unknown.
But you say:
This issue should have been renamed earlier but "Socket error: 10054" is NOT A BUG
all other issues should have their own ticket with detailed steps to reproduce and reproduction project, otherwise they have no change to be fixed.
And this worries me, because I don't know how to find the source of the problem, in other words it will become very hard to fix my specific issue. And given what you say it sounds like there will be no help from here.
I'll delete my "spam" comment anyhow... (not this one)
@Toshiwoz I didn't mean that any comment was spam - but each comment stating that they have the "same" issue should actually be their own issue with detailed information on what issue you actually have.
So, if the debugger cannot handle the error, there's no error message to look at. And, this way it becomes very hard to debug the issue. Meaning that it would become very hard to create a minimal reproduction project, as the CAUSE of the issue is unknown.
It's not about the debugger not being able to handle the error. The game crashes (process killed), so the connection to the debugger is severed. The debugger notifies it and reports that.
The fact that there is no other error is not related to the debugger losing its connection.
What happens is:
Yes I understand, it is impossible for you, and anyone reporting this kind of issue, to find out what the cause is, so how can one solve it?
I al trying launching the editor with the -d parameter, but... I don't know where the log is going, I can't see it in the official documentation:
https://docs.godotengine.org/en/3.1/getting_started/editor/command_line_tutorial.html#debugging
And even if I can, if the log is all I see in the shell window, it probably won't help.
Do I have to download the source code and debug it with VS?
Or is there any other easier solution?
It's just a message from the debugger telling you that the debugger can't connect anymore -- because your game process crashed.
The reason why we are all here is because the error message does not communicate this clearly. Since the unclear debug message is the reason we are all here, including OP, it is part of this issue, no?
@Toshiwoz To read the output from a project exported in release mode on Windows, you can enable file logging. Open the editor, go to the Project Settings then check Logging > File Logging > Enable File Logging. The log will be written to user://logs/log.txt
, which can be found in the "user data" directory.
Thanks @Calinou, I did that, but that's does not provide me enough information as it usually does.
That's why I'm thinking the only way is debugging godot in VS.
Anyhow, I wish I can post to the right issue (I'm sure it exists already somewhere), the problem here is that me, and apparently many others, can't debug because of the behavior described by many.
I red @Zireael07 's thread on websocket (that I've lost, but will reference later, eventually), maybe one of the issues related to that one is the cause of the winsock disconnection thingy.
Thanks also to @akien-mga. As you all, we're just trying to make Godot better.
To debug a Godot project on Windows, you need to:
target=release_debug
or target=release
. You can also build and debug an export teplate by passing tools=no
..exe
and .pdb
files at the root of the project directory. When you start the executable, the project will start directly, which prevents any issues that may arise when debugging due to child processes being created.If you'd like, I can provide a MSVC-compiled binary with a PDB file for the 3.1
or master
branch. This will allow you to skip the first step if you're having trouble doing it. Just tell me which branch you need :slightly_smiling_face:
@akien-mga
@Ratinod I played the match3 game for a few minutes on Godot 3.2 alpha 1 and did not get any issue. Can you still reproduce the crash?
Yes. I can reproduce the crash (Godot 3.2 alpha 1).
After exporting the project, after an error occurs in the log file, this text appears:
Godot Engine v3.2.alpha1.official - https://godotengine.org
OpenGL ES 3.0 Renderer: GeForce GTX 770/PCIe/SSE2
**ERROR**: Condition ' _first != __null ' is true.
At: ./core/self_list.h:111:~List() - Condition ' _first != __null ' is true.
**ERROR**: Condition ' _first != __null ' is true.
At: ./core/self_list.h:111:~List() - Condition ' _first != __null ' is true.
**WARNING**: ObjectDB Instances still exist!
At: core/object.cpp:2069:cleanup() - ObjectDB Instances still exist!
**ERROR**: Resources Still in use at Exit!
At: core/resource.cpp:443:clear() - Resources Still in use at Exit!
Attached a project on which I received an error.
candyCrush_tutorial.zip
Same arror, in my project
Yes. I can reproduce the crash (Godot 3.2 alpha 1).
After exporting the project, after an error occurs in the log file, this text appears:Godot Engine v3.2.alpha1.official - https://godotengine.org OpenGL ES 3.0 Renderer: GeForce GTX 770/PCIe/SSE2 **ERROR**: Condition ' _first != __null ' is true. At: ./core/self_list.h:111:~List() - Condition ' _first != __null ' is true. **ERROR**: Condition ' _first != __null ' is true. At: ./core/self_list.h:111:~List() - Condition ' _first != __null ' is true. **WARNING**: ObjectDB Instances still exist! At: core/object.cpp:2069:cleanup() - ObjectDB Instances still exist! **ERROR**: Resources Still in use at Exit! At: core/resource.cpp:443:clear() - Resources Still in use at Exit!
This errors are shown when project leaks some data.
In this example, this doesn't seems to be Godot but this project leak problem(look at the Orpan Nodes when if is greater than 0, then probably project have memory leaks)
@qarmin
After your assumption above, I decided to look in more detail about "Orpan Nodes". To my surprise and regret, I did not find anything on docs.godotengine.org by entering "Orpan" in the search. Yeah...
So I鈥檒l ask here.
Should "Orpan Nodes" Never Be Greater Than 0?
Maybe "Orphan Nodes" should not be greater than 0 exactly when the program starts, and then they can increase?
I had these questions because I tested a couple of other projects. (In one (very primitive) "Orpan Nodes" is always 0, and in the other "Orpan Nodes" will increase by 1 strictly after certain actions (both have "Orpan Nodes" 0 at startup)
Maybe there are tutorials to avoid problems with memory leaks and learn how to fix them if they already exist in Godot Project?
If you'd like, I can provide a MSVC-compiled binary with a PDB file for the 3.1 or master branch. This will allow you to skip the first step if you're having trouble doing it. Just tell me which branch you need
Thanks @Calinou for your offer, in the end I solved it, it was because I was using unsafe code in the thread (I was adding nodes to the treee without using call_deferred). So this time I won't need it.
Orphan nodes should be ALWAYS equal zero.
If number is greater, you have probably(99,9%) memory leak caused by bug in your code
I have created issue in godot docs about it https://github.com/godotengine/godot-docs/issues/2854
Memory leak happens when you don't add a node to scene tree and lost its reference
extends Node2D
func _process(delta) -> void:
var node : Node = Node.new()
Code above will leak 1 node per frame(which will be visible in Orphan Nodes monitor)
Code below won't leak because Node is added to Scene Tree
extends Node2D
func _process(delta) -> void:
var node : Node = Node.new()
add_child(node)
@qarmin
Hmm... But what if I need to remove child node?
extends Node2D
func _process(delta) -> void:
var node : Node = Node.new()
add_child(node)
remove_child(node)
The code above increases the "Orphan Nodes".
So how then to do it right?
@Ratinod I think you have to free the node, ideally with queue_free
, instead of remove_child
.
@Toshiwoz
Yes, you are completely right. This change completely removes the appearance of "Orphan Nodes" in another project.
@qarmin
Can I get more specific things from Godot at the moment (besides the "Orphan Nodes" counter)?
What exactly is this "Orphan Node"?
Maybe what (or where) was it before?
Anything to help me find the problem area of the code.
OK. I fixed the problem with "Orphan Node" ("# fix orphan nodes" in grid.gd).
But this unfortunately did not fix the game crash problem.
Now log files are almost empty:
Godot Engine v3.2.alpha1.official - https://godotengine.org
OpenGL ES 3.0 Renderer: GeForce GTX 770/PCIe/SSE2
After testing, I don't see any Godot issue(but maybe this works good only on my Linux machine).
Game crashes after playing 3~5 min, but it happens because there is stack overflow because function match_all_in_column
execute function find_adjacent_pieces
which execute match_all_in_column
etc.
@qarmin
Yes. Finally, the problem was found and now everything works as it should.
bug fix for "find_adjacent_pieces":
...
if all_pieces[column + i][row + j] != null and !is_piece_sinker(column + i, row + j):
if !all_pieces[i][j].matched: # bug fix
all_pieces[i][j].matched = true # bug fix
if all_pieces[column + i][row + j].is_row_bomb:
...
bug fixes for "match_all_in_column" and "match_all_in_row" are similar.
To all others coming here: As @akien-mga has pointed out, this is not an error. It means Godot Crashed Abruptly, there are numerous causes for this. The best way I have found to figure out what is going wrong is to step by step debug your game using a breakpoint via the "F9" key, it is painful but in the end you will find the source of the problem.
I did encounter this issue when trying to use a EXR file as background
Most helpful comment
After testing, I don't see any Godot issue(but maybe this works good only on my Linux machine).
Game crashes after playing 3~5 min, but it happens because there is stack overflow because function
match_all_in_column
execute functionfind_adjacent_pieces
which executematch_all_in_column
etc.