Ios 调用NSRegularExpression:matcheInstalling时出现分段错误

Ios 调用NSRegularExpression:matcheInstalling时出现分段错误,ios,objective-c,segmentation-fault,nsregularexpression,Ios,Objective C,Segmentation Fault,Nsregularexpression,启动时,我的(已部署)iOS应用程序发生崩溃。看起来它发生在一些lib函数中,我不确定这是怎么回事。控制台输出显示 Oct 15 17:05:42 iPadMiniR MyApp[260] <Warning>: INFO: downloading package data 5 of 5... Oct 15 17:05:42 iPadMiniR ReportCrash[261] <Error>: task_set_exception_ports(B07, 400, D03,

启动时,我的(已部署)iOS应用程序发生崩溃。看起来它发生在一些lib函数中,我不确定这是怎么回事。控制台输出显示

Oct 15 17:05:42 iPadMiniR MyApp[260] <Warning>: INFO: downloading package data 5 of 5...
Oct 15 17:05:42 iPadMiniR ReportCrash[261] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
Oct 15 17:05:42 iPadMiniR ReportCrash[261] <Notice>: ReportCrash acting against PID 260
Oct 15 17:05:42 iPadMiniR diagnosticd[150] <Error>: error evaluating process info - pid: 260, punique: 260
Oct 15 17:05:42 iPadMiniR ReportCrash[261] <Notice>: Formulating crash report for process myApp[260]
我知道Segfault是什么,但我不明白为什么它会发生在库函数中。我已经在苹果的开发者文档中搜索了(在
EnumerateMatchesInstalling:options:range:usingBlock:
MatchesInstalling:options:range:
)并在谷歌上搜索了
NSSimpleRegularExpressionCheckingResult
,但我没有找到任何有用的东西。在StackOverflow的类似问题中,SIGSEGV不是出现在库函数中,而是出现在用户代码中

我的问题是:在这种情况下,Segfault如何发生?objective-C-Library-Functions不检查指针吗?或者可能是指针在检查和使用之间摇摆不定(弱指针,但我没有)

我对iOS开发相当陌生,因此感谢您的帮助:)


我使用XCode 6.0.1和iOS 8.0.2。

您用来解码崩溃报告的符号表可能与构建中的符号表不匹配;这将导致不正确的符号出现在崩溃报告中。您是否100%确定使用了正确的断点?请尝试添加异常断点(在断点导航器-第7个选项卡中),然后再次运行代码。因此,您的应用程序将停止在异常所在的正确位置。
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000058
Triggered by Thread:  4
[...]
Thread 4 name:  Dispatch queue: com.apple.root.default-qos
Thread 4 Crashed:
0   libobjc.A.dylib                 0x00000001946d3bd0 objc_msgSend + 16
1   Foundation                      0x0000000184ac884c -[NSSimpleRegularExpressionCheckingResult initWithRanges:count:regularExpression:] + 176
2   Foundation                      0x0000000184aaf2a4 -[NSRegularExpression(NSMatching) enumerateMatchesInString:options:range:usingBlock:] + 1340
3   Foundation                      0x0000000184ac8720 -[NSRegularExpression(NSMatching) matchesInString:options:range:] + 152
4   myApp                           [...]