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

Accessing a nonexistent variable in a separate thread does not throw an error #51936

Open
Miziziziz opened this issue Aug 21, 2021 · 3 comments

Comments

@Miziziziz
Copy link

Godot version

v3.3.3.stable.mono.official [b973f99]

System information

Windows 10

Issue description

if you have a separate thread running and try to access a variable that does not exist, it will not throw an error or anything, the thread simply stops working without any indication of how or why.

Steps to reproduce

run a script with this code:

extends Node

var thread = Thread.new()

func _ready():
	thread.start(self, "calc", self)

func calc(data):
	print('here')
	var l = data.position
	print('now here')

the output console will only say 'here', there will be no errors thrown in debugger

Minimal reproduction project

MultiThreadError.zip

@Rubonnek
Copy link
Member

Rubonnek commented Aug 21, 2021

I think you meant the Output tab in the Editor's bottom panel, not the console output. Is that right?

I'm able to see the following message in the console/terminal in both Linux and Windows:

Godot Engine v3.4.beta.custom_build.16642e283 - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 6900 XT (SIENNA_CICHLID, DRM 3.41.0, 5.13.12-arch1-1, LLVM 12.0.1)
OpenGL ES Batching: ON
 
Running: /opt/godot/bin/godot.x11.opt.tools.64 --path /home/wilson/Downloads/huehuehue/MultiThreadError --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 1661 --position 448,240
Godot Engine v3.4.beta.custom_build.16642e283 - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 6900 XT (SIENNA_CICHLID, DRM 3.41.0, 5.13.12-arch1-1, LLVM 12.0.1)
OpenGL ES Batching: ON
 
here
SCRIPT ERROR: Invalid get index 'position' (on base: 'Spatial (Node.gd)').
          at: calc (res://Node.gd:11)

@Zylann
Copy link
Contributor

Zylann commented Aug 21, 2021

Related: #18330

@Miziziziz
Copy link
Author

Woops yeah I meant output tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants