ScalarR not stopping
Hi, I observe the following in the output of the rumble client
Fighting battle 44 ... aaa.r.ScalarR 0.005h.053,jk.mega.DrussGT 3.1.7 Robot aaa.r.ScalarR 0.005h.053 (1) is not stopping. Forcing a stop. Robot aaa.r.ScalarR 0.005h.053 (1) is not stopping. Forcing a stop. Unable to stop thread: aaa.r.ScalarR 0.005h.053 (1) Unable to stop thread: aaa.r.ScalarR 0.005h.053 (1)
and the client seems to be running this battle with 100% CPU for at least several minutes (about 5). Then roborumble continued.
I am not sure where to search for the problem but there is something strange going on. I am running everything with
openjdk version "11.0.16" 2022-07-19 OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb11u1) OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb11u1, mixed mode, sharing)
Thanks for reporting. I'm not able to reproduce this problem on both Java 11 and Java 17 (both on macOS, HotSpot). Can you try with HotSpot as well? I'll also have a check on the logic.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
Return to Thread:Talk:ScalarR/ScalarR not stopping/reply (2).
I don't think it has something to do with Kotlin, but I generally delete Kotlin jars to suppress this error.
I had a check at the round finalization logic of robocode, it seems that after user specified run() exits, control flow will be handled to `HostingRobotProxy.run`, which calls `BasicRobotProxy.waitForBattleEndImpl`. The logic here had some potential bugs, e.g. when receiving `InterruptedException`, it merely wakes up the thread instead of letting the thread exit gracefully. Not sure what triggered a bug here on some platform though...