godot icon indicating copy to clipboard operation
godot copied to clipboard

Condition "!success" is true. and Parameter "_fp" is null.

Open Kevengg opened this issue 2 weeks ago • 1 comments

Tested versions

-Reproducible: v4.5.stable, v4.5.1.stable, v4.6.dev6

System information

Godot v4.5.1.stable - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (NVIDIA; 32.0.15.8180) - AMD Ryzen 9 9900X 12-Core Processor (24 threads) - 31.11 GiB memory

Issue description

i just run the scene im working on, it loads for a while(like expected), it then starts spawning the sub elements, the player then crashes and spams the Debugger with:

world.gd:199 @ gen_chunk(): Condition "!success" is true.
  <C++ Source>  core/variant/array.cpp:63 @ _ref()
  <Stack Trace> world.gd:199 @ gen_chunk()

and

world.gd:199 @ gen_chunk(): Parameter "_fp" is null.
  <C++ Source>  core/variant/array.cpp:55 @ _ref()
  <Stack Trace> world.gd:199 @ gen_chunk()

Steps to reproduce

i have no idea what is causing it, or how to reproduce it. it is possible that im abusing something, causing it to crash. But ether way at least getting those errors are really unhelpful

Minimal reproduction project (MRP)

run Main.tscn https://github.com/user-attachments/files/24019606/mrp.zip

Kevengg avatar Dec 07 '25 21:12 Kevengg

I couldn't reproduce this on master, although I did get errors relating to the icon being set to res://icon.svg but the file not existing

sockeye-d avatar Dec 08 '25 11:12 sockeye-d

possible that is't my hardware then?

Kevengg avatar Dec 08 '25 17:12 Kevengg

I get these errors, but not the ones you described.

Image

JekSun97 avatar Dec 08 '25 18:12 JekSun97

here is the errors i get

Image

try to add the icon back, maybe that changes it?

Kevengg avatar Dec 08 '25 18:12 Kevengg

try to add the icon back, maybe that changes it?

I just removed the icon.svg reference from the project settings and running it resulted in no errors. Are those errors from the MRP?

sockeye-d avatar Dec 08 '25 20:12 sockeye-d

Yeah

Kevengg avatar Dec 08 '25 21:12 Kevengg

Actually, I think this may be a race condition created by your use of WorkerThreadPool, and so it's not really a Godot issue.

The memory also just seems to grow unbounded until it reaches 5 GiB:

Image

at which point I see these errors:

Image

You'll need to stop modifying chunkLibList in your worker thread and in your main thread simultaneously without thread synchronization primitives like a Mutex. See Thread-safe APIs for more info, and especially this part:

GDScript arrays, dictionaries

In GDScript, reading and writing elements from multiple threads is OK, but anything that changes the container size (resizing, adding or removing elements) requires locking a mutex.

sockeye-d avatar Dec 08 '25 21:12 sockeye-d

Alright, I'll take a look

Kevengg avatar Dec 08 '25 21:12 Kevengg