Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs
Outdated
Show resolved
Hide resolved
src/Sentry.Unity.Editor/ConfigurationWindow/SentryEditorWindowInstrumentation.cs
Show resolved
Hide resolved
| # api-level: [30, 31, 34] | ||
| api-level: [30] |
There was a problem hiding this comment.
I'll check and update the API levels in a followup.
There was a problem hiding this comment.
We need a tiny bump on the .NET SDK here that hardcodes isAOT = false to fix some false positives on older Unity versions.
| PlayerSettings.SetIl2CppCodeGeneration(NamedBuildTarget.FromBuildTargetGroup(group), UnityEditor.Build.Il2CppCodeGeneration.OptimizeSpeed); | ||
| #elif UNITY_2021_2_OR_NEWER | ||
| EditorUserBuildSettings.il2CppCodeGeneration = UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize; | ||
| EditorUserBuildSettings.il2CppCodeGeneration = UnityEditor.Build.Il2CppCodeGeneration.OptimizeSpeed; |
There was a problem hiding this comment.
A more likely setting for actual release builds.
| #if !UNITY_EDITOR | ||
| t.ExpectMessage(currentMessage, "'op':'awake','description':'Main Camera.SmokeTester'"); // auto instrumentation | ||
| #endif |
There was a problem hiding this comment.
The current change from having a TestLauncher instead of having the MonoBehaviour already available during scene load makes this unfeasible. We can add this back in after the migration.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| // Wait for the crash report to be sent | ||
| yield return new WaitForSeconds(10); | ||
|
|
||
| SentrySdk.FlushAsync(TimeSpan.FromSeconds(5)).GetAwaiter().GetResult(); |
There was a problem hiding this comment.
Blocking FlushAsync on main thread risks deadlock
Medium Severity
SentrySdk.FlushAsync(TimeSpan.FromSeconds(5)).GetAwaiter().GetResult() blocks Unity's main thread inside a coroutine. If the Sentry Unity SDK uses UnityWebRequestTransport (which processes HTTP via main-thread coroutines), blocking the main thread prevents those requests from completing, creating a deadlock. The 5-second timeout also can't fire because Unity's update loop is frozen. A coroutine-friendly approach (polling task.IsCompleted with yield return null) would allow the main thread to keep pumping while waiting for flush completion.


#skip-changelog