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

OOM while submitting crash reports #289

Closed
pfn opened this issue Jul 4, 2015 · 6 comments
Closed

OOM while submitting crash reports #289

pfn opened this issue Jul 4, 2015 · 6 comments

Comments

@pfn
Copy link
Contributor

pfn commented Jul 4, 2015

I don't know why my acra crash reports can be so huge at times, but I get the following crash stack on occasion.

java.lang.OutOfMemoryError: Failed to allocate a 33554444 byte allocation with 16437126 free bytes and 15MB until OOM   at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:163)    at java.io.BufferedInputStream.read(BufferedInputStream.java:295)   at java.io.InputStreamReader.read(InputStreamReader.java:231)   at java.io.BufferedReader.fillBuf(BufferedReader.java:145)  at java.io.BufferedReader.readChar(BufferedReader.java:263)     at java.io.BufferedReader.read(BufferedReader.java:253)     at org.acra.CrashReportPersister.load(CrashReportPersister.java:173)    at org.acra.CrashReportPersister.load(CrashReportPersister.java:77)     at org.acra.SendWorker.checkAndSendReports(SendWorker.java:140)     at org.acra.SendWorker.run(SendWorker.java:77)

The fix is to add bis.mark(0) at

https://github.com/ACRA/acra/blob/master/src/main/java/org/acra/CrashReportPersister.java#L75

@pfn
Copy link
Contributor Author

pfn commented Jul 4, 2015

Alternatively, you could just mark with default buffer size, rather than Int.max_value immediately before that.

@pfn
Copy link
Contributor Author

pfn commented Jul 4, 2015

Also, why is ebcdic being checked at all? Android devices don't generate ebcdic, what drove the inclusion of this encoding check?

@william-ferguson-au
Copy link
Member

Good question. It's been there since the very first version of the CrashReportData class.
@pyricau can you provide any clarity?
@pfn want to provide a pull request that cleans it up?

@pyricau
Copy link
Contributor

pyricau commented Jul 20, 2015

@KevinGaudin introduced ebcdic in 2011 when ACRA started reading from Properties: 2f6b62a

I'm guessing this would be come copy paste from another codebase :) .

@william-ferguson-au
Copy link
Member

Thanks @pyricau
@pfn wnat to provide a pull request that cleans it up?

@pfn
Copy link
Contributor Author

pfn commented Jul 20, 2015

yep, incoming

william-ferguson-au added a commit that referenced this issue Jul 20, 2015
fix #289, remove unnecessary isEbcdic check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants