Thread history

Fragment of a discussion from Talk:RoboRumble
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
No results

Yeah, I have exactly the same issue, but since I never saw anyone complain about this, I just ignored it. I can reproduce the issue with 1.9.2.6 as well.

I spent a lot of time reading Robocode's source trying to find a connection between that and skipped turns with no real success. Perhaps Skilgannon, which seems to be strongly related to how Robocode evaluate skipped turns as it is today, could share his thoughts about this.

When testing it with Roborio, there were a few times I fixed the running speed at 1000 TPS and could see skipped turn messages instead of these Thread errors, but this only happened when using my old GoTo code, which was really slow. I can't see skipped turn messages with Roborio 1.2.4, for example.

Then I tried to run Neuromancer with the same setup and could see a lot of these Thread dying errors as well, despite seeing no skipped turn messages when locking at 1000 TPS.

What is weird is not that the crashes are occurring at all. Maybe they really make sense. But the thrown exception instead of a helpful message is somewhat weird.

Rsalesc (talk)15:34, 4 September 2017

I sometimes see the ThreadDeath things as well, it seems completely sporadic. I can't reproduce it at all with the current dev version.

A possible issue is the platform it is run on. Windows has a system timer with a very coarse tick (30ms IIRC). We had to use the nanosecond timer in chunks of 0.999999ms to emulate the larger timer. Maybe this nanosecond timer is broken in later releases of Oracle JDK.

So I'm curious: the people who are seeing Moxiebot broken, are you running Windows? Are you using Oracle JDK or OpenJDK?

Skilgannon (talk)19:01, 4 September 2017

So, I was little distracted when I read the source for the first time. Now I've read it again.

This error is thrown when the bot must be stopped because it skipped too many turns in a row, since Thread.stop() is deprecated. Is that right? I can safely assume that if this error appears, then the bot has skipped too many turns in a row?

My only doubt is (it's more like a curiosity than anything else): what may cause the robot to skip this amount of turns when going full speed and not to skip any turns when going 1000 TPS?

I'm on OpenJDK 8 and Ubuntu, by the way.

Rsalesc (talk)01:38, 5 September 2017