[英]I don't understand this iOS stack trace from BugSense/Mint… where is my code actually crashing at?
My app here is named Movies
. 我在这里的应用程序名为Movies
。 I am using Splunk Mint (formerly BugSense) to capture crash reports. 我正在使用Splunk Mint(以前为BugSense)捕获崩溃报告。 I recently updated to their new 4.0 SDK. 我最近更新到了他们的新4.0 SDK。 Here is a crash report today that I don't understand. 今天是我不明白的崩溃报告。 At what line exactly is the crash happening in my code? 崩溃在我的代码中确切发生在哪一行?
Crash is: NSInvalidArgumentException *** -[NSPlaceholderString initWithString:]: nil argument
崩溃为: NSInvalidArgumentException *** -[NSPlaceholderString initWithString:]: nil argument
You would think line #4? 您会认为第4行? But I have no idea what the heck URLBlackListManager
is. 但是我不知道到底什么是URLBlackListManager
。 Or is it line #0, a crash inside of MKSKProduct
(the code I've been using for years to make in-app purchases easy), but then why would it say it's coming from CoreFoundation
? 还是0号线, MKSKProduct
内部崩溃(我多年来使用的代码使应用内购买变得容易),但是为什么它说它来自CoreFoundation
? Or is it line #10, the last line that Movies
actually gets called with my code? 还是第10行,即我的代码实际上调用了Movies
的最后一行?
And I have NO clue what SplunkNSURLConnectionSendSynchronousRequestReturningResponseError
is and their website doesn't have any info on it. 而且我不知道什么是SplunkNSURLConnectionSendSynchronousRequestReturningResponseError
,而且他们的网站上没有任何信息。
I have been unable to report the crash, but it's happened at least 10 times on different devices for different people. 我无法报告崩溃,但是在不同设备上针对不同人群发生了至少10次。
I'm a bit confused... anyone have any ideas? 我有点困惑...任何人有任何想法吗?
0 CoreFoundation -[MKSKProduct verifyReceiptOnComplete:onError:] (in Movies) (MKSKProduct.m:196) + 868307
1 libobjc.A.dylib _mh_execute_header (in Movies) + 15567
2 CoreFoundation -[MKSKProduct verifyReceiptOnComplete:onError:] (in Movies) (MKSKProduct.m:190) + 868117
3 Foundation -[CollectionViewController collectionView:didSelectItemAtIndexPath:] (in Movies) (CollectionViewController.m:227) + 154361
4 Movies -[URLBlackListManager containsURL:] (in Movies) + 129
5 Movies SplunkNSURLConnectionSendSynchronousRequestReturningResponseError (in Movies) + 453
6 Foundation -[SettingsViewController tableView:didSelectRowAtIndexPath:] (in Movies) (SettingsViewController.m:278) + 292459
7 Foundation -[SettingsViewController tableView:didSelectRowAtIndexPath:] (in Movies) (SettingsViewController.m:270) + 292251
8 Foundation +[MKSKProduct connection:didFailWithError:] (in Movies) (MKSKProduct.m:299)
9 Movies -[iPhoneRSS initWithURL:andItemName:] (in Movies) (iPhoneRSS.m:39) + 871897
10 Movies -[CreateUsernameViewController submit:] (in Movies) (CreateUsernameViewController.m:123) + 572531
11 UIKit -[ImportViewController setUrlTextField:] (in Movies) (ImportViewController.m:34) + 262231
12 UIKit -[ImportViewController setInstructionsLabel:] (in Movies) (ImportViewController.m:32) + 262135
13 UIKit -[ImportViewController instructionsLabel] (in Movies) (ImportViewController.m:32) + 262097
14 UIKit __43-[CollectorsAdViewController openAppStore:]_block_invoke (in Movies) (CollectorsAdViewController.m:279) + 177975
15 UIKit -[ImportViewController ebaySearchWithCountry:andBarcode:] (in Movies) (ImportViewController.m:2464) + 260687
16 UIKit -[ImportViewController ebaySearchWithCountry:andBarcode:] (in Movies) (ImportViewController.m:2427) + 259873
17 UIKit -[ImportViewController importCollectorzData:] (in Movies) (ImportViewController.m:1488) + 239339
18 UIKit -[WishlistViewController tableView:commitEditingStyle:forRowAtIndexPath:] (in Movies) (WishlistViewController.m:1187) + 63725
19 UIKit -[WishlistViewController tableView:cellForRowAtIndexPath:] (in Movies) (WishlistViewController.m:929) + 57239
20 CoreFoundation -[MainViewController optionsTouched:] (in Movies) (MainViewController.m:687) + 651867
21 CoreFoundation -[MainViewController startActivityIndicator] (in Movies) (CGGeometry.h:294) + 649003
22 CoreFoundation -[MainViewController loadUp] (in Movies) (MainViewController.m:405) + 642847
23 CoreFoundation -[WishlistViewController themeSetup] (in Movies) (WishlistViewController.m:224) + 32527
24 CoreFoundation -[WishlistViewController loadDataOffline] (in Movies) (WishlistViewController.m:214) + 31987
25 GraphicsServices -[WishlistViewController loadUp] (in Movies) (WishlistViewController.m:412) + 38499
26 UIKit -[EditImageViewController viewWillAppear:] (in Movies) (EditImageViewController.m:102) + 450925
27 Movies main (in Movies) (main.m:16) + 891191
28 libdyld.dylib _mh_execute_header (in Movies) + 6839
Here's the verifyReceiptOnComplete
code by the way from line #0 in the stack trace... let me know if you see any possible way to get a nil NSString crash anywhere here: 这是从堆栈跟踪中的第0行开始的verifyReceiptOnComplete
代码...让我知道,如果您在此处的任何地方看到任何可能的方法来使nil NSString崩溃,请执行以下操作:
- (void) verifyReceiptOnComplete:(void (^)(void)) completionBlock
onError:(void (^)(NSError*)) errorBlock
{
self.onReceiptVerificationSucceeded = completionBlock;
self.onReceiptVerificationFailed = errorBlock;
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", OWN_SERVER, @"verifyProduct.php"]];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:60];
[theRequest setHTTPMethod:@"POST"];
[theRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
NSString *receiptDataString = [self.receipt base64EncodedString];
NSString *postData = [NSString stringWithFormat:@"receiptdata=%@", receiptDataString];
NSString *length = [NSString stringWithFormat:@"%d", [postData length]];
[theRequest setValue:length forHTTPHeaderField:@"Content-Length"];
[theRequest setHTTPBody:[postData dataUsingEncoding:NSASCIIStringEncoding]];
self.theConnection = [NSURLConnection connectionWithRequest:theRequest delegate:self];
[self.theConnection start];
}
Just stumbled upon this bug myself and here is what I found: 我自己偶然发现了这个错误,这是我发现的结果:
If you use Cocoapods to install Splunk Mint Express, you get two different Pods: 如果使用Cocoapods安装Splunk Mint Express,则会得到两种不同的Pod:
$> pod search Splunk
-> SplunkMint (4.0.4)
Usage, performance and crash monitoring for your iOS apps
pod 'SplunkMint', '~> 4.0.4'
- Homepage: https://mint.splunk.com/
- Source: download.splunk.com/misc/mint/SplunkMint-iOS.framework.zip
- Versions: 4.0.4, 4.0.3, 4.0.2, 4.0.1 [master repo]
-> SplunkMint-iOS (4.0.21)
Usage, performance and crash monitoring for your iOS apps
pod 'SplunkMint-iOS', '~> 4.0.21'
- Homepage: https://mint.splunk.com/
- Source: download.splunk.com/misc/mint/SplunkMint-iOS.framework.4.0.21.zip
- Versions: 4.0.21, 4.0.17, 4.0.1 [master repo]
When I was using SplunkMint
I had the same crash but switching to SplunkMint-iOS
fixed it. 当我使用SplunkMint
我遇到了同样的崩溃,但是切换到SplunkMint-iOS
修复了它。 I don't know what the differences are between the two Pods (I didn't even have to change my code initializing Mint
) but I filed a bug to Splunk to let them know about it. 我不知道两个Pod之间有什么区别(我什至不必更改初始化Mint
代码),但我向Splunk提交了一个错误,让他们知道。
I will edit my post if I find something else, 如果发现其他问题,我将编辑我的帖子,
Hope this will help, 希望这会有所帮助,
Update: Splunk Mint (formerly BugSense) is investigating. 更新:Splunk Mint(以前为BugSense)正在调查中。 They said there may be a bug and that is why you can see SplunkNSURLConnectionSendSynchronousRequestReturningResponseError
and URLBlackListManager
in there. 他们说可能存在错误,这就是为什么您可以在其中看到SplunkNSURLConnectionSendSynchronousRequestReturningResponseError
和URLBlackListManager
的原因。 I'll edit in what they ultimately have to say. 我将编辑他们最终要说的话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.