Fix ten more bugs from a second random sweep - #14026
Merged
Merged
Conversation
The four "DVD Studio Pro with space" readers cut fixed offsets out of a line whose regex declares variable-width time codes, so a valid file threw ArgumentOutOfRangeException; they now split on the separator, which also keeps a separator that appears inside the text. Csv had the same shape: it split on every ";" and required exactly four parts, so any line whose text contained a semicolon was dropped without an error - even one Csv itself had written. AssaResampler cut tag parameters at a fixed offset although its regexes allow whitespace, so "\pos (10,11)" failed to parse and the "break" then abandoned every remaining tag on the line. Paragraph.WordsPerMinute had no zero-duration guard, unlike GetCharactersPerSecond right below it, so one zero-length line made the average and maximum WPM of a whole statistics report infinite. WebVTT thumbnails rejected every .jpeg sprite sheet, and the .jpeg branch of GetBitmap indexed with posJpg instead of posJpeg. Netflix "spell out leading number" matched only "\r\n" so the rule was dead off Windows; it now captures the digits and accepts either line break. Netflix max-line-length logged the same fix once per over-long line. Video OCR dropped unreadable frames out of their group instead of extending it, shortening the subtitle. ToRawAss had an unreachable duplicate "strikeout" branch, and ASSA CheckForErrors cut the untrimmed line after testing the trimmed one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 23, 2026
Merged
pull Bot
pushed a commit
to matrixer2306/subtitleedit
that referenced
this pull request
Aug 24, 2026
SubtitleEdit#14042 merged into main between compiling the beta23 change-log and merging the prep PR, so its three shipped-bug fixes were missing. Its fourth fix (the ASSA CheckForErrors guard) is left out: that bug was introduced by SubtitleEdit#14026 in this same beta and never shipped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #14025 — a second random sweep, different areas. Nine of the ten were reproduced with a failing test before the fix (regression tests in
tests/libse/Core/BugHunt20260823Round2Test.cs, verified red against the pre-fix tree viagit stash).Crashes / data loss
\d+) but the parsers cut fixed offsets (Substring(0, 25)/Substring(27)).0:0:0:0 , 0:0:0:1 , HigaveArgumentOutOfRangeException. All four variants now split on the separator, which also stops a separator inside the text from truncating it.;— it split on every separator and required exactly 4 parts, so a 5-part line was skipped with no_errorCount. Round-tripping"Hello; world"through Csv lost the line. Now split with a limit of 4 (which also stopsRemoveEmptyEntriesfrom dropping an empty-text row).\pos (10,11)— the regexes allow\s*but the offset math didn't, and the failure path wasbreak, abandoning every remaining tag on the line. Parameters are now read between the parentheses, and a bad tag is skipped instead of aborting.GetCharactersPerSeconddirectly below it. One zero-length line made the average and maximum WPM of a whole Statistics / batch-statistics report∞(a reversed line gave a negative rate). Same< 1guard, same 999 sentinel.Wrong or dead behaviour
.jpegsprite sheet —LoadSubtitleonly accepted.png/.jpg..jpegbranch ofGetBitmapusedposJpg(always-1there) instead ofposJpeg— masked by 5, and it would throw on a short name.\r\nwhile paragraph text usesEnvironment.NewLine. It now captures the digits (removing the offset arithmetic entirely) and accepts either line break.continueskipped theEndFrameupdate, andEndFramedrives the subtitle's end time.ToRawAsshad an unreachable duplicatestrikeoutbranch (dead code; the correct branch 30 lines up already handles it). Also fixed alongside:CheckForErrorscut the untrimmed line after testing the trimmed one — same mismatch class as the ActorConverter bug in Fix ten bugs from a random sweep of libse/libuilogic #14025.Note on test coverage: item 10's dead-branch removal has no behavioural test by definition; the included test instead pins that
StrikeOutis written from the style rather than a constant.Verification
🤖 Generated with Claude Code