Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved UnsupportedOp when stopping bot (OSRS)

Author of MaxiBots
Joined
Dec 3, 2013
Messages
7,032
@Cloud I think this occurs when the bot is trying to do something and you hit the stop button because it doesn't always happen.
Code:
java.lang.UnsupportedOperationException: Calling methods that must query the session for information is no longer allowed within non-bot threads.
    at nul.IIiiiIiiiiIi.try(qgc:52)
    at com.runemate.game.api.hybrid.Environment.getGameType(fac:256)
    at com.runemate.game.api.hybrid.Environment.isRS3(fac:160)
    at com.runemate.game.api.hybrid.local.Skill.getBaseLevel(qzb:232)
    at com.runemate.api.framework.MaxiScript.lambda$terminate$4(MaxiScript.java:102)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
    at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
    at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
    at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
    at com.runemate.api.framework.MaxiScript.terminate(MaxiScript.java:101)
    at com.runemate.maxibots.looping.woodcut.MaxiWoodcutter.onStop(MaxiWoodcutter.java:90)
    at com.runemate.game.api.script.framework.AbstractScript.stop(uob:1)
    at nul.iiiIIIiIiiII.onStopButtonClicked(nxb:4)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
    at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
    at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Node.fireEvent(Node.java:8411)
    at javafx.scene.control.Button.fire(Button.java:185)
    at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
    at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
    at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:352)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:275)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:388)
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:387)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
    at com.sun.glass.ui.View.notifyMouse(View.java:937)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    at java.lang.Thread.run(Thread.java:745)
 
Occurred 11 minutes ago
Code:
java.lang.UnsupportedOperationException: Calling methods that must query the session for information is no longer allowed within non-bot threads.
 at nul.IiIIIIiIIiiI.const(tic:188)
 at com.runemate.game.api.hybrid.Environment.getGameType(adc:107)
 at com.runemate.game.api.hybrid.Environment.isRS3(adc:38)
 at com.runemate.game.api.hybrid.local.Skill.getBaseLevel(rec:87)
 at com.runemate.api.framework.MaxiScript.lambda$terminate$37(MaxiScript.java:102)
 at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
 at java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source)
 at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
 at java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
 at java.util.concurrent.CountedCompleter.exec(Unknown Source)
 at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
 at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source)
 at java.util.concurrent.ForkJoinTask.invoke(Unknown Source)
 at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source)
 at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source)
 at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
 at java.util.stream.ReferencePipeline.forEach(Unknown Source)
 at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
 at com.runemate.api.framework.MaxiScript.terminate(MaxiScript.java:101)
 at com.runemate.maxibots.looping.woodcut.MaxiWoodcutter.onStop(MaxiWoodcutter.java:90)
 at com.runemate.game.api.script.framework.AbstractScript.stop(bvb:105)
 at nul.iIiiiIiiIIii.onStopButtonClicked(hsb:215)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.reflect.misc.Trampoline.invoke(Unknown Source)
 at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
 at javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
 at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
 at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
 at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
 at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
 at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
 at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
 at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
 at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
 at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
 at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent
@Cloud
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Your onStop method appears to be invoking some stuff that results in code being ran in parallel threads?
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
7,032
Your onStop method appears to be invoking some stuff that results in code being ran in parallel threads?
I'm pretty sure it can't be though, because its not consistent with the same bot. Sometimes it errors sometimes it doesn't. Checking now. I'll inbox you the code.
 
Top