ACRA 4.0.0b - Beta release available

634 views
Skip to first unread message

Kevin Gaudin

unread,
May 8, 2011, 7:21:55 PM5/8/11
to acra-d...@googlegroups.com
Hi all,

I had promised it months ago... and it's finally here!

I just published the first beta release of ACRA v4. It finally is a v4, because there have been so many changes since ACRA 3.1 that a simple 3.2 version was just not realistic enough!

The archive can be downloaded here:

Some documentation:
What are the most significant changes ? Full details are available in the ChangeLog (http://code.google.com/p/acra/wiki/ChangeLog) but lets sum this up:
  • New data added to reports:
    • logcat: default, events, radio) (requires READ_LOGS permission)
    • result of 'dumpsys meminfo' for your application process
    • application version code
    • phone device id (requires READ_PHONE_STATE permission)
    • text events from the system dropbox (requires READ_LOGS)
    • application start date
    • device features
    • report unique id
    • application installation unique id
    • external storage state
    • settings (system and secure)
    • is silent ?
  • As requested by many, a report should only notified once to the user. Reports which could not be sent due to bad network are still sent but without annoying the user anymore.
  • You can now implement your own Report Sender and do whatever you want with reports data.
  • Basic HTTP Authentification is available for those using the formUri parametter to send reports to a custom script
  • Reports can be sent by a mail Intent, for application where INTERNET permission is not wanted
  • New SharedPreferences items:
    • include system logs (may contain private data)
    • include Device ID (IMEI) (this a private identifier)
    • include user email (the user inputs his email address in the preference field)
    • always accept sending reports
  • The crash report dialog can now include an email field. The content of this field is saved in SharedPreferences.
  • All android build related fields have been merged in a single BUILD field
  • You can define which fields will be collected and sent. This can improve performance and allow you to get rif of the fields you never read.
Lots of things have been rewritten, so this beta phase will last a few weeks so that we can ensure that there is no major issue using ACRA v4 instead of ACRA v3.

As I have really limited time to do deep testing, ACRA relies on your testing and bug reports!

Thank you all!

Kevin

William Ferguson

unread,
May 9, 2011, 12:56:40 AM5/9/11
to acra-discuss
- As requested by many, a report should only notified once to the
user.
Reports which could not be sent due to bad network are still sent
but
without annoying the user anymore.

Woohoo - awesome stuff Kevin!


On May 9, 9:21 am, Kevin Gaudin <kevin.gau...@gmail.com> wrote:
> Hi all,
>
> I had promised it months ago... and it's finally here!
>
> I just published the first beta release of ACRA v4. It finally is a v4,
> because there have been so many changes since ACRA 3.1 that a simple 3.2
> version was just not realistic enough!
>
> The archive can be downloaded here:http://code.google.com/p/acra/downloads/detail?name=acra-4.0.0b.zip
>
> Some documentation:
>
>    - Setup instructions are here:
>    http://code.google.com/p/acra/wiki/BasicSetup
>    - Advanced usage is detailed
>    here:http://code.google.com/p/acra/wiki/AdvancedUsage
>    - Reports fields (old and new) are explained
>    here:http://code.google.com/p/acra/wiki/ReportContent
>    - For maven users, a repository is now available, details for using it
>    are listed here:http://code.google.com/p/acra/wiki/Maven
>
> What are the most significant changes ? Full details are available in the
> ChangeLog (http://code.google.com/p/acra/wiki/ChangeLog) but lets sum this
> up:
>
>    - New data added to reports:
>    - logcat: default, events, radio) (requires READ_LOGS permission)
>       - result of 'dumpsys meminfo' for your application process
>       - application version code
>       - phone device id (requires READ_PHONE_STATE permission)
>       - text events from the system dropbox (requires READ_LOGS)
>       - application start date
>       - device features
>       - report unique id
>       - application installation unique id
>       - external storage state
>       - settings (system and secure)
>       - is silent ?
>    -
>    - As requested by many, a report should only notified once to the user.
>    Reports which could not be sent due to bad network are still sent but
>    without annoying the user anymore.
>    You can now implement your own Report Sender and do whatever you want
>    with reports data.
>    - Basic HTTP Authentification is available for those using the formUri
>    parametter to send reports to a custom script
>    - Reports can be sent by a mail Intent, for application where INTERNET
>    permission is not wanted
>    - New SharedPreferences items:
>       -
>       - include system logs (may contain private data)
>       - include Device ID (IMEI) (this a private identifier)
>       - include user email (the user inputs his email address in the
>       preference field)
>       - always accept sending reports
>       - The crash report dialog can now include an email field. The content
>    of this field is saved in SharedPreferences.
>    - All android build related fields have been merged in a single BUILD
>    field
>    - You can define which fields will be collected and sent. This can

