godot icon indicating copy to clipboard operation
godot copied to clipboard

Random and varying GDScript VM errors

Open kermeow opened this issue 11 months ago • 5 comments

Godot version

v4.1.1.stable.official [bd6af8e0e]

System information

Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 () - Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz (4 Threads)

Issue description

Whenever I try to run my project, it will produce a seemingly random script-related error. On rare occasion, the game will run for 30 seconds before closing. The most common error I receive is this: Invalid get index '' (on base: 'Node (Rhythia.gd)'). image The problem here is that there is no code on that line of Rhythia.gd as the entire line is commented. No error message is output in this case. Opcode errors I receive include: Internal script error! Opcode: 110 (please report). image Internal script error! Opcode: 114 (please report). image Internal script error! Opcode: 0 (please report). image All the scripts and lines it gives me seem completely random. The only pattern between these is that the opcode seems to be correct for the corresponding line. I have received other similar opcode errors with different numbers and different scripts. When I get opcode errors, looking into the Errors tab gives me this:

EnergyHUD.gd:11 @ @implicit_new(): Condition ' (ip + 8) > _code_size ' is true. Breaking..:
<C++ Source> modules/gdscript/gdscript_vm.cpp:3039 @ call()
<Stack Trace> EnergyHUD.gd:11 @ @implicit_new()

image Yesterday, I also received this but have been unable to get it again: Stack Underflow (Engine Bug) image

Steps to reproduce

I have no idea. This just randomly started happening when I opened Godot yesterday.

  1. Open Godot
  2. Open a project
  3. Try to run it

Minimal reproduction project

I don't think I can make this minimal. The closest thing here would be the entire project itself. https://github.com/Rhythia/Rhythia/archive/2e8d3d45a6aff57f245724da6e3691f9c2fcf080.zip

kermeow avatar Sep 17 '23 14:09 kermeow

Without a project there is nothing the team can do.

Does Rhythia.gd inherit from some other class? (Often the error messages will get confused with inheritance, check the same line in the inherited from class if true)

Zireael07 avatar Sep 17 '23 14:09 Zireael07

There's not enough specific information here, the steps to reproduce this are not indicating how to actually replicate this

Please provide an MRP, or some specific details, or this can't be investigated

Also please provide the actual text of your error messages, screenshots of errors are not enough, they don't work on screen-readers, and can't be copied etc.

AThousandShips avatar Sep 17 '23 14:09 AThousandShips

Seems possibly related to:

  • https://github.com/godotengine/godot/issues/42379
  • https://github.com/godotengine/godot/issues/71879

But impossible to tell without more details about what your code actually is

AThousandShips avatar Sep 17 '23 15:09 AThousandShips

Also please provide the actual text of your error messages, screenshots of errors are not enough, they don't work on screen-readers, and can't be copied etc.

I will edit the original issue to account for this, thanks.

Does Rhythia.gd inherit from some other class? (Often the error messages will get confused with inheritance, check the same line in the inherited from class if true)

Rhythia.gd inherits "Node"

There's not enough specific information here, the steps to reproduce this are not indicating how to actually replicate this

As I said, I don't know how to replicate this as it randomly happens for seemingly no reason. Nothing changed in my project for this to happen.

Please provide an MRP, or some specific details, or this can't be investigated

The closest thing to an MRP would be the actual project.

But impossible to tell without more details about what your code actually is

As I said, the problem here is that the errors don't point to any code. I don't know what code I'm supposed to give when the problem is more than likely unrelated to any.

I would agree that it may be related to the other issues if the opcode errors were the only ones. However, I also get an assortment of other completely different errors.

kermeow avatar Sep 17 '23 15:09 kermeow

This happens pretty regularly to me if I save a running script that contains awaits. Seems the code getting shifted around messes up the pointers, and things break with the awaits.

jitspoe avatar Apr 28 '24 05:04 jitspoe