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

Issues on exported build ☹️ #329

Closed
Phazorknight opened this issue Nov 19, 2024 · 6 comments
Closed

Issues on exported build ☹️ #329

Phazorknight opened this issue Nov 19, 2024 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Phazorknight
Copy link
Owner

Cogito and Godot Engine Version:
Cogito latest / Godot 4.3

Description:
Unfortunately, I've discovered that on export, a lot of things currently don't work as expected.
I'm not able to get the Laboratory Demo scene loaded (pressing the NEW GAME button doesn't do anything)

I'm able to load the Legacy Demo scene but the player initialization seems to be quite broken as well.

I'm not sure how to troubleshoot this as I don't get any errors when I export this. I suspect it's some more hidden/broken reference paths (still pointing to the old res://COGITO/ instead of res://addons/cogito/ when exporting ), but I'm not sure where to look to fix this.

Reproduction steps:

  1. Export project (Windows) as is.
  2. Run the exported executable ( COGITO.exe )
  3. Try to start a new game (doesn't work)
  4. Start Legacy Demo scene (seems very bugged, pause menu is open, inventory doesn't load properly, controls aren't working properly)
@Phazorknight Phazorknight added bug Something isn't working help wanted Extra attention is needed labels Nov 19, 2024
@frendship-loost
Copy link

frendship-loost commented Nov 19, 2024

Downloaded the latest zip of COGITO from github, cleared out my previous addon folders, and incorporated into my project. Here are the script errors I get on building for export, these do not occur for me when running straight out of the editor.

SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
ERROR: Failed to load script "res://addons/cogito/cogito_main.gd" with error "Parse error".
at: load (modules/gdscript/gdscript.cpp:2936)
ERROR: Failed to instantiate an autoload, script 'res://addons/cogito/cogito_main.gd' does not inherit from 'Node'.
at: (main/main.cpp:3678)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/SceneManagement/cogito_scene_manager.gd:-1)
ERROR: Failed to load script "res://addons/cogito/SceneManagement/cogito_scene_manager.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Invalid access to property or key 'scene_state_prefix' on a base object of type 'Nil'.
at: @implicit_new (res://addons/cogito/SceneManagement/cogito_scene_manager.gd:35)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/EasyMenus/Scripts/OptionsTabMenu.gd:-1)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/EasyMenus/Scripts/main_menu_controller.gd:-1)
ERROR: Failed to load script "res://addons/cogito/EasyMenus/Scripts/main_menu_controller.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/EasyMenus/Components/SaveSlotButton.gd:-1)
ERROR: Failed to load script "res://addons/cogito/EasyMenus/Components/SaveSlotButton.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/InventoryPD/CustomResources/WieldableItemPD.gd:-1)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/Components/PlayerInteractionComponent.gd:-1)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/CogitoObjects/cogito_player.gd:-1)
ERROR: Failed to load script "res://addons/cogito/CogitoObjects/cogito_player.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/Scripts/player_hud_manager.gd:-1)
ERROR: Failed to load script "res://addons/cogito/Scripts/player_hud_manager.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/InventoryPD/UiScenes/InventoryUI.gd:-1)
ERROR: Failed to load script "res://addons/cogito/InventoryPD/UiScenes/InventoryUI.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/EasyMenus/Scripts/pause_menu_controller.gd:-1)
ERROR: Failed to load script "res://addons/cogito/EasyMenus/Scripts/pause_menu_controller.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Parse Error: Identifier "EditorInterface" not declared in the current scope.
at: GDScript::reload (res://addons/cogito/cogito_main.gd:225)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://addons/cogito/CogitoObjects/cogito_switch.gd:-1)
ERROR: Failed to load script "res://addons/cogito/CogitoObjects/cogito_switch.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2936)
SCRIPT ERROR: Invalid call. Nonexistent function 'debug_log' in base 'Nil'.
at: get_existing_player_state (res://addons/cogito/SceneManagement/cogito_scene_manager.gd:61)
SCRIPT ERROR: Invalid access to property or key 'scene_state_prefix' on a base object of type 'Nil'.
at: get_existing_scene_state (res://addons/cogito/SceneManagement/cogito_scene_manager.gd:74)
SCRIPT ERROR: Invalid call. Nonexistent function 'debug_log' in base 'Nil'.
at: reset_scene_states (res://addons/cogito/SceneManagement/cogito_scene_manager.gd:511)

I can confirm that an exported build using COGITO from ~1 month ago seemed to work OK for my project, at least in terms of the main menu.

EDIT: Should mention I have been on Godot 4.3 stable for all the time I am speaking of.

@Phazorknight
Copy link
Owner Author

Hey, thanks for this.
A lot of these are related to the plug-in code of Cogito.
I haven't been able to progress much on that side of the addon, so if it causes these issues, I might reconsider removing the main editor tab of this, and turning the Cogito settings into a resource instead, which should make things easier code-wise.

Will look into it but might take me a few days.

@Phazorknight
Copy link
Owner Author

So I've made a new branch where I removed the whole plugin-editor tab. Instead, turned it into an autoload/global and made a custom resource. Seems to work in the editor.

Unfortunately, it seems like these issues were unrealated to the build issues. Found a few stray outdated path references and fixed those, but still no improvement. 😒

@Phazorknight
Copy link
Owner Author

Good news, I'm pretty sure I found the issue thats causing this. Hoping to be able to resolve this today or tomorrow.

@Phazorknight
Copy link
Owner Author

I've put in a PR for a fix for this issue in #332

@Phazorknight
Copy link
Owner Author

Latest merge into main should fix this issue, so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants