Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] crash with latest release #1515

Closed
OleksandrKucherenko opened this issue Mar 11, 2019 · 10 comments
Closed

[iOS] crash with latest release #1515

OleksandrKucherenko opened this issue Mar 11, 2019 · 10 comments

Comments

@OleksandrKucherenko
Copy link

Current behavior

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x1a2975ea4 __exceptionPreprocess
1  libobjc.A.dylib                0x1a1b45a50 objc_exception_throw
2  CoreFoundation                 0x1a287c484 -[NSCache init]
3  Foundation                     0x1a33eb938 -[NSObject(NSKeyValueObserving) observeValueForKeyPath:ofObject:change:context:]
4  Klarna                         0x100d95068 -[RCTVideo observeValueForKeyPath:ofObject:change:context:] (RCTVideo.m:696)
5  Foundation                     0x1a33eba9c NSKeyValueNotifyObserver
6  Foundation                     0x1a33edf30 NSKeyValueDidChange
7  Foundation                     0x1a33eb324 NSKeyValueDidChangeWithPerThreadPendingNotifications.llvm.11394337073705085640
8  AVFoundation                   0x1a89ec848 __avplayeritem_fpItemNotificationCallback_block_invoke
9  libdispatch.dylib              0x1a23ad6c8 _dispatch_call_block_and_release
10 libdispatch.dylib              0x1a23ae484 _dispatch_client_callout
11 libdispatch.dylib              0x1a235a9a4 _dispatch_main_queue_callback_4CF$VARIANT$mp
12 CoreFoundation                 0x1a2905ce4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
13 CoreFoundation                 0x1a2900bac __CFRunLoopRun
14 CoreFoundation                 0x1a29000e0 CFRunLoopRunSpecific
15 GraphicsServices               0x1a4b79584 GSEventRunModal
16 UIKitCore                      0x1cfb10c00 UIApplicationMain
17 Klarna                         0x10097e8cc main (main.m:14)
18 libdyld.dylib                  0x1a23bebb4 start

Reproduction steps

just has a crash log.

Expected behavior

No Crash

Platform

  • iOS
@FullstackJack
Copy link
Contributor

Which version of Xcode? Which version of macOS? Which version of iOS? Simulator? Device? Could you try to reproduce this with react-native init and install into a new project. Also try cleaning the build.

@OleksandrKucherenko
Copy link
Author

Crash log is from crashlytics/firebase/sentry. Latest xcode, latest macos.

version in project that works fine: "react-native-video": "^2.0.0"

Android part works fine, iOS produce a crash on end-user devices. We cannot reproduce it on the local devices. So its some kind of corner cases.

@FullstackJack
Copy link
Contributor

Are you using video caching?

@FullstackJack
Copy link
Contributor

Which version of react-native-video is crashing?

@cobarx
Copy link
Contributor

cobarx commented Mar 13, 2019

We can try and track this down but need the version of react-native-video to be able to match the line number from the crash to the right line of code in a given release.

@OleksandrKucherenko
Copy link
Author

OleksandrKucherenko commented Mar 15, 2019

used latest release 4.4.0 @FullstackJack @cobarx

@FullstackJack
Copy link
Contributor

If I'm not mistaken, the super classes of this class do not implement the method observeValueForKeyPath method. It's probably safe to remove it.

@OleksandrKucherenko
Copy link
Author

Can anybody create/commit a fix for the crash?

nmarisi pushed a commit to nmarisi/react-native-video that referenced this issue Aug 20, 2019
…on super from RCTVideo.

If the super class is not actually observing the key, the app will crash. Checking to see if
the super class responds to this selector doesn't solve this issue.

react-native-video github issue: TheWidlarzGroup#1515

Discussion about this particular problem: https://stackoverflow.com/questions/6574714/whats-wrong-with-this-observevalueforkeypathofobjectchangecontext-implement
@CHaNGeTe
Copy link
Contributor

CHaNGeTe commented Sep 8, 2019

check 5.0.2

@CHaNGeTe CHaNGeTe closed this as completed Sep 8, 2019
rosslavni pushed a commit to rosslavni/react-native-video that referenced this issue Aug 11, 2022
…on super from RCTVideo.

If the super class is not actually observing the key, the app will crash. Checking to see if
the super class responds to this selector doesn't solve this issue.

react-native-video github issue: TheWidlarzGroup/react-native-video#1515

Discussion about this particular problem: https://stackoverflow.com/questions/6574714/whats-wrong-with-this-observevalueforkeypathofobjectchangecontext-implement
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

No branches or pull requests

4 participants