Resolved UnsupportedOp when stopping bot (OSRS)

Discussion in 'Developer Support' started by Aidden, Apr 17, 2016.

  1. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,464
    Likes Received:
    712
    @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 (Text):
    1.  
    2. java.lang.UnsupportedOperationException: Calling methods that must query the session for information is no longer allowed within non-bot threads.
    3.     at nul.IIiiiIiiiiIi.try(qgc:52)
    4.     at com.runemate.game.api.hybrid.Environment.getGameType(fac:256)
    5.     at com.runemate.game.api.hybrid.Environment.isRS3(fac:160)
    6.     at com.runemate.game.api.hybrid.local.Skill.getBaseLevel(qzb:232)
    7.     at com.runemate.api.framework.MaxiScript.lambda$terminate$4(MaxiScript.java:102)
    8.     at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    9.     at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540)
    10.     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    11.     at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
    12.     at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
    13.     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    14.     at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
    15.     at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
    16.     at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
    17.     at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
    18.     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
    19.     at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    20.     at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
    21.     at com.runemate.api.framework.MaxiScript.terminate(MaxiScript.java:101)
    22.     at com.runemate.maxibots.looping.woodcut.MaxiWoodcutter.onStop(MaxiWoodcutter.java:90)
    23.     at com.runemate.game.api.script.framework.AbstractScript.stop(uob:1)
    24.     at nul.iiiIIIiIiiII.onStopButtonClicked(nxb:4)
    25.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    26.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    27.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    28.     at java.lang.reflect.Method.invoke(Method.java:498)
    29.     at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
    30.     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    31.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    32.     at java.lang.reflect.Method.invoke(Method.java:498)
    33.     at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
    34.     at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
    35.     at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
    36.     at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
    37.     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    38.     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    39.     at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    40.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    41.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    42.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    43.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    44.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    45.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    46.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    47.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    48.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    49.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    50.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    51.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    52.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    53.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    54.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    55.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    56.     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    57.     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
    58.     at javafx.event.Event.fireEvent(Event.java:198)
    59.     at javafx.scene.Node.fireEvent(Node.java:8411)
    60.     at javafx.scene.control.Button.fire(Button.java:185)
    61.     at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
    62.     at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
    63.     at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
    64.     at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    65.     at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    66.     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    67.     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    68.     at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    69.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    70.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    71.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    72.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    73.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    74.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    75.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    76.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    77.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    78.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    79.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    80.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    81.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    82.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    83.     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    84.     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    85.     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    86.     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    87.     at javafx.event.Event.fireEvent(Event.java:198)
    88.     at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
    89.     at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
    90.     at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
    91.     at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
    92.     at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:352)
    93.     at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:275)
    94.     at java.security.AccessController.doPrivileged(Native Method)
    95.     at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:388)
    96.     at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
    97.     at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:387)
    98.     at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
    99.     at com.sun.glass.ui.View.notifyMouse(View.java:937)
    100.     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    101.     at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    102.     at java.lang.Thread.run(Thread.java:745)
    --- Double Post Merged, Apr 18, 2016, Original Post Date: Apr 17, 2016 ---
    Occurred 11 minutes ago
    Code (Text):
    1.  
    2. java.lang.UnsupportedOperationException: Calling methods that must query the session for information is no longer allowed within non-bot threads.
    3.  at nul.IiIIIIiIIiiI.const(tic:188)
    4.  at com.runemate.game.api.hybrid.Environment.getGameType(adc:107)
    5.  at com.runemate.game.api.hybrid.Environment.isRS3(adc:38)
    6.  at com.runemate.game.api.hybrid.local.Skill.getBaseLevel(rec:87)
    7.  at com.runemate.api.framework.MaxiScript.lambda$terminate$37(MaxiScript.java:102)
    8.  at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
    9.  at java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source)
    10.  at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    11.  at java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
    12.  at java.util.concurrent.CountedCompleter.exec(Unknown Source)
    13.  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
    14.  at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source)
    15.  at java.util.concurrent.ForkJoinTask.invoke(Unknown Source)
    16.  at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source)
    17.  at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source)
    18.  at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    19.  at java.util.stream.ReferencePipeline.forEach(Unknown Source)
    20.  at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
    21.  at com.runemate.api.framework.MaxiScript.terminate(MaxiScript.java:101)
    22.  at com.runemate.maxibots.looping.woodcut.MaxiWoodcutter.onStop(MaxiWoodcutter.java:90)
    23.  at com.runemate.game.api.script.framework.AbstractScript.stop(bvb:105)
    24.  at nul.iIiiiIiiIIii.onStopButtonClicked(hsb:215)
    25.  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    26.  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    27.  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    28.  at java.lang.reflect.Method.invoke(Unknown Source)
    29.  at sun.reflect.misc.Trampoline.invoke(Unknown Source)
    30.  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    31.  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    32.  at java.lang.reflect.Method.invoke(Unknown Source)
    33.  at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
    34.  at javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
    35.  at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
    36.  at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
    37.  at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    38.  at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    39.  at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
    40.  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    41.  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    42.  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    43.  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    44.  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent
    @Cloud

     
  2. Best Answer:
    Post #4 by Cloud, Apr 18, 2016
  3. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,520
    Likes Received:
    890
    Your onStop method appears to be invoking some stuff that results in code being ran in parallel threads?
     
  4. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,464
    Likes Received:
    712
    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.
     
  5. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,520
    Likes Received:
    890

Share This Page

Loading...