Skip to content

Commit 2d05bc2

Browse files
lemnikYYChen01988
authored andcommitted
fix(thread) trimming thread size
2 parents f45ac13 + 15988a2 commit 2d05bc2

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
* Native crashes will now include their signal code (where applicable) in the error message
88
[#2135](https://github.com/bugsnag/bugsnag-android/pull/2135)
9+
* Bumped the version of `protobuf-javalite` used by [bugsnag-plugin-android-exitinfo](bugsnag-plugin-android-exitinfo) to 3.25.5
10+
[#2144](https://github.com/bugsnag/bugsnag-android/pull/2144)
911

1012
## 6.11.0 (2025-01-22)
1113

bugsnag-android-core/src/main/java/com/bugsnag/android/EventPayload.kt

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ class EventPayload @JvmOverloads internal constructor(
8080
dataTrimmed
8181
)
8282

83+
if (event.threads.size > config.maxReportedThreads) {
84+
event.threads.subList(config.maxReportedThreads, event.threads.size).clear()
85+
}
86+
8387
json = rebuildPayloadCache()
8488
if (json.size <= maxSizeBytes) {
8589
return this

bugsnag-plugin-android-exitinfo/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ android {
5858
dependencies {
5959
addCommonModuleDependencies()
6060
api(project(":bugsnag-android-core"))
61-
implementation("com.google.protobuf:protobuf-javalite:3.24.2")
61+
implementation("com.google.protobuf:protobuf-javalite:3.25.5")
6262
}
6363

6464
protobuf {
6565
protoc {
66-
artifact = "com.google.protobuf:protoc:3.24.2"
66+
artifact = "com.google.protobuf:protoc:3.25.5"
6767
}
6868
generateProtoTasks {
6969
all().configureEach {

bugsnag-plugin-android-exitinfo/detekt-baseline.xml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<ID>CyclomaticComplexMethod:CodeStrings.kt$@RequiresApi(Build.VERSION_CODES.R) @SuppressLint("SwitchIntDef") @Suppress("DEPRECATION") internal fun importanceDescriptionOf(exitInfo: ApplicationExitInfo)</ID>
66
<ID>CyclomaticComplexMethod:CodeStrings.kt$@RequiresApi(Build.VERSION_CODES.R) internal fun exitReasonOf(exitInfo: ApplicationExitInfo)</ID>
77
<ID>LongParameterList:TombstoneParser.kt$TombstoneParser$( exitInfo: ApplicationExitInfo, listOpenFds: Boolean, includeLogcat: Boolean, threadConsumer: (BugsnagThread) -> Unit, fileDescriptorConsumer: (Int, String, String) -> Unit, logcatConsumer: (String) -> Unit )</ID>
8-
<ID>MagicNumber:BugsnagExitInfoPlugin.kt$BugsnagExitInfoPlugin$100</ID>
98
<ID>MagicNumber:TraceParser.kt$TraceParser$16</ID>
109
<ID>MagicNumber:TraceParser.kt$TraceParser$3</ID>
1110
<ID>MaxLineLength:ExitInfoCallbackTest.kt$ExitInfoCallbackTest$exitInfoCallback = ExitInfoCallback(context, nativeEnhancer, anrEventEnhancer, null, ApplicationExitInfoMatcher(context, 100))</ID>

features/full_tests/startup_anr.feature

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ Feature: onCreate ANR
77
# and then terminate the "misbehaving" app with a KILL (9) signal (almost like the ANR code doesn't
88
# fire at all). Since we can't cover a KILL signal in a test, we skip Android 10.
99
@skip_android_10
10-
# Android 13 Note: we no longer have permission to inject BACK button events, which are used to
10+
# Android 13+ Note: we no longer have permission to inject BACK button events, which are used to
1111
# trigger the ANR - so the test is not valid on Android 13 either
1212
@skip_android_13
13+
@skip_android_14
1314
Scenario: onCreate ANR is reported
1415
When I clear any error dialogue
1516
And I run "ConfigureStartupAnrScenario"

0 commit comments

Comments
 (0)