Skip to content

Conversation

@wjt
Copy link
Member

@wjt wjt commented Jan 16, 2026

The pause overlay is an autoload so it is initialised early in the
project setup.

Previously pause_overlay.gd referenced the title screen as a
PackedScene. The title screen transitively refers to credits lists
imported from CSV with the threadbare_credits plugin. This means that
before all scripts can be parsed and the class database initialised, the
import plugin must be able to import the CSV. However the import plugin
previously referred to the CreditsTeam and CreditsTeamRoster resource
subclasses by name, which requires the class database to be initialised:
a circular dependency. This is apparently broken by Godot failing to
load the import plugin, which causes the CSV files to instead be
imported as translation files using the built in CSV translation
importer, breaking the project.

The problem goes away once the project has been imported once because
.godot/global_script_class_cache.cfg has been initialised, so the
resource types can be found by name. This is why I didn't hit it when
writing the plugin.

Refer to the title screen as a string path, not PackedScene. Move these
definitions to the scene file so that the real path can be seen in the
editor.

I debugged this with Claude (but wrote this fix myself). What's annoying
is that I have previously debugged and fixed an equivalent bug by hand:
this is the same change as made in commit
8d10acd to the title and splash
screens, for the same reason, just a different import plugin.

Claude initially fixed the bug by changing
threadbare_credit/import_plugin.gd to refer to CreditsTeam and
CreditsTeamRoster via preload(), but making that change - with or
without this one - sometimes causes Godot to segfault during first
import; sometimes does not fix the problem; and sometimes works. I
cannot understand why and now need to move on.

Resolves #1832

The pause overlay is an autoload so it is initialised early in the
project setup.

Previously pause_overlay.gd referenced the title screen as a
PackedScene. The title screen transitively refers to credits lists
imported from CSV with the threadbare_credits plugin. This means that
before all scripts can be parsed and the class database initialised, the
import plugin must be able to import the CSV. However the import plugin
previously referred to the CreditsTeam and CreditsTeamRoster resource
subclasses by name, which requires the class database to be initialised:
a circular dependency. This is apparently broken by Godot failing to
load the import plugin, which causes the CSV files to instead be
imported as translation files using the built in CSV translation
importer, breaking the project.

The problem goes away once the project has been imported once because
.godot/global_script_class_cache.cfg has been initialised, so the
resource types can be found by name. This is why I didn't hit it when
writing the plugin.

Refer to the title screen as a string path, not PackedScene. Move these
definitions to the scene file so that the real path can be seen in the
editor.

I debugged this with Claude (but wrote this fix myself). What's annoying
is that I have previously debugged and fixed an equivalent bug by hand:
this is the same change as made in commit
8d10acd to the title and splash
screens, for the same reason, just a different import plugin.

Claude initially fixed the bug by changing
threadbare_credit/import_plugin.gd to refer to CreditsTeam and
CreditsTeamRoster via `preload()`, but making that change - with or
without this one - sometimes causes Godot to segfault during first
import; sometimes does not fix the problem; and sometimes works. I
cannot understand why and now need to move on.

Resolves #1832
@wjt wjt requested a review from a team as a code owner January 16, 2026 11:55
@github-actions
Copy link

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/pause-refer-to-title-scene-by-path-not-as-a-packedscene.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@wjt wjt merged commit 26f6e5b into main Jan 16, 2026
6 checks passed
@wjt wjt deleted the wjt/pause-refer-to-title-scene-by-path-not-as-a-packedscene branch January 16, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Credits CSV imports get reverted to csv_translation during initial import

2 participants