Strange Comparison Method Violation in [1.4.1.8]

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Aninimouse
Kobold
Posts: 2
Joined: Sun Dec 03, 2017 7:12 pm

Strange Comparison Method Violation in [1.4.1.8]

Post by Aninimouse »

Hello. I've been using MapTool for a long time, but this one is a first for me;

In a particular campaign I've been working on I've begun running into the "Comparison method violates its general contract!" error that seemingly has a chance to begin once I use any macro I currently have that contains a foreach loop. (Most of them specifically pulling from the initiative list)
Once it happens once, usually as an error in the chatbox, it happens more and more frequently until I can no longer even click buttons in dialogue boxes without it popping up.
However, I've picked apart the code and found no specific bit causes it in fact, although when I say, reload a save to experiment again, it will occur in a (maybe) consistent set of spots, it will happen in new spots all of the way down until I just have a single function or whatever left before it doesn't seem to happen anymore.

I haven't tried messing around with foreach again elsewhere yet, but is this a known issue?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Strange Comparison Method Violation in [1.4.1.8]

Post by aliasmask »

I'll take a look if you share your campaign with me (PM). My first thought is there is comparison error like comparing a string to a number or having a null value when you're expect something else.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Strange Comparison Method Violation in [1.4.1.8]

Post by aliasmask »

Searching the forums this could be the mergeLo error with is associated with an older version of MT with newer versions of Java, but since you say you're using 1.4.1.8 this could be something new. I actually haven't been using 1.4.1.8 because of the implementation of jwrapper and using other versions of MT. I'm still using 1.4.1.7.

Aninimouse
Kobold
Posts: 2
Joined: Sun Dec 03, 2017 7:12 pm

Re: Strange Comparison Method Violation in [1.4.1.8]

Post by Aninimouse »

I'll send it to you later - but I did find a workaround at least, a friend of mine looked it over too and suggested adding "-Djava.util.Arrays.useLegacyMergeSort=true" to the command line. I haven't noticed any obvious problems yet aside from the fact that there's some flickering with z layers on tokens/objects. They sort of shuffle around when just about anything happens.

Post Reply

Return to “MapTool”