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

GDScript Compiler: Crash when using GDScript as type #68716

Closed
rune-scape opened this issue Nov 16, 2022 · 4 comments · Fixed by #68717
Closed

GDScript Compiler: Crash when using GDScript as type #68716

rune-scape opened this issue Nov 16, 2022 · 4 comments · Fixed by #68717

Comments

@rune-scape
Copy link
Contributor

Godot version

963ffd8

System information

Windows 10 x64

Issue description

i think #68374 revealed a regression, i was testing another issue, and the attached project crashes on startup:

================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.0.beta.custom_build (963ffd8b944db768a9b7d09eeec025907f50843c)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] GDScriptDataType::operator PropertyInfo (C:\git\godot_bugfixes\modules\gdscript\gdscript_function.h:163)
[1] GDScriptCompiler::_populate_class_members (C:\git\godot_bugfixes\modules\gdscript\gdscript_compiler.cpp:2302)
[2] GDScriptCompiler::compile (C:\git\godot_bugfixes\modules\gdscript\gdscript_compiler.cpp:2640)
[3] GDScript::reload (C:\git\godot_bugfixes\modules\gdscript\gdscript.cpp:881)
[4] GDScript::_set (C:\git\godot_bugfixes\modules\gdscript\gdscript.cpp:982)
[5] GDScript::_setv (C:\git\godot_bugfixes\modules\gdscript\gdscript.h:61)
[6] Object::set (C:\git\godot_bugfixes\core\object\object.cpp:293)
[7] ResourceLoaderText::load (C:\git\godot_bugfixes\scene\resources\resource_format_text.cpp:638)
[8] ResourceFormatLoaderText::load (C:\git\godot_bugfixes\scene\resources\resource_format_text.cpp:1575)
[9] ResourceLoader::_load (C:\git\godot_bugfixes\core\io\resource_loader.cpp:206)
[10] ResourceLoader::_thread_load_function (C:\git\godot_bugfixes\core\io\resource_loader.cpp:233)
[11] ResourceLoader::load (C:\git\godot_bugfixes\core\io\resource_loader.cpp:563)
[12] EditorNode::load_scene (C:\git\godot_bugfixes\editor\editor_node.cpp:3843)
[13] EditorNode::_load_open_scenes_from_config (C:\git\godot_bugfixes\editor\editor_node.cpp:5113)
[14] EditorNode::_load_docks (C:\git\godot_bugfixes\editor\editor_node.cpp:4901)
[15] EditorNode::_sources_changed (C:\git\godot_bugfixes\editor\editor_node.cpp:1083)
[16] call_with_variant_args_helper<EditorNode,bool,0> (C:\git\godot_bugfixes\core\variant\binder_common.h:267)
[17] call_with_variant_args<EditorNode,bool> (C:\git\godot_bugfixes\core\variant\binder_common.h:377)
[18] CallableCustomMethodPointer<EditorNode,bool>::call (C:\git\godot_bugfixes\core\object\callable_method_pointer.h:105)
[19] Callable::callp (C:\git\godot_bugfixes\core\variant\callable.cpp:51)
[20] Object::emit_signalp (C:\git\godot_bugfixes\core\object\object.cpp:1047)
[21] Object::emit_signal<bool> (C:\git\godot_bugfixes\core\object\object.h:867)
[22] EditorFileSystem::_notification (C:\git\godot_bugfixes\editor\editor_file_system.cpp:1241)
[23] EditorFileSystem::_notificationv (C:\git\godot_bugfixes\editor\editor_file_system.h:143)
[24] Object::notification (C:\git\godot_bugfixes\core\object\object.cpp:792)
[25] SceneTree::_notify_group_pause (C:\git\godot_bugfixes\scene\main\scene_tree.cpp:870)
[26] SceneTree::process (C:\git\godot_bugfixes\scene\main\scene_tree.cpp:468)
[27] Main::iteration (C:\git\godot_bugfixes\main\main.cpp:3164)
[28] OS_Windows::run (C:\git\godot_bugfixes\platform\windows\os_windows.cpp:999)
[29] widechar_main (C:\git\godot_bugfixes\platform\windows\godot_windows.cpp:181)
[30] _main (C:\git\godot_bugfixes\platform\windows\godot_windows.cpp:203)
[31] main (C:\git\godot_bugfixes\platform\windows\godot_windows.cpp:217)
[32] WinMain (C:\git\godot_bugfixes\platform\windows\godot_windows.cpp:231)
[33] __scrt_common_main_seh (d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[34] BaseThreadInitThunk
-- END OF BACKTRACE --
================================================================


### Steps to reproduce

just opening the project crashes

### Minimal reproduction project

[issue-67163.zip](https://github.com/godotengine/godot/files/10018031/issue-67163.zip)
@Chaosus
Copy link
Member

Chaosus commented Nov 16, 2022

Interesting that for me, the project you provided doesn't lead to a crash (at the 5993209 commit), maybe I was too hasty for merging it...

@rune-scape
Copy link
Contributor Author

maybe i didnt list the right commit...
the fix should still be there, when i made the original pr, i didnt know there was code that assumed script_type would be valid, and it didnt seem like the current code ensured that

@rune-scape
Copy link
Contributor Author

its a crash waiting to happen if nothing else

@rune-scape
Copy link
Contributor Author

rune-scape commented Nov 16, 2022

crashes on my machine at 5993209
the commit right before #68717 was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants