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

No tilemap can be created in multiple threads #90890

Closed
VIRTUALXN opened this issue Apr 19, 2024 · 6 comments
Closed

No tilemap can be created in multiple threads #90890

VIRTUALXN opened this issue Apr 19, 2024 · 6 comments

Comments

@VIRTUALXN
Copy link

Tested versions

v4.2.1.stable.official [b09f793]

System information

win

Issue description

I created a sub-thread in the main thread, created a scene in the sub-thread, and added a new tilemap by the scene. This is not allowed in godot. Although this will be rendered and loaded in the main scene, the console will Continuously reporting errors.
我在主线程创建了一个子线程,在子线程中创建了一个场景,由场景添加 新的tilemap ,这在godot中不被允许,虽然这在主场景中会被渲染和加载,但是控制台会不断报错。

Steps to reproduce

CRI6@YGJNK01ZS4MD(JCT
MGF538 X$BDWPD2IPJ@IXG5

Minimal reproduction project (MRP)

tilemap_test.zip

@AThousandShips
Copy link
Member

Please try 4.2.2, this bug should be fixed there

@VIRTUALXN
Copy link
Author

I have tried using the latest version of godot, and it has no effect. This is the latest error picture.我已经尝试了使用最新版本的godot ,并且没有效果,这是目前最新的报错图

@VIRTUALXN
Copy link
Author

我尝试使用最新版本的 godot,但没有效果。This is the latest error picture.我已经尝试了使用最新版本的godot ,并且没有效果,这是目前最新的报错图

%9{P W69E@GSYPMY3%P7X B

@AThousandShips
Copy link
Member

Oh my bad I couldn't read the error message since it wasn't English, that's something to handle yes, unsure how it should be handled

@KoBeWi
Copy link
Member

KoBeWi commented Apr 19, 2024

You can use Thread.set_thread_safety_checks_enabled(false) (it's unsafe though, so only use it when you know what you are doing).

@VIRTUALXN
Copy link
Author

You can use Thread.set_thread_safety_checks_enabled(false) (it's unsafe though, so only use it when you know what you are doing).
也就是说,这只是一个警告,并不是报错,我可以正常的使用他,那么我希望这个提示能够修改为警告,而不一个错误等级。
That is to say, this is just a warning, not an error. I can use it normally, so I hope this prompt can be changed to a warning instead of an error level.

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

4 participants