9

I get the following exception in the background while my app runs in Android OS Lollipop. Not able to figure out its exact place or any reference to it in my code.

02-23 17:58:14.145: E/System(16417): Uncaught exception thrown by finalizer
02-23 17:58:14.146: E/System(16417): java.lang.NullPointerException: Attempt to invoke virtual method 'void dalvik.system.CloseGuard.close()' on a null object reference
02-23 17:58:14.146: E/System(16417):    at java.io.FileInputStream.close(FileInputStream.java:113)
02-23 17:58:14.146: E/System(16417):    at java.io.FileInputStream.finalize(FileInputStream.java:140)
02-23 17:58:14.146: E/System(16417):    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:190)
02-23 17:58:14.146: E/System(16417):    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:173)
02-23 17:58:14.146: E/System(16417):    at java.lang.Thread.run(Thread.java:818)

Any specific reason that why the Android OS library crashes?

Harpreet
  • 2,990
  • 3
  • 38
  • 52
  • 1
    This is probably a design error in the system, not in your program. But more of the stack trace and the package identity of the process whose pid is in the () would be needed. – Chris Stratton Feb 23 '15 at 12:48
  • i have this error because i am using Rxjava and then i have no internet when i run my app. – Ali Khaki Sep 25 '19 at 13:05

1 Answers1

1

I encountered a similar problem.
I used fragments in my code which called an AsyncTask. When I called the recreate() method of my activity, fragments were getting executed twice.
And that was the reason of my problem. I have solved my problem with this solution : Fragment onCreateView and onActivityCreated called twice.

Community
  • 1
  • 1