Welcome!

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

Sign up now!

Bug ChatListener stops working

Joined
Jul 15, 2016
Messages
152
  1. RuneMate Version: 2.14.0
  2. Affected Games:OSRS
  3. Code Used:
    @Override
    public void onMessageReceived(MessageEvent messageEvent) {Some boolean flags here}
After one of recent updates of runemate (I can't say exactly which one, a week ago or so), ChatListener thread randomly stops working. I was using it according to Cloud's guide, and it worked fine for me during last few month. But now it happens it stops. Bot continue to work, but it is not reacting to chat messages appeared, so i assume it randomly interrupt ChatListener thread. I can't reproduce it yet, cos it might happen during 4 hrs run, or might not happen as well. Pause-unpause won't help, only manually restart bot.

upd: I'm not using .stop or .interrupt methods in my code, and i'm sure it is listener stop working. Bot continue looping, but it is not reacting to chat messages. So i assume it is client related issue.

@Cloud
 
Last edited:
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
Have you explicitly tested the chat listener by adding debug output and seeing if it stops printing after a while? (Using the -verbose flag)
 
Joined
Jul 15, 2016
Messages
152
No i'm nub :( I don't kno how to use those things, but i have message sout("Executing onMessageReceived") inside onMessageReceived method, and it stops printing after awhile. Or might not stop as well. Again, it was working fine since december, and started to fail during last week or two.
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,769
Maybe you're not resetting the boolean? If you say bool = true in your chatbox listener you gotta turn it false somewhere so it can wait for the next time that message appears.

Also did you maybe accidentally remove the adding of any eventlisteners in onStart() ?
 
Joined
Jul 15, 2016
Messages
152
Yep, there are conditions that turning booleans false. Told you, it was working fine since december for me. And i haven't been changing main class.
 
I've tracked finally when it is happening. After hopping worlds, when message "Welcome to runemate" appears it gets somehow null message.
 
00:27:26 TRACE [WorldHop] Attempting to hop to world 374 (74)
World hopped
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
at java.util.HashMap$KeyIterator.next(HashMap.java:841)
at aux.iiIIiiiIIiI.keys(hb:625)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
at com.sun.proxy.$Proxy8.keys(Unknown Source)
at nul.IIiIiiiIiiIII.goto(ukb:46)
at nul.IIiIiiiIiiIII.goto(ukb:168)
at com.runemate.game.api.hybrid.local.hud.interfaces.Chatbox.getMessages(zrb:126)
at nul.IiiIIiiIiIiII.goto(kpb:187)
at nul.iIiIiiiIiiiIi.run(job:34)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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)
@Party @Cloud
 
Top