Conversation
Stop reopening an FFmpeg reader that reaches EOF before producing a frame, preventing repeated synchronous decoding. Fixes TelegramMessenger#2246
arena-ai-coding-agent Bot
pushed a commit
to decoder-dev/Telegram-iOS
that referenced
this pull request
Sep 12, 2026
…egramMessenger#2124 TelegramMessenger#2308 TelegramMessenger#2235 TelegramMessenger#2241 TelegramMessenger#2329 TelegramMessenger#2244 WEBFILE_NOT_AVAILABLE poisoned web-referenced media as a complete 0-byte file: the multipart fetcher reported completeSize 0, MediaBox persisted it and never fetched again. Now retries with exponential backoff (1-16s, 5 attempts) then fails the fetch (retryable); both MediaBox file contexts no longer accept a reported size of 0 as evidence of completion. TelegramMessenger#2246 zero-frame GIF streams spun BatchVideoRenderingContext in an infinite reopen-decode loop at 100% CPU. Port of upstream PR TelegramMessenger#2315: a reader that produced no frames at EOF is a decoding failure, not a restart. TelegramMessenger#2124 tapping one chat could open another: ListView selection resolved through item nodes' model frames, which can disagree with the displayed position after an interrupted layout animation. Selection and secondary action are cross-checked against UIKit's presentation-based hit test and cancelled on mismatch; index bounds-checked against live items. TelegramMessenger#2308 Siri extension trapped inside Postbox: the shared .tempkey file was written non-atomically, so a concurrent reader could see it half-written, generate a diverging random key and poison every later open. Atomic write now; Siri no longer force-unwraps key/salt constructors. TelegramMessenger#2235 Mini App web view collapsed to 1px after the keyboard opened: degenerate intermediate geometry was clamped to max(1.0,...) and published as a STABLE viewport. Insets are bounded to keep a minimum usable height; intermediate geometry is not reported as stable. TelegramMessenger#2241 web_app_request_fullscreen could be silently ignored, leaving bots hanging on the fullscreenChanged/fullscreenFailed contract. The unhandleable path now answers fullscreen_failed/UNSUPPORTED. TelegramMessenger#2329 story publishing settings were unreachable on iPhone SE: scrolling is disabled for stories in favor of the dismiss pan gesture, so overflowing content was cut off. The screen becomes scrollable whenever content actually overflows. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
arena-ai-coding-agent Bot
pushed a commit
to decoder-dev/Telegram-iOS
that referenced
this pull request
Sep 16, 2026
…er#2304), sharp fullscreen/peek stickers (TelegramMessenger#2297), DrawingContext null-buffer guard (TelegramMessenger#2217); TelegramMessenger#2315 already present Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
decoder-dev
added a commit
to decoder-dev/Telegram-iOS
that referenced
this pull request
Sep 18, 2026
…er#2304), sharp fullscreen/peek stickers (TelegramMessenger#2297), DrawingContext null-buffer guard (TelegramMessenger#2217); TelegramMessenger#2315 already present Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
decoder-dev
added a commit
to decoder-dev/Telegram-iOS
that referenced
this pull request
Sep 18, 2026
…egramMessenger#2124 TelegramMessenger#2308 TelegramMessenger#2235 TelegramMessenger#2241 TelegramMessenger#2329 TelegramMessenger#2244 WEBFILE_NOT_AVAILABLE poisoned web-referenced media as a complete 0-byte file: the multipart fetcher reported completeSize 0, MediaBox persisted it and never fetched again. Now retries with exponential backoff (1-16s, 5 attempts) then fails the fetch (retryable); both MediaBox file contexts no longer accept a reported size of 0 as evidence of completion. TelegramMessenger#2246 zero-frame GIF streams spun BatchVideoRenderingContext in an infinite reopen-decode loop at 100% CPU. Port of upstream PR TelegramMessenger#2315: a reader that produced no frames at EOF is a decoding failure, not a restart. TelegramMessenger#2124 tapping one chat could open another: ListView selection resolved through item nodes' model frames, which can disagree with the displayed position after an interrupted layout animation. Selection and secondary action are cross-checked against UIKit's presentation-based hit test and cancelled on mismatch; index bounds-checked against live items. TelegramMessenger#2308 Siri extension trapped inside Postbox: the shared .tempkey file was written non-atomically, so a concurrent reader could see it half-written, generate a diverging random key and poison every later open. Atomic write now; Siri no longer force-unwraps key/salt constructors. TelegramMessenger#2235 Mini App web view collapsed to 1px after the keyboard opened: degenerate intermediate geometry was clamped to max(1.0,...) and published as a STABLE viewport. Insets are bounded to keep a minimum usable height; intermediate geometry is not reported as stable. TelegramMessenger#2241 web_app_request_fullscreen could be silently ignored, leaving bots hanging on the fullscreenChanged/fullscreenFailed contract. The unhandleable path now answers fullscreen_failed/UNSUPPORTED. TelegramMessenger#2329 story publishing settings were unreachable on iPhone SE: scrolling is disabled for stories in favor of the dismiss pan gesture, so overflowing content was cut off. The screen becomes scrollable whenever content actually overflows.
decoder-dev
added a commit
to decoder-dev/Telegram-iOS
that referenced
this pull request
Sep 18, 2026
…er#2304), sharp fullscreen/peek stickers (TelegramMessenger#2297), DrawingContext null-buffer guard (TelegramMessenger#2217); TelegramMessenger#2315 already present
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.
BatchVideoRenderingContextrepeatedly reopened an FFmpeg reader when a stream reached EOF without producing any frames. This caused a synchronous decoding loop, sustained CPU usage, and blocked GIF rendering.Track whether the reader has produced a frame. Restart it only after it has produced at least one frame; treat zero-frame EOF as a decoding failure.
Testing
Verified with the focused
BatchVideoRenderingTestsregression harness on GitHub Actions using Xcode 26.2 and iOS 26.2:https://github.com/XXcipherX/telegram-ios-gif-regression-test/actions/runs/33513158372
Fixes #2246