sank20 / acra

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

NPE at ErrorReporter.java:519 #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?  I have no idea

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

Please provide any additional information below.

This just showed up twice in my Crash Reports file:

java.lang.NullPointerException
    at android.widget.Toast.show(Toast.java:108)
    at org.acra.ErrorReporter$1.run(ErrorReporter.java:519)

The only parts of the crash report that were filled in were the stack trace, 
initial configuration, and crash configuration.
I haven't changed my app recently.
So, I have no idea what caused this, how, or why.
Just thought I'd report an odd crash that seems to have happened inside ACRA in 
my App.

Original issue reported on code.google.com by JohnLuss...@gmail.com on 22 Jan 2011 at 3:50

GoogleCodeExporter commented 8 years ago
Do you have a deeper stack trace ? Any data about the device's android version ?

It looks quite strange, because this is Android's Toast class which throws the 
NullPointerException, and if it's on the line 108 here: 
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java
/android/widget/Toast.java#l108 then it means that a system notification 
service was null... I don't know if we can do anything about this.

Thanks for reporting.

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

GoogleCodeExporter commented 8 years ago
I've just received 8 such errors from one user.

ACRA: 3.1.0

Full stack:
java.lang.NullPointerException
at android.widget.Toast.makeText(Toast.java:258)
at org.acra.ErrorReporter$1.run(ErrorReporter.java:404)

android: 2.2

model: ADR6300

Original comment by damjan.m...@gmail.com on 16 Mar 2011 at 8:25

GoogleCodeExporter commented 8 years ago
Kevin, I've also just had 2 sets of 4 reports of this

ACRA-4.1.0(+? not enough info in the report to tell if its 4.1.0 or the 
4.1.0-patch that is trying to stamp out the multiple error reports)

java.lang.NullPointerException
    at android.widget.Toast.show(Toast.java:117)
    at org.acra.ErrorReporter$1.run(ErrorReporter.java:715)

There is no other info in the error reports except for timestamp, reportId and 
user_app_start_date, app_version_name, android_version.

* app_version_name and android_version is null for all 8 reports.
* user_app_start_date is the same for all 8 reports.
* reportId is unique for all 8 reports.
* The timestamp shows that the first 4 occurred approx 20 mins before the 2nd 
set of 4. And each of the reports within a set (of four) is sent within 2 
seconds of the others.

There is an error immediately prior to first set of crash reports was: 
java.lang.RuntimeException: Package manager has died

I think that holds the answer. It appears that the app was updated while it was 
running which caused context to be pulled form underneath it.

Aide from hardening every aspect of ACRA to account for the system suddenly not 
being there I don't think there is much you can do.

Original comment by william....@gmail.com on 1 Jul 2011 at 1:01

GoogleCodeExporter commented 8 years ago
Fixed in Rev#720

Original comment by william....@gmail.com on 16 Jul 2011 at 7:23

GoogleCodeExporter commented 8 years ago
Got similar error problem. I think is there is a real problem with the 
ErrorReporter class.

10-31 01:46:09.768: DEBUG/ACRA(9355): Retrieve application default 
SharedPreferences.
10-31 01:46:09.778: DEBUG/ACRA(9355): Set OnSharedPreferenceChangeListener.
10-31 01:46:09.788: DEBUG/ACRA(9355): ACRA is enabled for 
com.hourglass.applications, intializing...
10-31 01:46:09.838: WARN/ACRA(9355): com.hourglass.applications reports will be 
sent by email (if accepted by user).
10-31 01:46:09.848: ERROR/MyApplication()(9355): ACRA.init(this); crashes: null
10-31 01:46:09.858: ERROR/MyApplication()(9355): CONFIG: 
@org.acra.annotation.ReportsCrashes(additionalDropBoxTags=[], 
additionalSharedPreferences=[], customReportContent=[], 
deleteUnapprovedReportsOnApplicationStart=true, dropboxCollectionMinutes=5, 
forceCloseDialogAfterToast=false, formKey=, formUri=, 
formUriBasicAuthLogin=ACRA-NULL-STRING, 
formUriBasicAuthPassword=ACRA-NULL-STRING, includeDropBoxSystemTags=false, 
logcatArguments=[-t, 200, -v, time], mailTo=info@developingdreams.net, 
mode=NOTIFICATION, resDialogCommentPrompt=2131099688, resDialogEmailPrompt=0, 
resDialogIcon=17301543, resDialogOkToast=0, resDialogText=2131099687, 
resDialogTitle=0, resNotifIcon=2130837557, resNotifText=2131099685, 
resNotifTickerText=2131099683, resNotifTitle=2131099684, resToastText=0, 
sharedPreferencesMode=0, sharedPreferencesName=, socketTimeout=3000)
10-31 01:46:09.858: DEBUG/ACRA(9355): Retrieve application default 
SharedPreferences.
10-31 01:46:09.868: ERROR/MyApplication()(9355): SHARED PREFERENCES: 
android.app.ApplicationContext$SharedPreferencesImpl@446eedc8
10-31 01:46:09.868: WARN/System.err(9355): java.lang.NullPointerException
10-31 01:46:09.868: WARN/System.err(9355):     at 
org.acra.ErrorReporter.init(ErrorReporter.java:363)
10-31 01:46:09.868: WARN/System.err(9355):     at 
org.acra.ACRA.initAcra(ACRA.java:297)
10-31 01:46:09.878: WARN/System.err(9355):     at 
org.acra.ACRA.init(ACRA.java:238)
10-31 01:46:09.878: WARN/System.err(9355):     at 
com.hourglass.applications.MyApplication.onCreate(MyApplication.java:50)
10-31 01:46:09.878: WARN/System.err(9355):     at 
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
10-31 01:46:09.878: WARN/System.err(9355):     at 
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4165)
10-31 01:46:09.878: WARN/System.err(9355):     at 
android.app.ActivityThread.access$2900(ActivityThread.java:126)
10-31 01:46:09.878: WARN/System.err(9355):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1958)
10-31 01:46:09.878: WARN/System.err(9355):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
10-31 01:46:09.878: WARN/System.err(9355):     at 
android.os.Looper.loop(Looper.java:123)
10-31 01:46:09.878: WARN/System.err(9355):     at 
android.app.ActivityThread.main(ActivityThread.java:4568)
10-31 01:46:09.888: WARN/System.err(9355):     at 
java.lang.reflect.Method.invokeNative(Native Method)
10-31 01:46:09.888: WARN/System.err(9355):     at 
java.lang.reflect.Method.invoke(Method.java:521)
10-31 01:46:09.888: WARN/System.err(9355):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
10-31 01:46:09.888: WARN/System.err(9355):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
10-31 01:46:09.888: WARN/System.err(9355):     at 
dalvik.system.NativeStart.main(Native Method)

