You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Game crashes when below gdscript is compiled in release mode (in debug mode it can run normally)
extends Node
const MIN_TIME = 800
var start_time: int
func _ready():
start_time = OS.get_ticks_msec()
func _process(_delta):
var spent_time := OS.get_ticks_msec() - start_time
var sleep_time = (MIN_TIME - spent_time) as float / 1000.0
with error message:
SCRIPT ERROR: Parse Error: The assigned value doesn't have a set type; the variable type can't be inferred.
at: GDScript::load_byte_code (res://Main/test.gdc:11)
ERROR: Method failed. Returning: ERR_PARSE_ERROR
at: load_byte_code (modules/gdscript/gdscript.cpp:782)
ERROR: Cannot load byte code from file 'res://Main/test.gdc'.
at: load (modules/gdscript/gdscript.cpp:2205)
ERROR: Failed loading resource: res://Main/test.gdc. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:270)
ERROR: res://Main/Main.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Main/test.gd
at: poll (scene/resources/resource_format_text.cpp:412)
ERROR: Failed to load resource 'res://Main/Main.tscn'.
at: load (core/io/resource_loader.cpp:206)
ERROR: Failed loading resource: res://Main/Main.tscn. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:270)
ERROR: Failed loading scene: res://Main/Main.tscn
at: start (main/main.cpp:2083)
WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
at: cleanup (core/object.cpp:2064)
Steps to reproduce
download the Minimal reproduction project, export game in release mode and run the game
Godot 3.5 beta3, the same issue reproducible with different MRP.
Release build has problem with type inference in line var err := file.open("user://save_game.dat", File.READ)
I noticed it with different method calls too. Like trying to infer the Array type returned from intersect_point.
I assume this might also be reproducible in 3.5 beta 2, but not in beta 1?
This is likely a regression from #57851.
akien-mga
changed the title
[3.5 beta3] Game crashes in release mode with specific GDScript
[3.5 beta3] GDScript release builds can't infer type of builtin function return values
Mar 31, 2022
Godot version
3.5 beta3
System information
Linux, GLES 3, Intel Graphic UHD 630
Issue description
Game crashes when below gdscript is compiled in release mode (in debug mode it can run normally)
with error message:
Steps to reproduce
download the Minimal reproduction project, export game in release mode and run the game
Minimal reproduction project
test.zip
The text was updated successfully, but these errors were encountered: