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

Internal script error! Opcode: 0 #75550

Closed
bindglam opened this issue Apr 1, 2023 · 5 comments
Closed

Internal script error! Opcode: 0 #75550

bindglam opened this issue Apr 1, 2023 · 5 comments

Comments

@bindglam
Copy link

bindglam commented Apr 1, 2023

Godot version

4.0.1.stable

System information

Windows 11, GLES3, AMD Ryzen 5000 SERIES, AMD Radeon Graphics

Issue description

Creating and testing a Gui project with Godot Engine, suddenly 'Internal script error! Opcode: 0 (please report).' There was an error. I reported it, but I don't know why it happened.

오류

Steps to reproduce

This code is applicable code.

class_name Game
extends Resource

enum GameType {
	RUNNABLE, GAMEBOY
}

@export var game_file: String
@export var game_type: GameType

Minimal reproduction project

N/A

@Chaosus Chaosus added this to the 4.1 milestone Apr 1, 2023
@clemens-tolboom
Copy link

v4.0.3.stable.official [5222a99]

I get the error Internal script error! Opcode: 0 (please report). when running the game then edit the active scene file and save.

GDScript: Reloading all scripts
GDScript: Found: res://src/utils.gd
GDScript: Found: res://colored_cell.gd
GDScript: Found: res://grid.gd                       <== I changed this script and saved it
GDScript: Found: res://autoload/log4gd.gd
GDScript: Reloading: res://src/utils.gd
GDScript: Reloading: res://colored_cell.gd
GDScript: Reloading: res://grid.gd
GDScript: Reloading: res://autoload/log4gd.gd
  editor/debugger/debug_adapter/debug_adapter_types.h:70 - Condition "path.is_empty()" is true.
EditorSettings: Save OK!

My game has a Dictionary with Callables.

var actions:Dictionary  = {
	'reset': func(): reset_cells(),
	'select-player' : func(): select_player(), 
	'mark-player' : func(): mark_player(),
	'mark-targets' : func(): mark_targets(),
	'mark-target' : func(): select_target(),
	'throw-dice': func(): roll_dice()
}

and I changed the func select_player(): code saved it and then activate actions['select-player'].call()by pressing a button.

E 0:00:36:0622   grid.gd:179 @ (): Condition ' (ip + 5) > _code_size ' is true. Breaking..:
  <C++ Source>   modules/gdscript/gdscript_vm.cpp:697 @ call()
  <Stack Trace>  grid.gd:179 @ ()
                 grid.gd:188 @ do_action()
                 grid.gd:206 @ do_player()
                 grid.gd:221 @ _on_player_button_up()

image

@octglam what is your stack trace <C++ Source>?

@florton
Copy link

florton commented Jun 12, 2023

v4.0.3.stable.official [5222a99]

Internal script error! Opcode: 0 (please report)

Also happened when i saved a script, but the error occurred in a different script

E 0:01:36:0838   main.gd:21 @ _process(): Condition ' (ip + 5) > _code_size ' is true. Breaking..:
  <C++ Source>   modules/gdscript/gdscript_vm.cpp:697 @ call()
  <Stack Trace>  main.gd:21 @ _process()

Stack trace source:

CHECK_SPACE(5);

@dalexeev
Copy link
Member

and I changed the func select_player(): code saved it and then activate actions['select-player'].call()by pressing a button.

I understand correctly that you edited the script while the project was running? Or the error occurred without any actions with the code? Hot reload is buggy in 4.0, this is a known issue. See #72825.

@clemens-tolboom
Copy link

It was a hot reload/script edit while running ... I do that a lot but thought my anonymous functions caused it.

Issue #72825 is only mentioning external editor ... this issue seems all to have internal editor.

@dalexeev
Copy link
Member

dalexeev commented Oct 11, 2023

Creating and testing a Gui project with Godot Engine, suddenly 'Internal script error! Opcode: 0 (please report).' There was an error. I reported it, but I don't know why it happened.

Since there is no detailed information, it is impossible to identify the source of the bug. So let's close this in favor of other issues. Please write here or open a new issue if you find additional information. Thanks for the contribution nonetheless!

It was a hot reload/script edit while running ... I do that a lot but thought my anonymous functions caused it.

I'm pretty sure this is a duplicate of the lambda hot reloading bug that has been reported several times. This can cause any effect depending on the offset. Also please check #81628, which should fix the bug.

@dalexeev dalexeev closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@dalexeev dalexeev removed this from the 4.2 milestone Oct 11, 2023
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

6 participants