mParticle / mparticle-apple-sdk

mParticle Apple SDK
Apache License 2.0
45 stars 66 forks source link

fix: Refactor MPUploadBuilder to attempt to eliminate rare crash in withLocation: method #262

Closed einsteinx2 closed 6 months ago

einsteinx2 commented 6 months ago

Summary

closes https://github.com/mParticle/mparticle-apple-sdk/issues/256

After some investigation, it looks like the crash is happening due to memory corruption, specifically of the messageDictionary object in the MPMessageBuilder class, but only when the withLocation: method is called. It seems that the pointer referenced invalid memory... It's unclear whether the root cause it in the SDK code or external code clobbering that memory, but in an attempt to resolve the issue I've refactored the MPMessageBuilder class in the following ways:

mparticle-automation commented 5 months ago

:tada: This PR is included in version 8.21.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: