草庐IT

exc_info

全部标签

ios - Swift append to array 在 32 位系统上给我 EXC_BAD_INSTRUCTION EXC_l386_INVOP

所以我尝试解析一个字符串并用转换为字符串的每个字符填充一个数组,我还删除了空格。部分代码如下:classKeyboardView:UIView{varanswer:AnyObject?varkeyboardLetters=[String]()overridefuncwillMoveToSuperview(newSuperview:UIView?){forletterinanswer!asString{ifletter!=""{keyboardLetters.append(String(letter).lowercaseString)}}}}当我删除for循环时,错误消失,并且只发生在i

iphone - 从 Info 中删除 LaunchScreen 后屏幕未满

我不需要在LaunchScreen中,所以我从XCode的myApp->Info中删除了这一行。但在删除这些行后,我的屏幕变成了:它不是全屏。你看到黑色部分了吗?我该如何解决? 最佳答案 为所有屏幕尺寸添加启动图像,这就是iOS确定支持的设备尺寸的方式。启动图像是给用户初始反馈而不是呈现黑屏的好主意-但如果这是您想要的,请制作一组黑色图像。 关于iphone-从Info中删除LaunchScreen后屏幕未满,我们在StackOverflow上找到一个类似的问题:

ios - 收到此错误 : thread 1: exc_bad_instruction(code=exc_i386_invop, subcode=0x0)

我在swift2.0中开发了一个iOS应用程序,并使用了一个名为Reachability的类来确定用户是否连接到互联网。应用程序运行,但编译器停止并输出此错误:thread1:exc_bad_instruction(code=exc_i386_invop,subcode=0x0)这里是代码,注释处出错funcupdateInterfaceWithReachability(reachability:Reachability){ifreachability==self.hostReachability{self.checkStatus(reachability)letnetStatus:N

swift - Domain=LaunchServicesError Code=0,Error=MissingBundleIdentifier,其 Info.plist 中没有 CFBundleIdentifier

这是模拟器日志中的错误com.apple.dt.Xcode[667]:ErrorDomain=LaunchServicesErrorCode=0"(null)"UserInfo={Error=MissingBundleIdentifier,ErrorDescription=Bundleatpath/Users/Monica/Library/Developer/CoreSimulator/Devices/A20C808A-5E72-4B1D-847C-AD6C18B479E9/data/Library/Caches/com.apple.mobile.installd.staging/te

ios - NSLocale NSLocaleCalendar 导致 EXC_BAD_ACCESS

我正在使用以下文档-https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/index.html#//apple_ref/occ/clm/NSLocale/localeIdentifierFromComponents:如果链接没有跳转到页面的正确部分,请查找localeIdentifierFromComponents(_:)。XCode7.2Playgroundprint(NSLocale.localeIdentifierFromCom

ios - Swift CoreData EXC_BAD_INSTRUCTION(代码=EXC_I386_INVOP,子代码=0x0)

我正在尝试使用CoreData,但每当我尝试存储对象时,我都会收到EXC_BAD_INSTRUCTION(代码=EXC_I386_INVOP,子代码=0x0)错误。可能导致此错误的原因是什么?附带说明一下,我最初创建项目时并没有打算使用CoreData,所以CoreData是我后来添加到我的项目中的东西(我不知道这是否是导致问题的原因)。lazyvarmanagedObjectModel:NSManagedObjectModel={//Themanagedobjectmodelfortheapplication.Thispropertyisnotoptional.Itisafatale

ios - EXC_BAD_ACESS 在 iOS8 上的 SpriteKit 中崩溃

我在尝试更改SKSpriteNode的位置时遇到了一个非常奇怪的崩溃。此崩溃发生在iOS8而不是iOS9。//ifthepowerupisfull,spawntheicononscreeniforangeBallsCollected==numberOfBallsRequiredToActivatePowerup{//addthepowerupicontothearrayofpowerupiconsonscreenpowerupIconsOnScreen.append(fewerColorsPowerupIcon)//setthelightingmaskofthepowerupicons

ios - 错误 - 线程 1 exc_bad_instruction(代码=exc_1386_invop 子代码=0x0)

我对这段代码有疑问-overridefuncdidReceiveMemoryWarning(){super.didReceiveMemoryWarning()//Disposeofanyresourcesthatcanberecreated.}funcget(){leturl=NSURL(string:"http://www..php")letdata=NSData(contentsOfURL:url!)values=try!NSJSONSerialization.JSONObjectWithData(data!,options:NSJSONReadingOptions.Mutable

Swift dispatch_async 导致 EXC_BAD_ACCESS 错误

在我的Swift项目中,我试图在后台线程中处理一个FIFO队列(我在这里将其称为列表以避免混淆)。当我使用dispatch_async时,它会在仅执行列表的某些部分后导致EXC_BAD_ACCESS错误。我已尽可能将代码简化为以下Playground代码。在playground中,当main_thread设置为true时,代码会处理列表中的所有100个项目。如果为假,则只会处理少数项目。如果代码在项目中,当main_thread为false时会出现EXC_BAD_ACCESS。显然,我也尝试过指定一个串行队列,但这似乎没有帮助。我缺少或不理解什么?谢谢。importUIKitletma

swift - 为什么强制展开会给我一个 EXC_BREAKPOINT (SIGTRAP) 错误?

我的应用程序在声明我的for循环forparticipantinevent.attendees!时崩溃。我对swift比较陌生,我知道如果我检查attendees数组不为nil,那么我可以自由地强制解包它。我在这里误解了什么?privatestaticfuncparseParticipants(event:EKEvent)->[Attendee]{varparticipants=[Attendee]()if(event.attendees!=nil&&event.attendees?.count!=0){forparticipantinevent.attendees!{letparti