草庐IT

0x1d244d8

全部标签

swift - 如何调试 "EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)"Swift 错误?

我需要以下代码才能运行。letillinois=College(name:"UniversityodIllinois",location:"Urbana-Champaign",numberOfStudents:35000,image:UIImage(named:"Default")!)letmissouri=College(name:"UniversityofMissouri",location:"Columbia",numberOfStudents:34658,image:UIImage(named:"MissuouriImage")!)letiowa=College(name:"U

iOS11 在 AVPlayerItemTrack.assetTrack.mediaType (Thread 1 : EXC_BAD_ACCESS (code=1, address=0x0) 上崩溃

我像这样从AVPlayerItem观察轨道属性的键值:overridefuncobserveValue(forKeyPathkeyPath:String?,ofobject:Any?,change:[NSKeyValueChangeKey:Any]?,context:UnsafeMutableRawPointer?){ifcontext==&PlayerItemObserverContext{[...morecode...]}elseifkeyPath==#keyPath(AVPlayerItem.tracks){ifletplayerItem=self.playerItem{fort

ios - 调用 UIGraphicsBeginImageContext 时出现无效上下文 0x0 错误。调用任何 Core Graphics 'AddPath' 函数时也会出现类似错误

错误就发生在这一行:UIGraphicsBeginImageContext(CGSize(width:6,height:6))它来自自定义类,如下所示:importUIKitclassbulletGroup:UIControl{varradius:CGFloat=3varbulletSpacing:CGFloat=10varnumberOfBullets=5varbulletColor=UIColor.blackColor()overridefuncdrawRect(rect:CGRect){letctx=UIGraphicsGetCurrentContext()CGContextSe

ios - 使用 Swift 的 Alamofire - "Could not cast value of type ' Swift._SwiftDeferredNSArray' (ox10a75ebb0) 到 'Photomania.PhotoInfo' (0x107ee7b90)。”

运行OSXElCap开发测试版、iOS9.0、Xcode7.0GM我正在关注RayWenderlich教程(http://www.raywenderlich.com/85080/beginning-alamofire-tutorial),但确实遇到了一些问题。在我创建请求路由器之前,我的应用程序无法运行。它构建正确,然后一旦开始加载,我就会在标题中看到调试器短语。构建错误描述为“Thread1:signalSIGABRT”。概述的行是:letimageURL=(photos.objectAtIndex(indexPath.row)as!PhotoInfo).url这是PhotoBrow

ios - CoreLocation 线程崩溃崩溃 : com. apple.CoreLocation.ConnectionClient.0x16fcb870.events

我在我们的生产应用程序中遇到了Apple的CoreLocation线程崩溃。我无法在我的测试中重现它,也很难弄清楚它是在CoreLocation内部。目前它只发生在少数人口中,但我可以看到它正在变得越来越大。Crashed:com.apple.CoreLocation.ConnectionClient.0x16fcb870.events0CoreLocation0x2aa2db54CLClientCreateIso6709Notation+536751CoreLocation0x2aa2dc7bCLClientCreateIso6709Notation+539702CoreLocati

ios - swift 中的 xcode 6 beta EXC_BREAKPOINT(代码=EXC_I386_BPT,子代码=0x0)

我正在创建一个基本的iOS应用程序,它在指定的URL上发送HTTP“GET”请求并将该信息打印到文本字段中。我没有收到任何错误,但我在operationQueue线程中收到一个EXC_BREAKPOINT(code=EXC_I386_BPT,subcode=0x0)错误。我是iPhone开发和Swift的新手,即使经过研究我也不确定这意味着什么。我的代码如下。我的View仅包含一个在按下时执行get方法的按钮和一个文本字段。importUIKitimportFoundationclassViewController:UIViewController{@IBOutletvartextFi

swift - UICollectionView 接收到具有不存在的索引路径的单元格的布局属性 : <NSIndexPath: 0x79fe0f20> {length = 2, 路径 = 0 - 4}

当我第一次加载我的UICollectionView时没有任何问题,我使用自定义布局和serachbar,当我搜索一些文本时它崩溃抛出异常,即具有不存在的索引路径的单元格,我使用像下一个代码一样的搜索栏:importUIKitimportAVFoundationclassCategoryViewController:UIViewController,UICollectionViewDataSource,UICollectionViewDelegate,UISearchBarDelegate{varListArray:JSON!=[]varSelectedIds:[Int]=[]varSe

ios - 警告 : Attempt to present View Controller on * which is already presenting <UISearchController: 0x142a1f7c0>

我用UISearchController和UITableView制作了一个ViewController。您可以从搜索范围按钮中选择两种不同类型的搜索:群组和人员。两种搜索都有效并在表格中显示结果。但是,如果您单击每个单元格,它们应该会将您定向到不同的动态页面(动态组页面或动态个人资料页面)。一个用于组的工作,而一个用于配置文件的不工作。意思是每当我从我得到的结果中点击一个人单元格时,没有任何反应,我在控制台上打印以下警告:Warning:Attempttopresentonwhichisalreadypresenting如果您知道为什么会发生这种情况,请告诉我,我们将不胜感激。编辑:这

swift - 登录时应用程序崩溃 (xcode 9.3) EXC_BAD_ACCESS(代码=1,地址=0x1)

我在9.3更新时遇到此崩溃,在9.2上一切正常。它可以是什么?通过任何来源(登录密码、VK、谷歌)登录时都会出现错误classAppDelegate:UIResponder,UIApplicationDelegate,GIDSignInDelegate{varwindow:UIWindow?privateletsettingsManager=SettingsManager.managerfuncapplication(_application:UIApplication,didFinishLaunchingWithOptionslaunchOptions:[UIApplicationL

ios - 应用程序随机崩溃,NSInvalidArgumentException 无法识别的选择器发送到实例 0x800000000000000

我的应用使用核心数据。我最近升级到Xcode10.2和swift5,从那时起我收到与核心数据有关的随机崩溃。据我所知,这是在尝试从后台线程更改核心数据时发生的(从服务器提取新数据后)。我收到以下错误信息2019-03-3114:49:17.358685+0300LeaderMES[24226:595701]***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'-[__NSTaggedDateobjectForKey:]:unrecognizedselectorsenttoinstance0