- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我一遍又一遍地查看这个实时应用程序崩溃日志,但找不到问题所在:
1 CoreFoundation _CFHash + 130
2 CoreFoundation CFBasicHashFindBucket + 724
3 CoreFoundation _CFDictionaryGetValue + 99
4 CoreFoundation -[CFXPreferencesPropertyListSource setValue:forKey:] + 39
5 CoreFoundation _CFXPreferencesSetValue + 139
6 CoreFoundation _CFPreferencesSetAppValue + 45
7 Foundation -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 61
8 MyApp -[MKStoreManager rememberPurchaseOfProduct:withReceipt:] (MKStoreManager.m:884)
9 MyApp -[MKStoreManager provideContent:forReceipt:hostedContent:] (MKStoreManager.m:848)
10 MyApp -[MKStoreManager restoreTransaction:] (MKStoreManager.m:1004)
11 MyApp -[MKStoreManager paymentQueue:updatedTransactions:] (MKStoreManager.m:911)
12 StoreKit __NotifyObserverAboutChanges + 85
这是我认为与崩溃相关的代码(es!):
- (void)rememberPurchaseOfProduct:(NSString*) productIdentifier withReceipt:(NSData*) receiptData {
NSDictionary *allConsumables = [[MKStoreManager storeKitItems] objectForKey:@"Consumables"];
if([[allConsumables allKeys] containsObject:productIdentifier])
{
NSDictionary *thisConsumableDict = [allConsumables objectForKey:productIdentifier];
NSInteger quantityPurchased = [[thisConsumableDict objectForKey:@"Count"] integerValue];
NSString* productPurchased = [thisConsumableDict objectForKey:@"Name"];
NSInteger oldCount = [[MKStoreManager numberForKey:productPurchased] integerValue];
NSInteger newCount = oldCount + quantityPurchased;
[MKStoreManager setObject:[NSNumber numberWithInteger:newCount] forKey:productPurchased];
}
else
{
[MKStoreManager setObject:[NSNumber numberWithBool:YES] forKey:productIdentifier];
//set flag in NSUserDefaults as another place we chan check to see if they have purchased the app
//we may not want to check this, however, as an OR, since it can be easily jailbroken
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:productIdentifier];
[[NSUserDefaults standardUserDefaults] synchronize];
}
[MKStoreManager setObject:receiptData forKey:[NSString stringWithFormat:@"%@-receipt", productIdentifier]];
}
多年来我一直在使用相同的代码,没有任何问题。谁能帮我指出正确的方向?
更新:在下面发布完整的崩溃日志
Incident Identifier: 07EF534E-E37C-4AF3-982A-11D6997A0D5C
CrashReporter Key: CE01293A-021D-4DAD-BFA9-7F24957608B7
Hardware Model: iPhone6,1
Process: MyApp [1590]
Path: /Users/USER/MyApp.app/MyApp
Identifier: com.mysoftware.myapp
Version: 1.3.1
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-11-04T18:31:48Z
OS Version: iPhone OS 7.0.3 (11B511)
Report Version: 104
Exception Type: SIGTRAP
Exception Codes: #0 at 0x2fdd01be
Crashed Thread: 0
Thread 0 Crashed:
0 CoreFoundation 0x2fdd01be _CFHash + 130
1 CoreFoundation 0x2fdccb6c CFBasicHashFindBucket + 724
2 CoreFoundation 0x2fdcc873 _CFDictionaryGetValue + 99
3 CoreFoundation 0x2fe14ab3 -[CFXPreferencesPropertyListSource setValue:forKey:] + 39
4 CoreFoundation 0x2fe14a2f _CFXPreferencesSetValue + 139
5 CoreFoundation 0x2fe14905 _CFPreferencesSetAppValue + 45
6 Foundation 0x307d0a55 -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 61
7 MyApp 0x00134d59 -[MKStoreManager rememberPurchaseOfProduct:withReceipt:] (MKStoreManager.m:884)
8 MyApp 0x0013496d -[MKStoreManager provideContent:forReceipt:hostedContent:] (MKStoreManager.m:848)
9 MyApp 0x0013538f -[MKStoreManager restoreTransaction:] (MKStoreManager.m:1004)
10 MyApp 0x00134ed5 -[MKStoreManager paymentQueue:updatedTransactions:] (MKStoreManager.m:911)
11 StoreKit 0x325b6e85 __NotifyObserverAboutChanges + 85
12 CoreFoundation 0x2fdd2ea1 _CFArrayApplyFunction + 37
13 StoreKit 0x325b6e21 -[SKPaymentQueue _notifyObserversAboutChanges:sendUpdatedDownloads:] + 129
14 StoreKit 0x325b76f9 -[SKPaymentQueue _processUpdates:trimUnmatched:sendUpdatedDownloads:] + 1017
15 StoreKit 0x325b7dc9 -[SKPaymentQueue _setTransactionsWithReply:] + 129
16 StoreKit 0x325b69bf __38-[SKPaymentQueue _establishConnection]_block_invoke_2 + 63
17 libdispatch.dylib 0x3a6e50c3 _dispatch_call_block_and_release + 11
18 libdispatch.dylib 0x3a6e50af _dispatch_client_callout + 23
19 libdispatch.dylib 0x3a6e79a9 __dispatch_main_queue_callback_4CF + 269
20 CoreFoundation 0x2fe6a5b1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21 CoreFoundation 0x2fe68e7d __CFRunLoopRun + 1309
22 CoreFoundation 0x2fdd3471 _CFRunLoopRunSpecific + 525
23 CoreFoundation 0x2fdd3253 _CFRunLoopRunInMode + 107
24 GraphicsServices 0x34b072eb _GSEventRunModal + 139
25 UIKit 0x32688845 _UIApplicationMain + 1137
26 MyApp 0x00083fff main (main.m:4)
Thread 1:
0 libsystem_kernel.dylib 0x3a79d838 _kevent64 + 24
1 libdispatch.dylib 0x3a6e6623 _dispatch_mgr_thread + 39
Thread 2:
0 libsystem_kernel.dylib 0x3a79da84 _mach_msg_trap + 20
1 CoreFoundation 0x2fe6a559 __CFRunLoopServiceMachPort + 157
2 CoreFoundation 0x2fe68c79 __CFRunLoopRun + 793
3 CoreFoundation 0x2fdd3471 _CFRunLoopRunSpecific + 525
4 CoreFoundation 0x2fdd3253 _CFRunLoopRunInMode + 107
5 WebCore 0x37d9a0c5 RunWebThread(void*) + 421
6 libsystem_pthread.dylib 0x3a816c5d _pthread_body + 141
7 libsystem_pthread.dylib 0x3a816bcf __pthread_start + 103
Thread 3:
0 libsystem_kernel.dylib 0x3a79da84 _mach_msg_trap + 20
1 CoreFoundation 0x2fe6a559 __CFRunLoopServiceMachPort + 157
2 CoreFoundation 0x2fe68c79 __CFRunLoopRun + 793
3 CoreFoundation 0x2fdd3471 _CFRunLoopRunSpecific + 525
4 CoreFoundation 0x2fe170db _CFRunLoopRun + 99
5 CoreMotion 0x3048b369 _CLSF_thorntonUpdate_6x6 + 57225
6 libsystem_pthread.dylib 0x3a816c5d _pthread_body + 141
7 libsystem_pthread.dylib 0x3a816bcf __pthread_start + 103
Thread 4:
0 libsystem_kernel.dylib 0x3a7b0c7c ___workq_kernreturn + 8
Thread 5:
0 libsystem_kernel.dylib 0x3a7b0c7c ___workq_kernreturn + 8
Thread 6:
0 libsystem_kernel.dylib 0x3a7b0c7c ___workq_kernreturn + 8
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x2fdd013d r2: 0x00000000 r3: 0x00000304
r4: 0x00000000 r5: 0x00000004 r6: 0x00000000 r7: 0x004bb994
r8: 0x1752fd80 r9: 0x176e45a8 r10: 0x2ff063d0 r11: 0x3a9aa5c4
ip: 0x2fdd53c9 sp: 0x004bb98c lr: 0x2fdccb6c pc: 0x2fdd01be
cpsr: 0x60000030
Binary Images:
0x81000 - 0x202fff + MyApp armv7s <fc1bc90151cf30da9de8889a1115ae51> /Users/USER/MyApp.app/MyApp
0x2eb73000 - 0x2eb8efff libJapaneseConverter.dylib armv7s <f248c9d2ab0c3a2c96b4afbb5f30e6f1> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib
0x2ed2f000 - 0x2ee30fff AVFoundation armv7s <759b362f09e53f37a2ec82372a95d1de> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
0x2ee31000 - 0x2ee59fff libAVFAudio.dylib armv7s <0925efab4dd338e382aa5b10cdbed33f> /System/Library/Frameworks/AVFoundation.framework/libAVFAudio.dylib
0x2ee5a000 - 0x2ee5afff Accelerate armv7s <9340338f3cdf347abe4a88c2f59b5b12> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x2ee64000 - 0x2f031fff vImage armv7s <479b5c4701833284ab587a1d2fdb5627> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage
0x2f032000 - 0x2f114fff libBLAS.dylib armv7s <da4fa367557d3028b02458e2cdf6d84d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x2f115000 - 0x2f3d0fff libLAPACK.dylib armv7s <066ea8372dd23f6d89011f9a4a872d6f> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x2f3d1000 - 0x2f43ffff libvDSP.dylib armv7s <a5dcfe68199839b989c7be120c14ccb4> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x2f440000 - 0x2f452fff libvMisc.dylib armv7s <ea636bbda5ee33119a4e731aed02fa31> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib
0x2f453000 - 0x2f453fff vecLib armv7s <663aefa25bc5367baa72ca144ac26d18> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x2f454000 - 0x2f473fff Accounts armv7s <811f7e5dcd353c57af6d6de859848774> /System/Library/Frameworks/Accounts.framework/Accounts
0x2f474000 - 0x2f474fff AdSupport armv7s <fa30d96d0a333568826efd5aad83097a> /System/Library/Frameworks/AdSupport.framework/AdSupport
0x2f475000 - 0x2f4dafff AddressBook armv7s <cc733c2c249e3161a9af19a44aeb1577> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x2f4db000 - 0x2f5ecfff AddressBookUI armv7s <8f681556d73d3ee5b9bfead2a124927c> /System/Library/Frameworks/AddressBookUI.framework/AddressBookUI
0x2f5ed000 - 0x2f5fefff AssetsLibrary armv7s <4c426c7f5e3930f0bd01d3e1f17f0392> /System/Library/Frameworks/AssetsLibrary.framework/AssetsLibrary
0x2f743000 - 0x2fa5ffff AudioToolbox armv7s <f49f28790aa036c08e5573071a7e2870> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x2fa60000 - 0x2fb65fff CFNetwork armv7s <36562cff956f38a09956da9218198ccf> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x2fb66000 - 0x2fbc1fff CoreAudio armv7s <34f47ad0c4d530249298888a1217316f> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x2fbc2000 - 0x2fbd8fff CoreBluetooth armv7s <0211d5169d0d3838a9cbb9dd5086a312> /System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth
0x2fbd9000 - 0x2fdcafff CoreData armv7s <4ed490c5fd693fefac89d75a47eab553> /System/Library/Frameworks/CoreData.framework/CoreData
0x2fdcb000 - 0x2ff0efff CoreFoundation armv7s <37c6b3b7abca3774bec8fecf79f07013> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x2ff0f000 - 0x30033fff CoreGraphics armv7s <e13cbd4115dc3113b875de88b92744f8> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x30035000 - 0x30070fff libCGFreetype.A.dylib armv7s <4be02e4373903a7d8295e4e0859326ab>
(太长了所以无法发布其余部分,但如果有人认为它可能有帮助,我可以将其添加到评论中)
最佳答案
productIdentifier
是 nil
正如@rmaddy 在评论中建议的那样。其他开发人员在 MKStoreKit
Github 问题上报告了这个问题 https://github.com/MugunthKumar/MKStoreKit/pull/176
建议的修复在这里:https://github.com/dfabulich/MKStoreKit/commit/4b8adb442f1d7b7a9541feab5e319969369d3f95作者:Dan Fabulich(不是我)。
在 MKStoreManager.m
-(void) provideContent: (NSString*) productIdentifier
在顶部添加一个 nil
检查:
if (!productIdentifier) {
NSLog(@"productIdentifier is nil; Apple bug?");
return;
}
关于ios - MKStoreKit 在 iOS 7 上崩溃并出现 SIGTRAP 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19773649/
我有一段代码看起来像这样: void update_clock(uint8_t *time_array) { time_t time = *((time_t *) &time_array[0]
应用程序崩溃了 :( 请帮助我.. 在这方面失败了。我找不到错误?该应用程序可以连接到 iTunesConnect 但它会出错。 谁能根据下面的崩溃报告判断问题出在哪里? share_with_app
小二是新来的实习生,作为技术 leader,我给他安排了一个非常简单的练手任务,把前端 markdown 编辑器里上传的图片保存到服务器端,结果他真的就把图片直接保存到了服务器上,这下可把我气坏了,就
我正在创建一个函数,它将目录路径作为参数传递,或者如果它留空,则提示用户输入。 我已经设置了我的 PATH_MAX=100 和 if 语句来检查 if ((strlen(folder path) +
我已将“arial.ttf”文件(从我的/Windows/Fonts 文件夹中获取)加载到内存中,但是将其传递到 FT_New_Memory_Face 时会崩溃(在 FT_Open_Face 中的某处
我正在尝试在我的计算机上的两个控制台之间进行 rtsp 流。 在控制台 1 上,我有: ffmpeg -rtbufsize 100M -re -f dshow -s 320x240 -i video=
我正在尝试使用 scio_beast在一个项目中。我知道它还没有完成,但这并不重要。我已经设法让它工作得很好。 我现在正在尝试连接到 CloudFlare 后面的服务器,我知道我需要 SNI 才能工作
我有一个带有关联宏的下拉列表,如下所示: Sub Drop() If Range("Hidden1!A1") = "1" Then Sheets("Sheet1").Se
我对 bash 很陌生。我要做的就是运行这个nvvp -vm /usr/lib64/jvm/jre-1.8.0/bin/java无需记住最后的路径。我认为 instafix 就是这样做...... n
我在 Windows 上使用 XAMPP 已经两年左右了,它运行完美,没有崩溃没有问题。 (直到四个月前。) 大约四个月前,我们将服务器/系统升级到了更快的规范。 这是旧规范的内容 - Windows
我面临着一个非常烦人的 android 崩溃,它发生在大约 1% 的 PRODUCTION session 中,应用程序始终在后台运行。 Fatal Exception: android.app.Re
尝试使用下面的函数: public void createObjectType() { try { mCloudDB.createObjectType(ObjectTypeIn
由于我正在进行的一个项目,我在 CF11 管理员中弄乱了类路径,我设法使服务器崩溃,以至于我唯一得到的是一个漂亮的蓝屏和 500 错误.我已经检查了日志,我会把我能做的贴在帖子的底部,但我希望有人会启
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 10 个月前关闭。 Improve
我最近从 xcode 3.x 更新到 4.2,当我在 4.2 中运行应用程序时,我遇到了核心数据问题。我还更新到了 iOS 5,所以问题可能就在那里,我不太确定。 这些应用程序在 3.x 中运行良好,
我是一个相对较新的 iPhone 应用程序开发人员,所以我的知识有点粗略,所以如果这是一个微不足道的问题,请原谅我。 我有一个导航应用程序,它通过在navigationController对象上调用p
if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailViewController
你能帮我吗? 我正在设置 UILocalNotification,当我尝试设置其 userInfo 字典时,它崩溃了。 fetchedObjects 包含 88 个对象。 这是代码: NSDi
为什么我的代码中突然出现 NSFastEnumeration Mutation Handler 崩溃。我很茫然为什么会突然出现这个崩溃以及如何解决它。 最佳答案 崩溃错误: **** 由于未捕获的异常
当我从表中删除行时,我的应用程序崩溃了。这是我检测到错误和堆栈跟踪的来源。谢谢! //delete row from database - (void)tableView:(UITableView *
我是一名优秀的程序员,十分优秀!