Skip to content

fix: Crash in MPSession description#661

Merged
denischilik merged 2 commits intomainfrom
fix/crash_in_MPSession_description
Mar 10, 2026
Merged

fix: Crash in MPSession description#661
denischilik merged 2 commits intomainfrom
fix/crash_in_MPSession_description

Conversation

@denischilik
Copy link
Contributor

Background

Fixes a crash that could occur when MPSession properties were accessed concurrently during session persistence. The root cause was thread-unsafe access to session properties when building the description string, combined with a deprecated MPListenerController callback.

What Has Changed

  • Made MPSession properties atomic for thread-safe concurrent access
  • Removed deprecated MPListenerController callback from session persistence path
  • Cached MParticle shared instance in beginSessionWithIsManual to avoid redundant lookups and potential race conditions

Screenshots/Video

N/A

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Reference Issue (For employees only. Ignore if you are an outside contributor)

@denischilik denischilik requested a review from a team as a code owner March 10, 2026 17:28
@github-actions
Copy link

github-actions bot commented Mar 10, 2026

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact 1.82 MB 1.82 MB +N/A
Executable Impact 896 bytes 896 bytes +N/A
XCFramework Size 9.49 MB 9.48 MB -4 KB

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (main):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1944,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1860,"sdk_executable_impact_bytes":896,"xcframework_size_kb":9716}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1944,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1860,"sdk_executable_impact_bytes":896,"xcframework_size_kb":9712}

Remove call to MPListenerController because it deprecated
@denischilik denischilik force-pushed the fix/crash_in_MPSession_description branch from a556410 to 70790e1 Compare March 10, 2026 17:53
Copy link
Collaborator

@BrandonStalnaker BrandonStalnaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@denischilik denischilik merged commit dd6c80f into main Mar 10, 2026
15 checks passed
@denischilik denischilik deleted the fix/crash_in_MPSession_description branch March 10, 2026 19:14
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