Open GeoffreyPlitt opened 7 years ago
Sorry for late reply @GeoffreyPlitt . Can you please provide more details.
Can you please show me the Callstack ?
@zachrnolan
Hi @shahen94, I work with @GeoffreyPlitt.
Here's the callstack, let me know if you need anything else.
java.lang.NullPointerException Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
Trimmer.java:348 com.shahenlibrary.Trimmer.Trimmer.getPreviewImageAtPosition
TrimmerManager.java:83 com.shahenlibrary.Trimmer.TrimmerManager.getPreviewImageAtPosition
Method.java:-2 java.lang.reflect.Method.invoke
JavaMethodWrapper.java:372 com.facebook.react.cxxbridge.JavaMethodWrapper.invoke
JavaModuleWrapper.java:162 com.facebook.react.cxxbridge.JavaModuleWrapper.invoke
NativeRunnable.java:-2 com.facebook.react.bridge.queue.NativeRunnable.run
Handler.java:751 android.os.Handler.handleCallback
Handler.java:95 android.os.Handler.dispatchMessage
MessageQueueThreadHandler.java:31 com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage
Looper.java:154 android.os.Looper.loop
MessageQueueThreadImpl.java:199 com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run
Thread.java:761 java.lang.Thread.run
@zachrnolan @GeoffreyPlitt Thanks guys! And how much is the length of your video file ?
@shahen94 it seems to be happening at any length.
+1
@shahen94 hey, just wanted to check in and see if you were able to find anything. Thanks!
Hi @zachrnolan . Unfortunately no - @gevorg94 can you please take a look at this issue ? Might you can help
Hey @shahen94 @gevorg94 friendly ping to see if you guys were able to look at this yet. Thanks!
Any update on this issue? I'm seeing the same crash in production as well.
Guys, I'm not sure why this is happening. This could happen only when you're trying to get preview image for a second which is greater than the length of Video.
To have a temporary solution, you could add check in this line.
if (bmp == null) {
return;
}
I'm having the same problem here. Have anyone find a solution?
Facing the same issue here on some Android devices (just happened on Google Pixel running Android version 8.1.0).
I also stuck here please help.
We're seeing this on Android devices on production. One example is a Samsung SM-G930V, Android 7.0 / API 24. It happens when ProcessingManager.getPreviewForSecond() is called with a value very close to the end of the video. We suspect rounding errors or something else is causing it to try to extract a frame past the end.
Solving this bug would be nice, but even before it's solved, it should be properly trapped and raised as a JS-error, not a native Java error that crashes the whole app. Right now the crash is making this really tough for us.
We've already tried subtracting an epsilon value, and we're actually subtracting a full second and still going past the end, so this is not easy to work around.