Matthew

unread,
May 9, 2011, 7:05:09 AM5/9/11
to acra-discuss
Hi,

after upgrading to 4.0 beta my project doesn't compile in Maven3, due
to:
"annotation org.acra.annotation.ReportsCrashes is missing <clinit>"

Matthew


On 9 Maj, 06:56, William Ferguson <william.ferguson...@gmail.com>
wrote:

Kevin Gaudin

unread,
May 9, 2011, 5:38:49 PM5/9/11
to acra-d...@googlegroups.com
Hi Matthew,

It looks like this is a compiler bug. I found 2 sources of this kind of message occuring on valid annotations:

What is your JDK ?

Using Eclipse with JDK 1.6.0_23 I don't have this issue.

Kevin

Kevin Gaudin

unread,
May 15, 2011, 12:42:14 PM5/15/11
to acra-d...@googlegroups.com
Hello everybody, I hope you're having a nice weekend ;-)

I see that there have been at least 23 downloads of ACRA 4.0.0b (not including Maven repostory downloads), do you have any positive or negative experience to share ?

Thanks for your feedback,

Kevin

FM29

unread,
May 16, 2011, 5:21:31 PM5/16/11
to acra-discuss
"java.lang.OutOfMemoryError
at org.apache.http.util.ByteArrayBuffer.<init>(ByteArrayBuffer.java:
53)
at
org.apache.http.impl.io.AbstractSessionInputBuffer.init(AbstractSessionInputBuffer.java:
82)
at
org.apache.http.impl.io.SocketInputBuffer.<init>(SocketInputBuffer.java:
93)
at
org.apache.http.impl.SocketHttpClientConnection.createSessionInputBuffer(SocketHttpClientConnection.java:
83)
at
org.apache.http.impl.conn.DefaultClientConnection.createSessionInputBuffer(DefaultClientConnection.java:
170)
at
org.apache.http.impl.SocketHttpClientConnection.bind(SocketHttpClientConnection.java:
106)
at
org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:
129)
at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:
181)
at
org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:
164)
at
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:
119)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:
422)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
555)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
487)
at org.acra.util.HttpRequest.sendPost(HttpRequest.java:120)
at org.acra.util.HttpRequest.sendPost(HttpRequest.java:84)
at org.acra.util.HttpUtils.doPost(HttpUtils.java:59)
at org.acra.sender.GoogleFormSender.send(GoogleFormSender.java:63)
at org.acra.ErrorReporter.sendCrashReport(ErrorReporter.java:850)
at org.acra.ErrorReporter.checkAndSendReports(ErrorReporter.java:956)
at org.acra.ErrorReporter$ReportsSenderWorker.run(ErrorReporter.java:
176)
"


Let me know what other information I can send you, I have the full
ACRA report, but I can't reproduce it

Darren Mowat

unread,
May 17, 2011, 5:59:17 AM5/17/11
to acra-d...@googlegroups.com
I was getting this error too in some of my own code, only occurred on the HTC Thunderbolt though. I fixed it by setting the Socket Buffer Size of the HttpClient in my post method. It is documented here.

http://stackoverflow.com/questions/5358014/android-httpclient-oom-on-4g-lte-htc-thunderbolt

Nathan

unread,
May 22, 2011, 3:12:13 AM5/22/11
to acra-discuss
This is happening to me as well. I had to go back to V3 of acra.
Although it is a java compiler bug, there is a workaround reported at:
http://java.itags.org/java-core-apis/7820/

Any chance of implementing the workaround for V4 of acra?

N

On May 9, 5:38 pm, Kevin Gaudin <kevin.gau...@gmail.com> wrote:
> Hi Matthew,
>
> It looks like this is a compiler bug. I found 2 sources of this kind of
> message occuring on valid annotations:http://java.itags.org/java-core-apis/7820/http://forums.oracle.com/forums/thread.jspa?threadID=1181990&tstart=14

