Skip to content

v1+v3: don't die on missing last.json#181

Merged
rreichenbach merged 3 commits into
TreeFallSound:pistomp-v3from
sastraxi:fix/dont-die-last-json
Jun 20, 2026
Merged

v1+v3: don't die on missing last.json#181
rreichenbach merged 3 commits into
TreeFallSound:pistomp-v3from
sastraxi:fix/dont-die-last-json

Conversation

@sastraxi

Copy link
Copy Markdown
Collaborator

Some things in the handlers now assume self.current is not None. When last.json is unavailable (malformed or missing), modalapistomp now:

  1. Writes last.json with pedalboard_list[0].bundle (so future restarts don't repeat this)
  2. Calls handler.pedalboard_change(pb) — this is the POST to mod-ui's pedalboard/load_bundle/ endpoint that makes it reload
  3. Calls handler.set_current_pedalboard(pb) immediately — this is the critical fix; previously self.current stayed None until the file-watch fired 100 ticks later, causing crashes in poll_ws_messages when snapshot WS messages arrived

@sastraxi sastraxi requested a review from rreichenbach June 20, 2026 05:21

@rreichenbach rreichenbach left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks.

@rreichenbach rreichenbach merged commit 5fd003e into TreeFallSound:pistomp-v3 Jun 20, 2026
1 check passed
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.

2 participants