首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >iOS/Swift production build崩溃,没有错误消息

iOS/Swift production build崩溃,没有错误消息
EN

Stack Overflow用户
提问于 2019-09-21 08:04:32
回答 1查看 653关注 0票数 1

我经常在Firebase Crashlytics中得到崩溃(在Sentry上测试-相同),没有任何有意义的崩溃消息。所有这些SIGABRT ABORT 0x,EXC_BREAKPOINT 0x等等。我刚接触iOS和原生开发(习惯于Android和.NET运行时,除了堆栈跟踪,大多数时候你还会收到错误信息)。我是否怀念smth,这是iOS产品构建中的常见内容吗?如果是这样的话,如何调试呢?仅仅是stacktrace和行号并不能准确地回答所发生的事情。我能期望行号至少是100%正确的吗?

通常的崩溃是这样的:

代码语言:javascript
复制
Crash: Thread #1
EXC_BREAKPOINT 0x00000001011e3d78
Crashed: Thread
0  App                            0x1011e3d78 TrackMyLocationService.determinateActivityType(withGeoCoordinate:) + 154 (TrackMyLocationService.swift:154)
1  App                            0x1011e2b70 closure #1 in TrackMyLocationService.start() (<compiler-generated>)
2  App                            0x1011c3e8c thunk for @escaping @callee_guaranteed (@guaranteed CLLocation, @unowned Bool) -> () (<compiler-generated>)
3  RxSwift                        0x1035415f0 closure #1 in ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) (<compiler-generated>)
4  RxSwift                        0x1035417f0 partial apply for closure #1 in ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) (<compiler-generated>)
5  RxSwift                        0x1034f7360 AnonymousObserver.onCore(_:) (<compiler-generated>)
6  RxSwift                        0x103544068 ObserverBase.on(_:) + 25 (ObserverBase.swift:25)
7  RxSwift                        0x1035441b8 protocol witness for ObserverType.on(_:) in conformance ObserverBase<A> (<compiler-generated>)
8  RxSwift                        0x103542bdc ObserveOnSink.run(_:_:) + 118 (ObserveOn.swift:118)
9  RxSwift                        0x103543e40 partial apply for thunk for @escaping @callee_guaranteed (@unowned @callee_guaranteed () -> ()) -> () (<compiler-generated>)
10 RxSwift                        0x103551c4c partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed A, @unowned @callee_guaranteed (@in_guaranteed A) -> ()) -> () (<compiler-generated>)
11 RxSwift                        0x103551238 closure #1 in RecursiveImmediateScheduler.schedule(_:) (<compiler-generated>)
12 App                            0x1010bc71c partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed ()) -> (@out Disposable) (<compiler-generated>)
13 App                            0x1010bc8a8 partial apply for thunk for @escaping @callee_guaranteed () -> (@out Disposable) (<compiler-generated>)
14 App                            0x1010bc71c partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed ()) -> (@out Disposable) (<compiler-generated>)
15 App                            0x1010bc8a8 partial apply for thunk for @escaping @callee_guaranteed () -> (@out Disposable) (<compiler-generated>)
16 App                            0x1010bc50c closure #1 in SingleBackgroundThreadScheduler.work() (<compiler-generated>)
17 App                            0x1010bc870 partial apply for thunk for @callee_guaranteed () -> (@error @owned Error) (<compiler-generated>)
18 libswiftObjectiveC.dylib       0x1e21f9d3c autoreleasepool<A>(invoking:) + 64
19 ???                            0x59ca81010bc424 (Missing)
20 App                            0x1010bc788 partial apply (<compiler-generated>)
21 App                            0x10127da1c thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
22 CoreFoundation                 0x1b357549c <redacted> + 24
23 ???                            0x27df01b3fd061c (Missing)
24 ???                            0x755881b4106c54 (Missing)
EN

回答 1

Stack Overflow用户

发布于 2019-09-25 21:39:47

iOS有时会有这样的错误,而.NET没有,原因是Swift和Objective-C都编译成了针对该架构的汇编。C#被编译成一个字节码,但它并不能完全在硬件上运行。有时,Swift向下编译的代码没有关联的错误消息,因为错误发生在程序集本身。

这里有更多信息:Scope of causes for EXC_BREAKPOINT crash

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58036263

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档