question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash: NullPointerException on App Startup

See original GitHub issue

Describe the bug App crashes on some devices because of a Nullpointer-Exception. Might be related to: https://github.com/DylanVann/react-native-fast-image/issues/165 and https://github.com/DylanVann/react-native-fast-image/issues/523

Device Brand: LGE Model: Nexus 5X Orientation: Portrait RAM free: 3.27 GB Disk free: 1.98 GB

Operating System Version: 6.0.1 Orientation: Portrait Rooted: Yes

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.bumptech.glide.Registry com.bumptech.glide.Registry.replace(java.lang.Class, java.lang.Class, com.bumptech.glide.load.model.ModelLoaderFactory)' on a null object reference at com.dylanvann.fastimage.FastImageOkHttpProgressGlideModule.registerComponents + 51(FastImageOkHttpProgressGlideModule.java:51) at com.bumptech.glide.GeneratedAppGlideModuleImpl.registerComponents + 37(GeneratedAppGlideModuleImpl.java:37) at com.bumptech.glide.Glide.initializeGlide + 273(Glide.java:273) at com.bumptech.glide.Glide.initializeGlide + 223(Glide.java:223) at com.bumptech.glide.Glide.checkAndInitializeGlide + 184(Glide.java:184) at com.bumptech.glide.Glide.get + 168(Glide.java:168) at com.bumptech.glide.Glide.getRetriever + 689(Glide.java:689) at com.bumptech.glide.Glide.with + 716(Glide.java:716) at com.dylanvann.fastimage.FastImageViewManager.createViewInstance + 51(FastImageViewManager.java:51) at com.dylanvann.fastimage.FastImageViewManager.createViewInstance + 33(FastImageViewManager.java:33) at com.facebook.react.uimanager.ViewManager.createViewInstanceWithProps + 119(ViewManager.java:119) at com.facebook.react.uimanager.ViewManager.createViewWithProps + 66(ViewManager.java:66) at com.facebook.react.uimanager.NativeViewHierarchyManager.createView + 259(NativeViewHierarchyManager.java:259) at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute + 198(UIViewOperationQueue.java:198) at com.facebook.react.uimanager.UIViewOperationQueue$1.run + 838(UIViewOperationQueue.java:838) at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches + 952(UIViewOperationQueue.java:952) at com.facebook.react.uimanager.UIViewOperationQueue.access$2200 + 44(UIViewOperationQueue.java:44) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded + 1012(UIViewOperationQueue.java:1012) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame + 29(GuardedFrameCallback.java:29) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame + 172(ReactChoreographer.java:172) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame + 84(ChoreographerCompat.java:84) at android.view.Choreographer$CallbackRecord.run + 856(Choreographer.java:856) at android.view.Choreographer.doCallbacks + 670(Choreographer.java:670) at android.view.Choreographer.doFrame + 603(Choreographer.java:603) at android.view.Choreographer$FrameDisplayEventReceiver.run + 844(Choreographer.java:844) at android.os.Handler.handleCallback + 739(Handler.java:739) at android.os.Handler.dispatchMessage + 95(Handler.java:95) at android.os.Looper.loop + 148(Looper.java:148) at android.app.ActivityThread.main + 5421(ActivityThread.java:5421) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 726(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main + 616(ZygoteInit.java:616)

To Reproduce On Startup (not all devices).

Expected behavior No error

Screenshots App crash, not available

Dependency versions

  • React Native version: 0.60.4
  • React Native Fast Image version: 7.0.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:21
  • Comments:77 (2 by maintainers)

github_iconTop GitHub Comments

22reactions
hamidfzmcommented, Mar 18, 2020

@DylanVann @rtroncoso The issue still persists even after upgrading to 8.1.5 version on Nexus 5x devices. https://sentry.io/share/issue/f0ab7069d2cd4e03b2d3550bea948223/

13reactions
alexandru1208commented, Sep 9, 2019

Same here. Same crash, same device, same android version, just after uploading a new version on play store, before the app was even available on store. Probably it’s one of the emulators on which they are reviewing the app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

App crashes on startup giving null pointer exception. how can ...
App crashes on startup giving null pointer exception. how can i change the code to start the next activity if user is logged...
Read more >
Android app crashes on startup NullPointerException ...
This chain from DownloaderActivity → GameActivity.java → AndroidManifest.xml where it reads bVerifyObbOnStartUp is broken. I would still bet that this is ...
Read more >
389738 – Null Exceptions & Crash on startup - Bugs - Eclipse
MESSAGE Application error !STACK 1 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.
Read more >
Matlab crashes on startup (java.lang.NullPointerException) on ...
As soon as I launch matlab with ./matlab the window opens and I get this message. What can I do? When I close...
Read more >
Crashlytics Logs With 'Impossible' NullPointerExceptions
Most Android developers have also probably used Crashlytics and seen stacks with seemingly “impossible” NullPointerException crashes, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found