Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash while initializing #39

Closed
consp1racy opened this issue Jan 14, 2017 · 10 comments
Closed

Crash while initializing #39

consp1racy opened this issue Jan 14, 2017 · 10 comments
Assignees
Milestone

Comments

@consp1racy
Copy link

Version 2.1

Caused by java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:411)
at com.instacart.library.truetime.TrueTimeRx$6.call(TrueTimeRx.java:191)
at com.instacart.library.truetime.TrueTimeRx$6.call(TrueTimeRx.java:179)
... rx internals ...

Device info

@consp1racy
Copy link
Author

Full stacktrace

Fatal Exception: java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
       at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:761)
Caused by rx.exceptions.OnErrorFailedException: Error occurred when trying to propagate error to Observer.onError
       at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:187)
       at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
       at rx.internal.operators.OperatorSubscribeOn$1$1.onError(OperatorSubscribeOn.java:59)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onError(OnSubscribeMap.java:88)
       at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onError(OnSubscribeMap.java:88)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:73)
       at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
       at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
       at rx.internal.operators.OperatorToObservableList$1.onCompleted(OperatorToObservableList.java:98)
       at rx.internal.operators.OperatorTake$1.onCompleted(OperatorTake.java:56)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:656)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onCompleted(OperatorMerge.java:857)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4$1.onCompleted(OperatorOnErrorResumeNextViaFunction.java:126)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:46)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:26)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142)
       at rx.internal.operators.OperatorToObservableList$1.onError(OperatorToObservableList.java:104)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:266)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:818)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:579)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:852)
       at rx.internal.operators.OnSubscribeRedo$4$1.onError(OnSubscribeRedo.java:326)
       at rx.internal.operators.OperatorDematerialize$1.onError(OperatorDematerialize.java:77)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:62)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:50)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:302)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:284)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitNext(SubjectSubscriptionManager.java:253)
       at rx.subjects.BehaviorSubject.onNext(BehaviorSubject.java:160)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.observers.SerializedObserver.onNext(SerializedObserver.java:112)
       at rx.subjects.SerializedSubject.onNext(SerializedSubject.java:67)
       at rx.internal.operators.OnSubscribeRedo$2$1.onError(OnSubscribeRedo.java:237)
       at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
       at rx.internal.operators.OperatorSubscribeOn$1$1.onError(OperatorSubscribeOn.java:59)
       at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:216)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:50)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
       at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
       at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:761)
Caused by rx.exceptions.CompositeException: 1 exceptions occurred. 
       at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:187)
       at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
       at rx.internal.operators.OperatorSubscribeOn$1$1.onError(OperatorSubscribeOn.java:59)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onError(OnSubscribeMap.java:88)
       at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onError(OnSubscribeMap.java:88)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:73)
       at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
       at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
       at rx.internal.operators.OperatorToObservableList$1.onCompleted(OperatorToObservableList.java:98)
       at rx.internal.operators.OperatorTake$1.onCompleted(OperatorTake.java:56)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:656)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onCompleted(OperatorMerge.java:857)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4$1.onCompleted(OperatorOnErrorResumeNextViaFunction.java:126)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:46)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:26)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142)
       at rx.internal.operators.OperatorToObservableList$1.onError(OperatorToObservableList.java:104)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:266)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:818)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:579)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:852)
       at rx.internal.operators.OnSubscribeRedo$4$1.onError(OnSubscribeRedo.java:326)
       at rx.internal.operators.OperatorDematerialize$1.onError(OperatorDematerialize.java:77)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:62)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:50)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:302)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:284)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitNext(SubjectSubscriptionManager.java:253)
       at rx.subjects.BehaviorSubject.onNext(BehaviorSubject.java:160)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.observers.SerializedObserver.onNext(SerializedObserver.java:112)
       at rx.subjects.SerializedSubject.onNext(SerializedSubject.java:67)
       at rx.internal.operators.OnSubscribeRedo$2$1.onError(OnSubscribeRedo.java:237)
       at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
       at rx.internal.operators.OperatorSubscribeOn$1$1.onError(OperatorSubscribeOn.java:59)
       at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:216)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:50)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
       at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
       at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:761)
Caused by rx.exceptions.CompositeException$CompositeExceptionCausalChain: Chain of Causes for CompositeException In Order Received =>
       at com.crashlytics.android.core.TrimmedThrowableData.(TrimmedThrowableData.java)
       at com.crashlytics.android.core.TrimmedThrowableData.(TrimmedThrowableData.java)
       at com.crashlytics.android.core.TrimmedThrowableData.(TrimmedThrowableData.java)
       at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.writeSessionEvent(CrashlyticsUncaughtExceptionHandler.java:1054)
       at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.writeFatal(CrashlyticsUncaughtExceptionHandler.java:812)
       at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.handleUncaughtException(CrashlyticsUncaughtExceptionHandler.java:278)
       at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.access$100(CrashlyticsUncaughtExceptionHandler.java:55)
       at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler$5.call(CrashlyticsUncaughtExceptionHandler.java:254)
       at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler$5.call(CrashlyticsUncaughtExceptionHandler.java:251)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
       at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
       at java.lang.Thread.run(Thread.java:761)