Original comment by david.w....@gmail.com on 31 Oct 2011 at 5:49

GoogleCodeExporter commented 8 years ago
ACRA 4.2.3 "Stable" produces NullPointerException when executing ACRA.init().

After analysing the error report, I can say for sure that the problem is 
located in the ErrorReporter. Isn't BugSenser supposed to catch the errors that 
are produced inside ACRA?

Here is the report:
10-31 03:28:00.545: DEBUG/ACRA(1970): Retrieve application default 
SharedPreferences.
10-31 03:28:00.555: DEBUG/ACRA(1970): Set OnSharedPreferenceChangeListener.
10-31 03:28:00.565: DEBUG/ACRA(1970): ACRA is enabled for 
com.hourglass.applications, intializing...
10-31 03:28:00.625: ERROR/MyApplication()(1970): ACRA.init(this); 
NullPointerException: null
10-31 03:28:00.635: ERROR/MyApplication()(1970): CONFIG: 
@org.acra.annotation.ReportsCrashes(additionalDropBoxTags=[], 
additionalSharedPreferences=[], customReportContent=[], 
deleteUnapprovedReportsOnApplicationStart=true, dropboxCollectionMinutes=5, 
forceCloseDialogAfterToast=false, formKey=ZZZZZZZZZZZZZZZZZZZZZ, 
formUri=http://www.bugsense.com/api/acra?api_key=XXXXXXXX, 
formUriBasicAuthLogin=ACRA-NULL-STRING, 
formUriBasicAuthPassword=ACRA-NULL-STRING, includeDropBoxSystemTags=false, 
logcatArguments=[-t, 200, -v, time], mailTo=, mode=NOTIFICATION, 
resDialogCommentPrompt=2131099688, resDialogEmailPrompt=0, 
resDialogIcon=17301543, resDialogOkToast=0, resDialogText=2131099687, 
resDialogTitle=0, resNotifIcon=2130837557, resNotifText=2131099685, 
resNotifTickerText=2131099683, resNotifTitle=2131099684, resToastText=0, 
sharedPreferencesMode=0, sharedPreferencesName=, socketTimeout=3000)
10-31 03:28:00.645: DEBUG/ACRA(1970): Retrieve application default 
SharedPreferences.
10-31 03:28:00.645: ERROR/MyApplication()(1970): SHARED PREFERENCES: 
android.app.ApplicationContext$SharedPreferencesImpl@44731628
10-31 03:28:00.645: WARN/System.err(1970): java.lang.NullPointerException
10-31 03:28:00.655: WARN/System.err(1970):     at 
org.acra.ErrorReporter.init(ErrorReporter.java:363)
10-31 03:28:00.655: WARN/System.err(1970):     at 
org.acra.ACRA.initAcra(ACRA.java:297)
10-31 03:28:00.655: WARN/System.err(1970):     at 
org.acra.ACRA.init(ACRA.java:238)
10-31 03:28:00.655: WARN/System.err(1970):     at 
com.hourglass.applications.MyApplication.onCreate(MyApplication.java:50)
10-31 03:28:00.655: WARN/System.err(1970):     at 
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
10-31 03:28:00.665: WARN/System.err(1970):     at 
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4165)
10-31 03:28:00.665: WARN/System.err(1970):     at 
android.app.ActivityThread.access$2900(ActivityThread.java:126)
10-31 03:28:00.665: WARN/System.err(1970):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1958)
10-31 03:28:00.665: WARN/System.err(1970):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
10-31 03:28:00.665: WARN/System.err(1970):     at 
android.os.Looper.loop(Looper.java:123)
10-31 03:28:00.665: WARN/System.err(1970):     at 
android.app.ActivityThread.main(ActivityThread.java:4568)
10-31 03:28:00.665: WARN/System.err(1970):     at 
java.lang.reflect.Method.invokeNative(Native Method)
10-31 03:28:00.665: WARN/System.err(1970):     at 
java.lang.reflect.Method.invoke(Method.java:521)
10-31 03:28:00.675: WARN/System.err(1970):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
10-31 03:28:00.675: WARN/System.err(1970):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
10-31 03:28:00.675: WARN/System.err(1970):     at 
dalvik.system.NativeStart.main(Native Method)

I hide my Keys

Original comment by david.w....@gmail.com on 31 Oct 2011 at 7:32

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 22 Dec 2011 at 9:08