Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

[NEWAPI] Crash when getting info from hatched egg #1252

Closed
FrancYescO opened this issue Aug 30, 2016 · 2 comments
Closed

[NEWAPI] Crash when getting info from hatched egg #1252

FrancYescO opened this issue Aug 30, 2016 · 2 comments
Labels

Comments

@FrancYescO
Copy link
Contributor

FrancYescO commented Aug 30, 2016

Leave this sentence in your issue as proof that you have read and used this template.

@FrancYescO FrancYescO changed the title [NEWAPI] Issues [NEWAPI] Random crash Aug 30, 2016
@jabbink
Copy link
Owner

jabbink commented Aug 30, 2016

Looks like the meta info is not available

The line: https://github.com/jabbink/PokemonGoAPI/blob/master/src/main/kotlin/ink/abb/pogo/api/PoGoApiImpl.kt#L290

Seems like I got the wrong values for hatched eggs.

Probably related to #1256

@nostyler
Copy link

nostyler commented Aug 31, 2016

Caught one as well. It is not crashing the bot for me immediately, but it is followed by an error causing a crash within a minute.

NullPointerException:

31 Aug 13:17:08 [default: WalkingLoop] - Walking to (52.37074, 4.88918) in 15 steps.
       31 Aug 13:17:12 [default: WalkingLoop] - Walking to (52.370305, 4.889093) in 18 steps.
       Exception in thread "RxComputationScheduler-2" java.lang.IllegalStateException: Exception thrown on Scheduler.Worker thread. Add `onError` handling.
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:60)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at 
31 Aug 13:17:08 [default: WalkingLoop] - Walking to (52.37074, 4.88918) in 15 steps.
       31 Aug 13:17:12 [default: WalkingLoop] - Walking to (52.370305, 4.889093) in 18 steps.
       Exception in thread "RxComputationScheduler-2" java.lang.IllegalStateException: Exception thrown on Scheduler.Worker thread. Add `onError` handling.
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:60)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: rx.exceptions.OnErrorNotImplementedException
        at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:374)
        at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:371)
        at rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44)
        at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:157)
        at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:120)
        at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:204)
        at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:144)
        at rx.internal.operators.OnSubscribeTimerOnce$1.call(OnSubscribeTimerOnce.java:49)
        at rx.internal.schedulers.EventLoopsScheduler$EventLoopWorker$2.call(EventLoopsScheduler.java:186)
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
        ... 7 more
Caused by: java.lang.NullPointerException
        at ink.abb.pogo.api.PoGoApiImpl.handleResponse(PoGoApiImpl.kt:290)
        at ink.abb.pogo.api.network.ActionQueue.sendRequests(ActionQueue.kt:180)
        at ink.abb.pogo.api.network.ActionQueue.access$sendRequests(ActionQueue.kt:26)
        at ink.abb.pogo.api.network.ActionQueue$1$1.invoke(ActionQueue.kt:62)
        at ink.abb.pogo.api.network.ActionQueue$1$1.call(ActionQueue.kt:26)
        at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39)
        at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)
        ... 10 more

followed by another error and crash:

31 Aug 13:18:34 [default: PokestopLoop] - Error running loop PokestopLoop!
java.lang.IllegalArgumentException: Comparison method violates its general contract!
        at java.util.TimSort.mergeHi(TimSort.java:899)
        at java.util.TimSort.mergeAt(TimSort.java:516)
        at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
        at java.util.TimSort.sort(TimSort.java:254)
        at java.util.Arrays.sort(Arrays.java:1438)
        at kotlin.collections.ArraysKt___ArraysKt.sortWith(_Arrays.kt:13121)
        at kotlin.collections.CollectionsKt___CollectionsKt.sortedWith(_Collections.kt:864)
        at ink.abb.pogo.scraper.tasks.ProcessPokestops.run(ProcessPokestops.kt:50)
        at ink.abb.pogo.scraper.Bot.task(Bot.kt:256)
        at ink.abb.pogo.scraper.Bot$start$8.invoke(Bot.kt:159)
        at ink.abb.pogo.scraper.Bot$start$8.invoke(Bot.kt:36)
        at ink.abb.pogo.scraper.Bot$runLoop$1.invoke(Bot.kt:200)
        at ink.abb.pogo.scraper.Bot$runLoop$1.invoke(Bot.kt:36)
        at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:18)

If someone has a link or information on the syntax of onError, I am more than happy to add it in my copy of the file.

@FrancYescO FrancYescO changed the title [NEWAPI] Random crash [NEWAPI] Crash when getting info from hatched egg Aug 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants