Comments (4)
My current workaround is to add a try-catch to unarchiveEvents, and remove the event file if the unarchiver fails:
- (void)unarchiveEvents {
@try {
self.eventQueue = [NSKeyedUnarchiver unarchiveObjectWithFile:[self eventFilePath]];
}
@catch (NSException *exception) {
[[NSFileManager defaultManager] removeItemAtPath:[self eventFilePath] error:nil];
self.eventQueue = nil;
}
if (!self.eventQueue) {
self.eventQueue = [NSMutableArray array];
}
}
from mixpanel-iphone.
Hey,
Thanks for reporting this. I've put the try-catches in the unarchive methods. That should prevent any more app crashes.
I'm wondering how this could've happened. Were you updating from a previous version of the library or was this a brand new implementation?
from mixpanel-iphone.
Hay kasrak,
A few of our users ran into this while using our live app store version. Our app store version has an older mixpanel SDK (preceding the people additions). I got a tester who experienced this issue to run a fresh build with the above SHA version, and got that crash report back.
Unfortunately all I have are guesses as to the cause, since I can't reproduce this myself. The tester reported running out of disk space while using our app, after which point the app would crash on launch. Perhaps the archive operation leaves the file in a corrupt state when there's not enough disk space. I also store some error data (error domain, code, description) in properties which might might have been malformed somehow. How does NSKeyedArchiver deal with objects that don't implement NSCoding?
from mixpanel-iphone.
Sounds like we're a go with the try/catches, and we haven't had any reported issues with the KeyedArchiver in the meantime. Please feel free to reopen if you're experiencing more issues with it.
from mixpanel-iphone.
Related Issues (20)
- Mixpanel.h can not be found HOT 2
- Hope to improve
- K HOT 1
- Only tvOS Pre-Compiled Framework is Available via Github Release and Carthage HOT 2
- Crash on FlushRequest.sendRequest(_:type:useIP:completion:) HOT 1
- github "mixpanel/mixpanel-iphone"
- Import via SPM doesn't display the latest version: blocks the use of SPM integration HOT 1
- Add indexes and enable WAL mode on SQLite
- Event tracking doesn't work in App Extension HOT 1
- How to dynamically enable/disable the sdk? HOT 1
- Release v5.0.2
- 26575 (576×533)
- Support Privacy Manifest in Mixpanel objective C Library HOT 1
- v5.0.5 not have PrivacyInfo.xcprivacy HOT 4
- Remove automatic Integration event (has also been removed at the android library)
- Crash on [MPDB readRows:numRows:flag:] HOT 1
- Undefined Symbols
- Crash on [MPVariantAction executeSelector:withArgs:onObjects:]. HOT 1
- Cannot build using Carthage on Xcode 14 beta 5 - schema confusion HOT 2
- MixPanel for watchOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mixpanel-iphone.