-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
fix: ARC issue for FileManager #2525
Conversation
The SentryFileManager kept a strong reference to self for running code 10 seconds delayed. The strong reference stops ARC from deallocating the SentryFileManager. This is fixed now by using a weak reference.
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
838ad6b | 1217.78 ms | 1252.10 ms | 34.32 ms |
a064b3e | 1197.47 ms | 1220.58 ms | 23.11 ms |
58ec104 | 1244.29 ms | 1269.67 ms | 25.39 ms |
f8045b6 | 1206.76 ms | 1233.41 ms | 26.65 ms |
ae5ecd1 | 1226.73 ms | 1250.96 ms | 24.23 ms |
2ae7db9 | 1231.37 ms | 1239.98 ms | 8.61 ms |
dafc0fa | 1254.41 ms | 1274.31 ms | 19.90 ms |
9f8d429 | 1239.57 ms | 1255.12 ms | 15.55 ms |
3fdb749 | 1227.42 ms | 1248.48 ms | 21.06 ms |
459ae5e | 1223.84 ms | 1250.14 ms | 26.31 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
838ad6b | 20.75 KiB | 405.10 KiB | 384.34 KiB |
a064b3e | 20.75 KiB | 404.83 KiB | 384.08 KiB |
58ec104 | 20.75 KiB | 379.11 KiB | 358.36 KiB |
f8045b6 | 20.75 KiB | 404.83 KiB | 384.08 KiB |
ae5ecd1 | 20.75 KiB | 383.31 KiB | 362.55 KiB |
2ae7db9 | 20.75 KiB | 381.87 KiB | 361.12 KiB |
dafc0fa | 20.75 KiB | 383.87 KiB | 363.12 KiB |
9f8d429 | 20.75 KiB | 383.40 KiB | 362.65 KiB |
3fdb749 | 20.75 KiB | 383.81 KiB | 363.06 KiB |
459ae5e | 20.75 KiB | 383.50 KiB | 362.75 KiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one 👍
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 8.0.0 #2525 +/- ##
==========================================
+ Coverage 78.37% 78.54% +0.16%
==========================================
Files 241 241
Lines 22258 22293 +35
Branches 9821 9847 +26
==========================================
+ Hits 17444 17509 +65
+ Misses 4363 4336 -27
+ Partials 451 448 -3
Continue to review full report at Codecov.
|
* 8.0.0: (31 commits) tests: Reenable testAddAndRemoveData (#2533) feat: support SENTRY_DSN environment var on macOS (#2534) Remove duplicate entry (#2532) fix: ARC issue for FileManager (#2525) feat: Add SwiftUI performance tracking (#2271) fix: Remove all permission checks (#2529) Remove the automatic `viewAppearing` span (#2511) Fix and reenable testANRDetected_UpdatesAppStateToTrue (#2526) fix: Don't add out of date context for crashes (#2523) ref: Rename isOOM to watchdog in Client (#2520) test: Fix disabled failing watchdog test (#2521) build(deps): bump github/codeql-action from 2.1.35 to 2.1.36 (#2516) Rename the watchdog option and integration (#2513) feat: Enable CaptureFailedRequests by default (#2507) test: Fix asserts for SentryCrashTestInstallation (#2500) meta: User interaction tracing enabled per default (#2506) ref: Rename OOM to Watchdog Terminations (#2499) feat: enableUserInteractionTracing is GA (#2503) build(deps): bump nokogiri from 1.13.9 to 1.13.10 (#2505) perf: Don't attach headers for SentryNoOpSpan (#2498) ...
📜 Description
The SentryFileManager kept a strong reference to self for running code 10 seconds delayed. The strong reference stops ARC from deallocating the SentryFileManager. This is fixed now by using a weak reference.
💡 Motivation and Context
Came across this cause tests are sometimes crashing with
malloc: double free for ptr
The raw logs show logs from SentryFileManager
💚 How did you test it?
Unit tests.
📝 Checklist
🔮 Next steps