encorej / acra

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

ErrorReporter NPE caused by (valid) missing resDialogEmailPrompt. #136

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Using ACRA 4.2.3, annotate an Appliction with the following:

@ReportsCrashes(
        formKey = "",
        mode = ReportingInteractionMode.NOTIFICATION,
        resNotifTickerText = R.string.crash_notification_title,
        resNotifTitle = R.string.crash_notification_title,
        resNotifText = R.string.crash_notification_text,
        resDialogText = R.string.crash_notification_dialog_text)

The documentation claims that is valid: 
http://code.google.com/p/acra/wiki/AdvancedUsage#Status_bar_notification

However I got this message:

08-15 12:41:03.817: E/ACRA(24800): Angry Nerds fatal error : null
08-15 12:41:03.817: E/ACRA(24800): java.lang.NullPointerException
08-15 12:41:03.817: E/ACRA(24800):  at 
org.acra.ErrorReporter$ReportsSenderWorker.run(ErrorReporter.java:139)

Following the error message led me to this line: 
http://code.google.com/p/acra/source/browse/tags/acra-4.2.3/src/main/java/org/ac
ra/ErrorReporter.java#139

The only way a null pointer exception could occur on that line is if 
mCommentedReportFileName is null. Upon further viewing it became obvious that 
it is null by default when the the class is created. It is also only set by the 
setUserEmail function. 

With that information I added this to the original annotation and it worked:

resDialogEmailPrompt = R.string.crash_notification_email

This means that the resDialogEmailPrompt is actually required my the 
notification code. Either way I believe that this is a bug and that at the very 
least it should be documented. (Hopefully this helps and thanks for your time)

Original issue reported on code.google.com by robertma...@gmail.com on 15 Aug 2012 at 2:53

GoogleCodeExporter commented 8 years ago
Help, you seem to be on to something. I know nothing about programming but I 
think someone is using ACRA to hack me. Its taken forever just to recover just 
one of my many email addresses. I have a samsung 2 tab. My computers been 
hacked as well but I have a solution for that. How can I get this person off my 
tablet? I cannot afford to have it serviced nor buy any programming.  When I 
purchased programming to try yo keep them out, they then got my MasterCard too. 
 Hep please...and how can I gather the needed info for the RVMPs Fraud  Squad?
Thanks
Betty

Original comment by bettelov...@gmail.com on 3 Apr 2014 at 11:00