mutualmobile / MMWormhole

Message passing between iOS apps and extensions.
MIT License
3.93k stars 310 forks source link

Crashed at MMWormholeCoordinatedFileTransiting.m:70 because of -[NSURL initFileURLWithPath:]: nil string parameter #82

Open DamonChen117 opened 7 years ago

DamonChen117 commented 7 years ago

-[NSURL initFileURLWithPath:]: nil string parameter

0 CoreFoundation __exceptionPreprocess + 132
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation -[NSException encodeWithCoder:] + 0
3 Foundation -[NSURL(NSURL) initFileURLWithPath:] + 144
4 Foundation +[NSURL(NSURL) fileURLWithPath:] + 64
5 MMWormhole -[MMWormholeCoordinatedFileTransiting messageObjectForIdentifier:] (MMWormholeCoordinatedFileTransiting.m:70)
6 MMWormhole -[MMWormhole didReceiveMessageNotification:] (MMWormhole.m:178)
7 CoreFoundation

Should check if filePath is nil before calling [NSURL fileURLWithPath:filePath]

cnstoll commented 7 years ago

Interesting. I can buy that. Do you know why the file was nil? Was this a configuration error or a runtime user related error?

DamonChen117 commented 7 years ago

@cnstoll It's a runtime user related error. We have about 40,000 active users, just got 2 crashes reported by XCode. I don't know why the file was nil.