MyApp在98%的情况下运行良好,但有时它会显示崩溃.它如此随机.
崩溃报告显示以下内容.
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x3b1ae626 objc_msgSend + 5
1 Foundation 0x310e2381 _netServiceMonitorCallBack + 104
2 CFNetwork 0x302ea3b5 _QueryRecordReply(_DNSServiceRef_t*, unsigned int, unsigned int, int, char const*, unsigned short, unsigned short, unsigned short, void const*, unsigned int, void*) + 324
3 libsystem_dnssd.dylib 0x3b7289d9 handle_query_response + 168
4 libsystem_dnssd.dylib 0x3b72773f DNSServiceProcessResult + 582
5 CFNetwork 0x302ea3e5 _SocketCallBack_Mon(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 20
6 CoreFoundation 0x30691189 __CFSocketPerformV0 + 580
7 CoreFoundation 0x3068efaf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
8 …Run Code Online (Sandbox Code Playgroud) 我在生产应用程序中遇到了一些奇怪的coredata错误,并且能够掌握崩溃报告。
有时会崩溃并显示以下消息
***对象0x17e400000的错误:释放未分配的指针
***对象0x17fd03730的错误:未分配指针
这是堆栈跟踪
Crashed: SQLQueue 0x13ff15250 for datastore.sqlite
SIGABRT ABORT 0x0000000183986014
0 libsystem_kernel.dylib __pthread_kill + 8
1 libsystem_pthread.dylib pthread_kill + 112
2 libsystem_c.dylib abort + 140
3 libsystem_malloc.dylib _nano_vet_and_size_of_live + 330
4 libsystem_malloc.dylib nano_free + 220
5 libsqlite3.dylib sqlite3_finalize + 244
6 CoreData -[NSSQLiteConnection _finalizeStatement] + 100
7 CoreData -[NSSQLiteConnection releaseSQLStatement] + 52
8 CoreData newFetchedRowsForFetchPlan_MT + 2420
9 CoreData _executeFetchRequest + 72
10 CoreData -[NSSQLFetchRequestContext executeRequestUsingConnection:] + 60
11 CoreData __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 260
12 libdispatch.dylib _dispatch_client_callout …Run Code Online (Sandbox Code Playgroud) 我们可以NSLayoutConstraint在self.navigationcontroller.navigationbar里面添加一个视图和一个视图self.view.这里self是一个UIViewController实例,_textField是一个子视图self.view
我需要的是UI看起来应该是相似的,无论是否navigationBar是半透明.
我尝试了以下内容.但它不起作用.
NSLayoutConstraint* cn = [NSLayoutConstraint constraintWithItem:_textField
attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual
toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeBottom
multiplier:1.0 constant:20];
[self.navigationcontroller.view addConstraint:cn];
Run Code Online (Sandbox Code Playgroud) 这是Xcode中的错误消息:在检查/Path/image@2x.png pngcrush捕获的alpha时libpng error: Not enough image dCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure
但即使出现此错误,应用程序也正常运行.甚至图像也在运行iOS 6.0的iPhone 4上加载
我尝试删除图像并再次添加.还尝试将其保存到预览中的png中.
ios ×4
objective-c ×3
autolayout ×1
cfnetwork ×1
core-data ×1
ios6 ×1
ios7.1 ×1
libpng ×1
nsautolayout ×1
pngcrush ×1