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

NPE during initAcra (ErrorReporter.java:685) #31

Closed
GoogleCodeExporter opened this issue Apr 7, 2016 · 6 comments
Closed

NPE during initAcra (ErrorReporter.java:685) #31

GoogleCodeExporter opened this issue Apr 7, 2016 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What version of the product are you using? On what operating system?

3.1.0

Please provide any additional information below.

The following error shows up in the Android developer console, it looks like 
Context#getFilesDir() can return null in some cases. The android docs 
(http://developer.android.com/reference/android/content/Context.html#getFilesDir
()) don't mention this, but it should probably be checked anyway.



java.lang.RuntimeException: Unable to create application 
com.zegoggles.smssync.App: java.lang.NullPointerException
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4247)
at android.app.ActivityThread.access$3000(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.acra.ErrorReporter.getCrashReportFilesList(ErrorReporter.java:685)
at org.acra.ErrorReporter.checkReportsOnApplicationStart(ErrorReporter.java:794)
at org.acra.ACRA.initAcra(ACRA.java:196)
at org.acra.ACRA.init(ACRA.java:167)
at com.zegoggles.smssync.App.onCreate(App.java:38)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4244)
... 10 more

Original issue reported on code.google.com by jan.ber...@gmail.com on 23 Jan 2011 at 10:08

@GoogleCodeExporter
Copy link
Author

There is an open issue regarding Context.getFilesDir() returning null: 
http://code.google.com/p/android/issues/detail?id=8886

It looks like this is the result of an error during the installation process 
and that a reinstall can solve it.

I will add a check in the next version of ACRA, but don't expect a bugfix 
release on 3.1.0 as this is a quite rare issue and I think that in this case 
the whole application will have difficulties running successfully.

Original comment by kevin.gaudin on 23 Jan 2011 at 11:54

@GoogleCodeExporter
Copy link
Author

Original comment by kevin.gaudin on 23 Jan 2011 at 11:55

  • Changed state: Started
  • Added labels: Milestone-Release3.2.0

@GoogleCodeExporter
Copy link
Author

great, thanks for the quick fix, i'll just build a new jar from the sources.

Original comment by jan.ber...@gmail.com on 24 Jan 2011 at 12:29

@GoogleCodeExporter
Copy link
Author

If you want a stable acra, build from the 3_1_0-bugfix branch I created. The 
only difference from the 3.1. 0 is the fix for this issue. There are a lot of 
untested works on the trunk. 

Original comment by kevin.gaudin on 24 Jan 2011 at 6:11

@GoogleCodeExporter
Copy link
Author

Original comment by kevin.gaudin on 17 Feb 2011 at 6:57

  • Added labels: Milestone-Release3.1.1
  • Removed labels: Milestone-Release3.2.0

@GoogleCodeExporter
Copy link
Author

Just released a 3.1.1 version. See Downloads page.

Original comment by kevin.gaudin on 18 Feb 2011 at 1:39

  • Changed state: Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant