quikopt / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Just released a 3.1.1 version. See Downloads page.

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