Closed bockc closed 1 month ago
Have you found a fix for this? I'm seeing the same exact thing. You'd think more people would talk about it, considering this is the de facto video library for RN.
@rauchp I started using 5.1.0-alpha
versions IIRC, and the issue disappeared. Don't know for sure if it's related, but give it a try. If you confirm me it works I'll close the issue
@bockc Where are you getting that stacktrace from? I installed 5.1.0-alpha6
. Yet I'm still crashing whenever I run in release mode and try using another app. It's soft crashes when I go back to my app, and Xcode doesn't report an error. It just says Send failed with error "Socket is not connected"
. I don't think it's the same problem you had, but it does smell to me like a Springboard error. Don't have a trace to prove it though.
@rauchp In XCode, go to Window -> Devices and Simulator (Shift+Cmd+2). Find the device you're running the app on, click View device logs and you'll see the device's logs there.
Thanks! Looks like I'm getting the same thing you were getting so I'd keep the problem open, if you don't mind.
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, process-exit watchdog transgression: application<co.outlier.RushDraft>:6511 exhausted real (wall clock) time allowance of 5.00 seconds | ProcessVisibility: Background | ProcessState: Running | WatchdogEvent: process-exit | WatchdogVisibility: Background | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 10.140 (user 10.140, system 0.000), 34% CPU", | "Elapsed application CPU time (seconds): 0.004, 0% CPU" | )
Triggered by Thread: 0
That's strange, because I don't have them anymore with alpha versions. Also maybe you should check in the stacktrace if the issue comes from "AVFoundation" and paste the complete stacktrace. Otherwise it's pretty useless for mainteners :)
Definitely mentions AVFoundation
everywhere on the stack so I'm confident it's this library. Interestingly enough, only happens on one screen. So I'm debugging that screen specifically to see what part of it is causing this, and hope to report back to help the maintainers!
I also encountered the same problem. Have you found the solution?
Hello, we have the same problem here. Any solutions?
Same issue here
I have found the cause of the problem, but due to the difficult reproduction of the problem I have no way to verify.
Problem:
It looks like RCTVideo observes applicationWillEnterForeground
and performs synchronously:
- (void)setMediaSelectionTrackForCharacteristic:(AVMediaCharacteristic)characteristic
withCriteria:(NSDictionary *)criteria {
...
AVMediaSelectionGroup *group = [_player.currentItem.asset mediaSelectionGroupForMediaCharacteristic:characteristic];
...
}
before asset loads Audio/Subtitles. This sometimes blocks the main thread long enough for the application to be killed.
Suggested solution:
Wrap above method call with loadValuesAsynchronously:
[_player.currentItem.asset loadValuesAsynchronouslyForKeys:@[@"allMediaSelections"] completionHandler:^{
[self setSelectedAudioTrack:self->_selectedAudioTrack];
[self setSelectedTextTrack:self->_selectedTextTrack];
}];
In theory, this should unblock main thread in a applicationWillEnterForeground
scope.
Can you please test it on latest stable version and check if this issue still persists - If yes I will re-open this
Bug
App gets killed by Springboard on iOS when going in background. Stacktrace:
Platform
iOS
Which player are you experiencing the problem on:
Environment info
React native info output:
Library version: 5.1.0-alpha2 (doesn't work with 5.0.2 either)
Steps To Reproduce
Expected behaviour
I think this happens because of the new Apple's guidelines concerning background activity for an app. Too much resources are used while the app is in background and then Springboard decides to kill the app to free resources. According to the stacktrace, I think that this library is the one responsible for the excess resources used.