SRGSSR / srgletterbox-apple

The official SRG SSR media playback experience
https://srgssr.github.io/marketing/letterbox/
MIT License
14 stars 7 forks source link

SRGControlsView throws an exception #302

Closed pyby closed 1 year ago

pyby commented 1 year ago

Issue type

Crash

Description of the problem

In some cases, an on demand content seems to not have yet a maximum value (duration value). -[SRGControlsView refresh] method throws an exception.

-[SRGControlsView refresh]
SRGControlsView~ios.m
SIGABRT: Invalid parameter not satisfying: isfinite(timeInterval) && !isnan(timeInterval)

CoreFoundation   __exceptionPreprocess
libobjc.A.dylib  objc_exception_throw
Foundation       -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
Foundation       -[NSDateComponentsFormatter stringFromTimeInterval:]

Play RSI         [SRGControlsView refresh] SRGControlsView~ios.m:0
CoreFoundation   __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__

Play RSI         -[SRGLetterboxController playbackStateDidChange:] SRGLetterboxController.m:1772
CoreFoundation   __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
Play RSI         -[SRGMediaPlayerController setPlaybackState:withUserInfo:] SRGMediaPlayerController.m:378
Play RSI         -[SRGMediaPlayerController updateStallDetectionTimerForPlaybackState:] SRGMediaPlayerController.m:1564
Foundation       __NSFireTimer

Environment information

Reproducibility

Difficult to reproduce

Code sample

[SRGControlsView refresh] SRGControlsView~ios.m:671

Replace durationInSeconds with 0.0/0.0 and play a VoD or an AoD.

Crash logs from Play SRG Apple apps:

Play RSI 3.7.1: https://appcenter.ms/orgs/RTS-Organization/apps/Play-RSI-1/crashes/errors/493545591u/overview Play RTS 3.7.1: https://appcenter.ms/orgs/RTS-Organization/apps/Play-RTS-1/crashes/errors/493545591u/overview Play SRF 3.7.1: https://appcenter.ms/orgs/RTS-Organization/apps/Play-SRF-1/crashes/errors/493545591u/overview