godotengine / godotengine/godot
"Tool button action "null::null" is an invalid callable" when using @export_tool_button
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in v4.4.dev3.official [f4af8201b], v4.4.dev6.official [1f47e4c4e]. These are the only ones i tested.
### System information
Godot v4.4.dev6 - Windows 10.0.22631 - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 SUPER (NVIDIA; 32.0.15.6590) - Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 threads)
### Issue description
(I would leave a video but github didn't accept it)
I made a `@export_tool_button` in in of my scripts. It worked perfectly fine. Then i made another scene and tried to use it there. Gave me two issues.
Issue one was `The value of property "insertVarHere" is Nil, but Callable was expected.`(#97834), and the issue i am making now which is `Tool button action "null::null" is an invalid callable`.
In the Steps to reproduce section i mention that reloading the project worked, but that only worked in the MRP not in my main project.
### Steps to reproduce
To get the error `Tool button action "null::null" is an invalid callable` you need to comment out the `= funky` and restart the project.
Then uncomment it and press the button.
To fix it reload the project while everything is uncommented.
### Minimal reproduction project (MRP)
[toolbuttonbug.zip](https://github.com/user-attachments/files/18202509/toolbuttonbug.zip)
Contributor guide
Research direction
Start with the attached toolbuttonbug.zip minimal reproduction and reproduce the sequence around @export_tool_button: comment out = funky, restart, uncomment it, and press the button. Compare this with reloading the project while uncommented. Done means the button no longer reports "null::null" as an invalid callable in the reproduced sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100