Kevin Gaudin

unread,
May 22, 2011, 3:25:07 AM5/22/11
to acra-d...@googlegroups.com

After discussing this, I decided to refactor and extract the constants from the annotation.

Expect a new beta release soon.

Kevin

Mateusz Grzechociński

unread,
May 22, 2011, 3:26:40 AM5/22/11
to acra-d...@googlegroups.com
2011/5/22 Kevin Gaudin <kevin....@gmail.com>:

> After discussing this, I decided to refactor and extract the constants from
> the annotation.
> Expect a new beta release soon.

Great. I was stuck with 4.0 because of this bug. Can't wait for new
release of ACRA :)

Thanks in advance!

--
Regards,
Matthew

Kevin Gaudin

unread,
May 22, 2011, 5:57:13 PM5/22/11
to acra-d...@googlegroups.com
Here it is: v4.0.1b - http://code.google.com/p/acra/downloads/detail?name=acra-4.0.1b.zip - and maven repo

Bugfixes:
  * Issue 52: ACRA crash when reading HTTP response shorter than 200 chars
  * Forced HttpClient SocketBufferSize to 8192 bytes as it appears that on some devices, the default size is set to a huge 2Mb causing OutOfMemoryErrors.
  * Refactoring: extract constants from @ReportsCrashes. This was causing compilations issues with javac.

Could you please confirm that this fixes your issues ?

Thanks a lot for your help !

Kevin

Kevin Gaudin

unread,
May 24, 2011, 6:09:25 PM5/24/11
to acra-d...@googlegroups.com
Hi,

Just to let you know that I released a new 4.1.0b version with a single enhancement requested as Issue 53 on the project issue tracker. This was so simple to implement that I decided to include it during the beta tests phase even if I generally prefer to do only bugfixes during beta.

The feature is a new configuration item: @ReportsCrashes.forceCloseDialogAfterToast that allows you to enable the display of the native Force Close dialog in TOAST mode. Default is "false" to keep consistency with previous versions of ACRA.

Please continue testing ACRA v4. If no critical bug is reported before the 5th of June it will be declared stable.

Thanks,

Kevin

Kevin Gaudin

unread,
May 27, 2011, 4:06:57 AM5/27/11
to acra-d...@googlegroups.com
I just had an idea for another field which would be helpful in Reports.

What about retrieving the list of key/values from the application default SharedPreferences ?
To be extensive, it could be nice to let the developer provide a set of Strings identifying the various SharedPreferences he would like to include in reports.

Any opinion welcome.

Kevin

William Ferguson

unread,
May 27, 2011, 4:42:20 AM5/27/11
to acra-discuss
Its all looks good to me Kevin.
Just a note that doco will need to say that you have to use the
template provided 4.1.0b

William

Kevin Gaudin

unread,
May 30, 2011, 4:53:52 AM5/30/11
to acra-d...@googlegroups.com
Hi there,

A new release is available... with a version number updated to 4.2.0b due to the addition of a new field collecting SharedPreferences contents.

The new archive is available here: http://code.google.com/p/acra/downloads/detail?name=acra-4.2.0b.zip and from the maven repository.

Exact changes:

  • New: New SHARED_PREFERENCES field, see AdvancedUsage
  • Fixed: do not send silent reports if acra.enabled or acra.disabled SharedProperties have been set to disable ACRA.
  • Fixed: after application restart with ACRA disabled from SharedPreferences settings, ACRA was not able to detect a change on this setting and reactivate.
These 2 fixes might have fixed Issue 54.

I updated recently my own application EmailAlbum with ACRA 4.1.0b and had 1 report sent multiple times. This can be identified with the content of the field REPORT_ID which should be unique for each row. Have you seen duplicate reports in your own tests ?
I'm investigating this, so if you have any hint to share about this bad behavior, please contact me. If this only happened once (or if I understand why it happened and fix it) then we should have the stable version of ACRA v4 on the 6th of May.

Thanks for your help,

Kevin

Kevin Gaudin

unread,
May 30, 2011, 5:00:22 AM5/30/11
to acra-d...@googlegroups.com
Of course... this is not "on the 6th of May" but "on the 6th of June"....

(and not "SharedProperties" but "SharedPreferences")

;-)

