Skip to content

fix: Use @synchronized directive for breadcrumbs (#69)#71

Merged
velocitysystems merged 2 commits intomasterfrom
mr/breadcrumbs
Dec 12, 2025
Merged

fix: Use @synchronized directive for breadcrumbs (#69)#71
velocitysystems merged 2 commits intomasterfrom
mr/breadcrumbs

Conversation

@velocitysystems
Copy link
Copy Markdown
Contributor

@velocitysystems velocitysystems commented Dec 8, 2025

Fixed:
#69

The app was crashing with "Collection was mutated while being enumerated" when breadcrumbs were being recorded concurrently from multiple threads. This occurred when one thread was iterating over _mutableBreadcrumbs in updateCrashReportUserInformation while another thread was adding or removing breadcrumbs.

  • Added thread-safe access to the collection using @synchronized(self) to protect all read and write operations.
  • Added test to the sample app which reproduces the problem (and verifies the fix).

@velocitysystems velocitysystems changed the title fix: use @synchronized directive for breadcrumbs (#69) fix: Use @synchronized directive for breadcrumbs (#69) Dec 9, 2025
@miquelbeltran miquelbeltran self-requested a review December 9, 2025 10:49
miquelbeltran
miquelbeltran previously approved these changes Dec 9, 2025
Comment thread Samples/iOS-ObjectiveC/iOS-ObjectiveC/FirstViewController.m
@velocitysystems velocitysystems merged commit 46c4e65 into master Dec 12, 2025
4 checks passed
@velocitysystems velocitysystems deleted the mr/breadcrumbs branch December 12, 2025 18:04
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

Successfully merging this pull request may close these issues.

2 participants