You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At Datadog, we use PLCR to power our crash reporting product and have been generally very happy with it—thanks for the great work 🏅🙂.
Recently, we investigated the following error among users of version 1.11.2 of PLCR:
"An unknown error occurred decoding the crash report."
We suspect the root cause is the same as in #305. The library has a hardcoded size limit (MAX_REPORT_BYTES) for decoding crash reports, and if this limit is exceeded, PLCR fails with the "An unknown error ..." message. The 1MB limit (increased from 256KB in #308) seems reasonable, however we believe it can still be insufficient for certain apps—especially those using RxSwift in their stack traces or loading large numbers of libraries.
While it could be debated how often these limits are exceeded and what the limit should be, we believe PLCR could benefit from two improvements:
1. Improve the error message when exceeding "max report size"
The current error message lacks context on whether the failure is due to exceeding MAX_REPORT_BYTES or another issue. We suggest adding a more specific error, such as:
"Could not decode crash report because it exceeds max size (actual size: ... bytes, max size: ... bytes)"
This would provide actionable data to help better adjust the default limit for each app.
2. Make the "max report size" configurable
Although increasing the size limit from 256KB to 1MB helped in #305, we believe some reports will always exceed a fixed limit. We propose adding a configurable option for the max crash report size, allowing developers to adjust it based on their app’s needs. This would accommodate apps with larger stack traces or more binary images.
We are motivated to contribute these changes to PLCR if you agree. Looking forward to your thoughts!
The text was updated successfully, but these errors were encountered:
Hello, and thank you for reaching out to us! The improvements you suggested are reasonable. We welcome your contributions and would be glad to review them.
Hi 👋,
At Datadog, we use PLCR to power our crash reporting product and have been generally very happy with it—thanks for the great work 🏅🙂.
Recently, we investigated the following error among users of version 1.11.2 of PLCR:
We suspect the root cause is the same as in #305. The library has a hardcoded size limit (
MAX_REPORT_BYTES
) for decoding crash reports, and if this limit is exceeded, PLCR fails with the "An unknown error ..." message. The 1MB limit (increased from 256KB in #308) seems reasonable, however we believe it can still be insufficient for certain apps—especially those using RxSwift in their stack traces or loading large numbers of libraries.While it could be debated how often these limits are exceeded and what the limit should be, we believe PLCR could benefit from two improvements:
1. Improve the error message when exceeding "max report size"
The current error message lacks context on whether the failure is due to exceeding
MAX_REPORT_BYTES
or another issue. We suggest adding a more specific error, such as:This would provide actionable data to help better adjust the default limit for each app.
2. Make the "max report size" configurable
Although increasing the size limit from 256KB to 1MB helped in #305, we believe some reports will always exceed a fixed limit. We propose adding a configurable option for the max crash report size, allowing developers to adjust it based on their app’s needs. This would accommodate apps with larger stack traces or more binary images.
We are motivated to contribute these changes to PLCR if you agree. Looking forward to your thoughts!
The text was updated successfully, but these errors were encountered: