1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved java.lang.UnsupportedOperationException spam

Discussion in 'Developer Support' started by SlashnHax, Feb 18, 2016.

  1. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    Slack
    Not too sure what causes this, but when it occurs it spams the terminal, even after stopping the bot.
    --- Double Post Merged, Feb 18, 2016, Original Post Date: Feb 18, 2016 ---
    @Arbiter @Cloud
    --- Double Post Merged, Feb 18, 2016 ---
    I have a sneaking suspicion it has something to do with LoopingThreads.
    --- Double Post Merged, Feb 18, 2016 ---
    Code (Text):
    1. java.lang.UnsupportedOperationException: Calling methods that must query the session for information is no longer allowed within non-
    2. bot threads.
    3.  at nul.IIiIIIiIIIIi.this(aic:181)
    4.  at com.runemate.game.api.hybrid.Environment.getScript(xec:266)
    5.  at com.runemate.game.api.script.framework.core.LoopingThread$ExceptionHandler.uncaughtException(gpb:69)
    6.  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1057)
    7.  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052)
    8.  at com.sun.glass.ui.Application.reportException(Application.java:453)
    9.  at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    10.  at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
    11.  at java.lang.Thread.run(Thread.java:745)
     
  2. Best Answer:
    Post #2 by Cloud, Feb 19, 2016
  3. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    It's caused by a call to Environment.getScript within an UncaughtExceptionHandler. What that means is your looping thread is causing an exception and then the handler is failing and throwing an exception. The UncaughtExceptionHandler will be fixed for V1.0.19, then it'll be your turn to fix your bug :p.
     
  4. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    Haha :p I've already found the bug and fixed it, it was an NPE caused by calling something before I had set what it relies on xD
    --- Double Post Merged, Feb 21, 2016, Original Post Date: Feb 19, 2016 ---
    Turns out that it wasn't the bug, or rather, the bug I fixed wasn't the only one xD Keen for v1.0.19 :3
     

Share This Page

Loading...