Skip to content

Bug hunt 24: sixteen fixes from random-file sampling - #14601

Merged
niksedk merged 1 commit into
mainfrom
claude/random-high-confidence-bugs-2f1e7b
Sep 6, 2026
Merged

Bug hunt 24: sixteen fixes from random-file sampling#14601
niksedk merged 1 commit into
mainfrom
claude/random-high-confidence-bugs-2f1e7b

Conversation

@niksedk

@niksedk niksedk commented Sep 6, 2026

Copy link
Copy Markdown
Member

Twenty-fourth bug hunt: seeded random shuffle of all C# sources, five parallel reviewers over 24-file slices, plus a solo fractional-ms / comma-culture round-trip sweep over every text format. Every finding below was confirmed by execution before fixing.

Format writers/readers that could not round-trip their own output

  • FLVCoreCuePoints, HoliStar JSON, JSON Type 5/7/17, OpenDVT wrote milliseconds with the current culture (1500,5 under da-DK etc.); their integer readers dropped the cue or split on the comma. Now write whole ms invariantly.
  • Unknown 2 wrote hundredths where the sample and reader expect ms (1.520 s reloaded as 1.052 s).
  • Unknown 4 read the two-digit fraction as ms (00:00:22.50 → 22.050 s).
  • Unknown 3 wrote frame counts where the sample and reader expect ms (1.520 s reloaded as 0.036 s).
  • Unknown 31 scaled the frames-within-foot field by the frame rate; the reader adds it straight to 16 * footage.
  • Unknown 45 formatted the seconds double with {0:00000}, rounding 1.52 s up to 00002 and then appending the frames of the 520 ms (→ 2.5 s).
  • Unknown 50 read the frames field as ms.
  • Unknown 60 wrote an end-time line that the start-only reader took as the next cue's start, so every cue reloaded at its old end time.
  • Unknown 105 wrote [WAIT] before its text, but the reader pairs text with the following wait, so every cue took the next cue's timing. The writer now also emits the first cue's offset.
  • YouTube transcript one line: 1:01:01 text matched the minutes regex first and loaded as 1:01 with :01 text as the text.

Other

  • ASSA style picker "Usages" column was bound to FontSize; both callers also dropped the count when converting to SsaStyle, so "Take usages from…" showed font sizes.
  • Matroska TextST track → Export built the decoded cues and then threw them away; the helper's own load has no TextST branch and wrote the raw payload as text.
  • AssaDraw DrawShape.ToAssa serialized a mixed line/bezier shape as one b run, turning straight points into bezier control points and shifting every later triplet.
  • HtmlUtil.FixInvalidItalicTags "FALCONE:" branch did Substring(0, -1) for a bare \n on Windows; the sibling branches were already guarded for the same crash.
  • PodcastIndexer read speaker raw although ToText JSON-escapes it (like body).
  • DcPropertiesSmpte read every value raw although Save JSON-escapes them (C:\fonts\a.ttf reloaded doubled).

Tests

  • tests/libse/SubtitleFormats/BugHunt24Test.cs (18 tests)
  • tests/UI/Features/Assa/DrawShapeToAssaTests.cs (3 tests)

Full libse suite green locally (1934 tests).

🤖 Generated with Claude Code

Format writers/readers that could not round-trip their own output:
- FLVCoreCuePoints, HoliStar JSON, JSON Type 5/7/17, OpenDVT wrote
  milliseconds with the current culture ("1500,5") that their integer
  readers rejected or split on the comma; write whole ms invariantly
- Unknown 2 wrote hundredths where the sample/reader expect ms
- Unknown 4 read the two-digit fraction as ms (22.50 -> 22.050 s)
- Unknown 3 wrote frame counts where the sample/reader expect ms
- Unknown 31 scaled the frames-within-foot field by the frame rate
- Unknown 45 rounded the seconds field up at >= .5 s and then appended
  the frames of the same fraction (1.52 s -> 2.5 s)
- Unknown 50 read the frames field as ms
- Unknown 60 wrote an end-time line the reader took as the next cue's start
- Unknown 105 wrote [WAIT] before its text; the reader pairs text with
  the FOLLOWING wait, so every cue took the next cue's timing (also
  emit the first cue's offset)
- YouTube transcript one line: hour-long "1:01:01 text" matched the
  minutes regex first and loaded as 1:01 with ":01 text" as the text

Other:
- ASSA style picker "Usages" column was bound to FontSize, and both
  callers dropped the count when converting to SsaStyle
- Matroska TextST track "Export" wrote the raw undecoded payload as text
- AssaDraw DrawShape.ToAssa serialized a mixed line/bezier shape as one
  "b" run, turning straight points into bezier control points
- HtmlUtil.FixInvalidItalicTags "FALCONE:" branch did Substring(0, -1)
  for a bare "\n" on Windows (sibling branches were already guarded)
- PodcastIndexer read "speaker" raw although ToText JSON-escapes it
- DcPropertiesSmpte read all values raw although Save JSON-escapes them

Tests: tests/libse/SubtitleFormats/BugHunt24Test.cs,
tests/UI/Features/Assa/DrawShapeToAssaTests.cs

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@niksedk
niksedk merged commit fed7574 into main Sep 6, 2026
1 check passed
@niksedk
niksedk deleted the claude/random-high-confidence-bugs-2f1e7b branch September 6, 2026 08:52
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.

1 participant