ReactiveCocoa Swift崩溃

时间:2016-08-22 08:46:47

标签: ios swift hockeyapp reactive-cocoa-4

我的应用程序Hockeyapp发生了一次奇怪的崩溃

Thread 0 Crashed:
0   Tricount                             0x00000001001f51d8 View.BalancesInteractor.balancesInfo.getter : View.BalanceInfoModel (BalancesInteractor.swift:22)
1   Tricount                             0x00000001001fd1fc View.BalancesInteractor.(init (tricountManager : View.TricountManager) -> View.BalancesInteractor).(closure #1) (BalancesInteractor.swift:45)
2   Tricount                             0x00000001000d4818 reabstraction thunk helper from @callee_owned (@owned Model.Tricount) -> (@unowned ()) to @callee_owned (@in Model.Tricount) -> (@unowned ()) (TransactionsInteractor.swift:0)
3   ReactiveCocoa                        0x00000001013ccb94 ReactiveCocoa.Observer.(init (failed : (B) -> ()?, completed : () -> ()?, interrupted : () -> ()?, next : (A) -> ()?) -> ReactiveCocoa.Observer<A, B>).(closure #1) (Observer.swift:24)
4   ReactiveCocoa                        0x00000001013cc644 partial apply forwarder for ReactiveCocoa.Observer.(init (failed : (B) -> ()?, completed : () -> ()?, interrupted : () -> ()?, next : (A) -> ()?) -> ReactiveCocoa.Observer<A, B>).(closure #1) (Observer.swift:0)
5   ReactiveCocoa                        0x00000001013e66a8 ReactiveCocoa.Signal.(init ((ReactiveCocoa.Observer<A, B>) -> ReactiveCocoa.Disposable?) -> ReactiveCocoa.Signal<A, B>).(closure #1) (Signal.swift:63)
6   ReactiveCocoa                        0x0000000101405a88 ReactiveCocoa.SignalProducer.(startWithSignal ((ReactiveCocoa.Signal<A, B>, ReactiveCocoa.Disposable) -> ()) -> ()).(closure #2) (SignalProducer.swift:252)
7   ReactiveCocoa                        0x00000001013e66a8 ReactiveCocoa.Signal.(init ((ReactiveCocoa.Observer<A, B>) -> ReactiveCocoa.Disposable?) -> ReactiveCocoa.Signal<A, B>).(closure #1) (Signal.swift:63)
8   ReactiveCocoa                        0x00000001013e954c (extension in ReactiveCocoa):ReactiveCocoa.SignalType.(delay (Swift.Double, onScheduler : ReactiveCocoa.DateSchedulerType) -> ReactiveCocoa.Signal<A.Value, A.Error>).(closure #1).(closure #1).(closure #2) (Signal.swift:423)
9   ReactiveCocoa                        0x00000001013d5720 ReactiveCocoa.UIScheduler.(schedule (() -> ()) -> ReactiveCocoa.Disposable?).(closure #1) + 56
10  libdispatch.dylib                    0x00000001812014bc _dispatch_call_block_and_release + 20
11  libdispatch.dylib                    0x000000018120147c _dispatch_client_callout + 12
12  libdispatch.dylib                    0x0000000181206b84 _dispatch_main_queue_callback_4CF + 1840
13  CoreFoundation                       0x000000018176cd50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
14  CoreFoundation                       0x000000018176abb8 __CFRunLoopRun + 1624
15  CoreFoundation                       0x0000000181694c50 CFRunLoopRunSpecific + 380
16  GraphicsServices                     0x0000000182f7c088 GSEventRunModal + 176
17  UIKit                                0x000000018697e088 UIApplicationMain + 200
18  Tricount                             0x000000010015674c main (AppDelegate.swift:12)
19  ???                                  0x00000001812328b8 0x0 + 0

我无法重现它。 撞击发生在吸气器上,是不是很奇怪?或者我想我错过了一些东西......我不知道是不是看得很清楚

如果您需要更多信息,请告诉我。 如果您有任何线索,请不要犹豫。

感谢您的帮助。

编辑1:

这是使用balancesInfo:

的信号产生者
self.tricountManager
            .updatedTricountSignalProducer
            .observeOn(UIScheduler())
            .startWithNext { [unowned self] _ in
                self.presenter.updateView(self.balancesInfo)  //LIGNE 45
            }

这些代码段位于balancesInteractor init中。

编辑2:

以下是创建balanceInfo的代码。

var balancesInfo: BalanceInfoModel {
        let balances = self.calculateBalances()
        self.solutions = self.calculateSolutions(balances)

        self.tricountManager.solutionCount = solutions.count

        return BalanceInfoModel(
            isBalanced: self.solutions.isEmpty,
            balances: balances,
            solutions: self.solutions.map(self.convert)
        )
    }

0 个答案:

没有答案