Skip to content

Fix FrameSort frame ordering instability in Solo Shuffle#73

Merged
DanderBot merged 1 commit into
DanderBot:mainfrom
Krathe82:fix/framesort-solo-shuffle-ordering
May 11, 2026
Merged

Fix FrameSort frame ordering instability in Solo Shuffle#73
DanderBot merged 1 commit into
DanderBot:mainfrom
Krathe82:fix/framesort-solo-shuffle-ordering

Conversation

@Krathe82

@Krathe82 Krathe82 commented May 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix table.concat Lua crash in FrameSort's sort callback caused by Midnight 12.0 secret values passing the type() == "string" guard — replaced with issecretvalue() check
  • Fix race condition in ApplyArenaHeaderSorting: removed synchronous RequestSort() call that fired with stale unit data before WoW finished reassigning raid slots after a Solo Shuffle round transition; FrameSort's Blizzard provider already schedules a correct sort on the next frame
  • Fix race condition in PLAYER_REGEN_ENABLED: added IsFrameSortActive() guard around ProcessRosterUpdate() so DF no longer clobbers FrameSort's combat-end sort when the integration is active (event handler order between DF and FrameSort is non-deterministic)

Test plan

  • Enable FrameSort integration in DF settings
  • Play several Solo Shuffle rounds — frame ordering should match FrameSort's configured sort (e.g. Player: Middle) consistently across all rounds, with no oscillation between rounds
  • Confirm no Lua errors appear in FrameSort's log during round transitions
  • Confirm behaviour is unchanged when FrameSort integration is disabled

Three issues caused incorrect or oscillating frame ordering when the
FrameSort integration was enabled in arena / Solo Shuffle:

1. UnitsToNameList used type() == "string" to guard unit names, which
   lets through Midnight 12.0 secret values — opaque strings that pass
   the type check but crash table.concat. Added issecretvalue() guard.

2. ApplyArenaHeaderSorting called RequestSort() synchronously inside
   GROUP_ROSTER_UPDATE, before WoW had finished reassigning raid slots
   after a round transition. This passed stale unit data to FrameSort,
   producing the wrong nameList, which then persisted for the entire
   next round once combat locked it in. The call is removed; FrameSort's
   Blizzard provider already schedules a sort on the next frame.

3. The PLAYER_REGEN_ENABLED handler called ProcessRosterUpdate() when
   pendingSortingUpdate was set, which ran ApplyArenaHeaderSorting and
   reset nameList to INDEX — undoing FrameSort's own combat-end sort.
   Because WoW event handler order is non-deterministic, this caused
   intermittent wrong ordering between Solo Shuffle rounds. Added an
   IsFrameSortActive() guard so DF yields the sort to FrameSort entirely.
@DanderBot DanderBot merged commit 57084d2 into DanderBot:main May 11, 2026
@DanderBot

Copy link
Copy Markdown
Owner

Thanks for the PR! Merged into main and will ship in the next alpha build.

DanderBot added a commit that referenced this pull request May 11, 2026
@Krathe82 Krathe82 deleted the fix/framesort-solo-shuffle-ordering branch June 4, 2026 12:42
Krathe82 pushed a commit to Krathe82/DandersFrames that referenced this pull request Jun 6, 2026
…fle-ordering

Fix FrameSort frame ordering instability in Solo Shuffle
Krathe82 pushed a commit to Krathe82/DandersFrames that referenced this pull request Jun 6, 2026
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