Caused by java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
       at java.util.ArrayList.get(ArrayList.java:411)
       at com.instacart.library.truetime.TrueTimeRx$6.call(TrueTimeRx.java:191)
       at com.instacart.library.truetime.TrueTimeRx$6.call(TrueTimeRx.java:179)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
       at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
       at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
       at rx.internal.operators.OperatorToObservableList$1.onCompleted(OperatorToObservableList.java:98)
       at rx.internal.operators.OperatorTake$1.onCompleted(OperatorTake.java:56)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:656)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onCompleted(OperatorMerge.java:857)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4$1.onCompleted(OperatorOnErrorResumeNextViaFunction.java:126)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:46)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:26)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142)
       at rx.internal.operators.OperatorToObservableList$1.onError(OperatorToObservableList.java:104)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:266)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:818)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:579)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:852)
       at rx.internal.operators.OnSubscribeRedo$4$1.onError(OnSubscribeRedo.java:326)
       at rx.internal.operators.OperatorDematerialize$1.onError(OperatorDematerialize.java:77)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:62)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:50)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:302)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:284)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitNext(SubjectSubscriptionManager.java:253)
       at rx.subjects.BehaviorSubject.onNext(BehaviorSubject.java:160)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.observers.SerializedObserver.onNext(SerializedObserver.java:112)
       at rx.subjects.SerializedSubject.onNext(SerializedSubject.java:67)
       at rx.internal.operators.OnSubscribeRedo$2$1.onError(OnSubscribeRedo.java:237)
       at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
       at rx.internal.operators.OperatorSubscribeOn$1$1.onError(OperatorSubscribeOn.java:59)
       at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:216)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:50)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
       at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
       at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:761)
Caused by rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: java.util.ArrayList.class
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:73)
       at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
       at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
       at rx.internal.operators.OperatorToObservableList$1.onCompleted(OperatorToObservableList.java:98)
       at rx.internal.operators.OperatorTake$1.onCompleted(OperatorTake.java:56)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:656)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onCompleted(OperatorMerge.java:857)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4$1.onCompleted(OperatorOnErrorResumeNextViaFunction.java:126)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:46)
       at rx.internal.operators.EmptyObservableHolder.call(EmptyObservableHolder.java:26)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142)
       at rx.internal.operators.OperatorToObservableList$1.onError(OperatorToObservableList.java:104)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:266)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:818)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:579)
       at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
       at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:852)
       at rx.internal.operators.OnSubscribeRedo$4$1.onError(OnSubscribeRedo.java:326)
       at rx.internal.operators.OperatorDematerialize$1.onError(OperatorDematerialize.java:77)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:62)
       at rx.internal.operators.OperatorDematerialize$1.onNext(OperatorDematerialize.java:50)
       at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:302)
       at rx.internal.operators.OnSubscribeRedo$3$1.onNext(OnSubscribeRedo.java:284)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitNext(SubjectSubscriptionManager.java:253)
       at rx.subjects.BehaviorSubject.onNext(BehaviorSubject.java:160)
       at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
       at rx.observers.SerializedObserver.onNext(SerializedObserver.java:112)
       at rx.subjects.SerializedSubject.onNext(SerializedSubject.java:67)
       at rx.internal.operators.OnSubscribeRedo$2$1.onError(OnSubscribeRedo.java:237)
       at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
       at rx.internal.operators.OperatorSubscribeOn$1$1.onError(OperatorSubscribeOn.java:59)
       at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:216)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:50)
       at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33)
       at rx.Observable.unsafeSubscribe(Observable.java:10142)
       at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
       at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
       at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:761)

@kaushikgopal
Copy link
Collaborator

@consp1racy can you paste how you're actually using the TrueTimeRx api call? as in what are you doing inside the onNext/onError etc.

@kaushikgopal
Copy link
Collaborator

🤦‍♂️ nvm. i think i know why this happens

@kaushikgopal kaushikgopal self-assigned this Jan 20, 2017
@consp1racy
Copy link
Author

consp1racy commented Jan 20, 2017

RxJava 1.2.3, possibly 1.2.5 as well.

It runs inside Yigit Boyar's job queue like so:

    TrueTimeRx.build()
            .withLoggingEnabled(BuildConfig.DEBUG)
            .withSharedPreferences(applicationContext)
            .initializeRx("time.google.com")
            .subscribeOn(Schedulers.io())
            .observeOn(Schedulers.immediate())
            .subscribe(object : Subscriber<Date>() {
                override fun onError(e: Throwable) {
                    // Log.
                    Crashlytics.logException(e)
                }

                override fun onNext(t: Date) {
                    val i = Instant.ofEpochMilli(t.time)
                    // Log.
                }

                override fun onCompleted() {
                }
            })

The stack trace would be less horrible if I didn't originally rethrow the error in onError (heh), but I think I got the origin right.

@kaushikgopal
Copy link
Collaborator

@consp1racy : actually i'm curious now. your stack trace indicates that no bestResponse was received.

Can you confirm this (if you had logging enabled)? For e.g. the filterLeastRoundTrip should also have shown an empty list

I would filter out empty responses and we wouldn't run into the issue. but i want to make sure that really was the problem.

@consp1racy
Copy link
Author

@kaushikgopal I'm afraid it happened on a remote device and the only thing I have is that stack trace :/

No best response is ok however something along a specific NoBestResponseException would be perfect.

@kaushikgopal
Copy link
Collaborator

oh wouldn't Crashlytics have the stack trace?

@consp1racy
Copy link
Author

Well yeah, it's the whole second comment, kinda surprised you missed it :D

That's before I removed the throw e from onError. I'll post something cleaner as soon as it happens again but RxJava is known to produce messy stack trace anyway.

@consp1racy
Copy link
Author

image

Basically the same thing on another device.

Yes, looks like TT is trying to onNext a value from an empty array instead of onError.

@kaushikgopal
Copy link
Collaborator

@consp1racy i realize why my comment was confusing now: i mean to say log trace not stack trace :). was not sure if you piped that to Crashlytics.

in any case i found a similar issue in our Crashlytics data, so should have this fixed

@kaushikgopal kaushikgopal added this to the 2.2 milestone Jan 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants