1

I have a weird crash in Hockeyapp for my application

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

I haven't be able to reproduce it. Also the crash happen on a getter, isn't it weird ? Or I think I miss something... I don't know were to look exactly

If you need more info, juste tell me. If you have any clue, don't hesitate.

Thanks you for your help.

EDIT 1:

This is the signal producer that used balancesInfo:

self.tricountManager
            .updatedTricountSignalProducer
            .observeOn(UIScheduler())
            .startWithNext { [unowned self] _ in
                self.presenter.updateView(self.balancesInfo)  //LIGNE 45
            }

Those lignes of code are in the balancesInteractor init's.

EDIT 2:

Here is the ligne of code for creating the 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)
        )
    }
Erdem Inan
  • 41
  • 3

0 Answers0