Kevin

B

unread,
May 30, 2011, 3:42:23 PM5/30/11
to acra-d...@googlegroups.com
Hey Kevin

Using the email feature, I have been getting this

USER_COMMENT=null
ANDROID_VERSION=null
APP_VERSION_NAME=null
BRAND=null
PHONE_MODEL=null
CUSTOM_DATA=null
STACK_TRACE=null

I know the beta worked for me and then this started happening, whether or not I enter something for the subject of the message.  I'll check the config again in case I inadvertently changed something, but it may be something folks run into, anyway

B Lyon

unread,
May 30, 2011, 3:45:28 PM5/30/11
to acra-d...@googlegroups.com
(this is 4.1)


and here's what's in logcat after I enter the message

05-30 15:44:27.346 3545 3553 E ACRA : An error occured while
writing the report file...
05-30 15:44:27.346 3545 3553 E ACRA : java.lang.NullPointerException
05-30 15:44:27.346 3545 3553 E ACRA : at
org.acra.CrashReportData.dumpString(CrashReportData.java:94)
05-30 15:44:27.346 3545 3553 E ACRA : at
org.acra.CrashReportData.store(CrashReportData.java:546)
05-30 15:44:27.346 3545 3553 E ACRA : at
org.acra.ErrorReporter.saveCrashReportFile(ErrorReporter.java:873)
05-30 15:44:27.346 3545 3553 E ACRA : at
org.acra.ErrorReporter.addUserDataToReport(ErrorReporter.java:1158)
05-30 15:44:27.346 3545 3553 E ACRA : at
org.acra.ErrorReporter.access$100(ErrorReporter.java:118)
05-30 15:44:27.346 3545 3553 E ACRA : at
org.acra.ErrorReporter$ReportsSenderWorker.run(ErrorReporter.java:1

I'll try your latest and see what happens

Kevin Gaudin

unread,
May 30, 2011, 4:13:28 PM5/30/11
to acra-d...@googlegroups.com
Thanks, I'll test again this mode right now.

Kevin

Kevin Gaudin

unread,
May 30, 2011, 4:58:25 PM5/30/11
to acra-d...@googlegroups.com
Ok, I think this was actually designed to work in TOAST mode only.... So I don't understand why I included the USER_COMMENT field in default fields...

Give me some time to review this ;-).

Thanks a lot for reporting this issue.

Kevin Gaudin

unread,
May 30, 2011, 5:14:25 PM5/30/11
to acra-d...@googlegroups.com
What was discussed in the original change request (http://code.google.com/p/acra/issues/detail?id=29) was that it should work with NOTIFICATION or TOAST mode, so this is clearly an ugly bug.

Let's fix it!

Kevin

B Lyon

unread,
May 30, 2011, 5:44:06 PM5/30/11
to acra-d...@googlegroups.com
that's weird, because I swear it worked when I first tried the beta

thanks for checking into this - let me know how I can help you, too

Kevin Gaudin

unread,
May 30, 2011, 6:02:46 PM5/30/11
to acra-d...@googlegroups.com
Ok, this should be fixed with the 4.2.1b I just released:

Kevin

Isneesh

unread,
May 31, 2011, 7:19:44 AM5/31/11
to acra-d...@googlegroups.com
Was facing the same issue of nulls, just tested the v4.2.1b and it works perfectly till now! Thanks.

B Lyon

unread,
May 31, 2011, 6:35:25 PM5/31/11
to acra-d...@googlegroups.com
I'll try to test as well. Thanks so much for looking into it

Peter Cutting

unread,
Jan 11, 2012, 8:34:09 AM1/11/12
to acra-d...@googlegroups.com
Can ACRA be configured to only send crash reports when NOT attached to debugger?

Peter

Stan.Kocken

unread,
Jan 18, 2012, 4:26:19 AM1/18/12
to acra-d...@googlegroups.com
If you want to say if your are in debug mode, you can :

To know if you are in debug mode : 

boolean isDebuggable = (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;

So, just never call "ACRA.init(this);" in your application if you're not in debug mode

Kevin Gaudin

unread,
Jan 18, 2012, 4:30:20 AM1/18/12
to acra-d...@googlegroups.com
There's a discussion open on this topic in the issue tracker:

Kevin
Reply all
Reply to author
Forward
0 new messages