Page 1 of 1

Strange Comparison Method Violation in [1.4.1.8]

Posted: Sun Dec 03, 2017 8:23 pm
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?

Re: Strange Comparison Method Violation in [1.4.1.8]

Posted: Mon Dec 04, 2017 12:20 am
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.

Re: Strange Comparison Method Violation in [1.4.1.8]

Posted: Mon Dec 04, 2017 12:25 am
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.

Re: Strange Comparison Method Violation in [1.4.1.8]

Posted: Mon Dec 04, 2017 1:07 am
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.