RPTools.net

Discussion and Support

Skip to content

It is currently Tue Jan 23, 2018 7:15 am 




Forum rules


Posting now open to all registered forum users.



Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Sun Oct 21, 2012 4:30 am
Posts: 21
 Post subject: Recurring error message
PostPosted: Tue Dec 26, 2017 5:30 am 
Having a recurrent error message. I cannot figure out what is causing it as it appears randomly and can then disappear as well. Once it has triggered I cannot move tokens, copy paste or anything really. I can close it and sometimes continue for a bit but then it pops up again. It happens both when I am working on the campaign on my own and when I am running a server (LAN, just 2 computers) and also pops up on the 2nd screen ( though not always at the same time as on mine). Driving me mad.
I am running 1.4 and Java 8.
Here is the message. Followed by the debug info

java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:777)
at java.util.TimSort.mergeAt(TimSort.java:514)
at java.util.TimSort.mergeCollapse(TimSort.java:441)
at java.util.TimSort.sort(TimSort.java:245)
at java.util.Arrays.sort(Arrays.java:1438)
at java.util.List.sort(List.java:478)
at java.util.Collections.sort(Collections.java:175)
at net.rptools.maptool.model.Zone.putToken(Zone.java:1114)
at net.rptools.maptool.client.ServerCommandClientImpl.putToken(ServerCommandClientImpl.java:116)
at net.rptools.maptool.client.tool.StampTool.mouseReleased(StampTool.java:417)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)



==== MapTool Information ====
MapTool Version: 1.4.1.8
MapTool Home...: C:\Users\Sanders\.maptool
Max mem avail..: 910M
Max mem used...: 849M
Custom Property: -DMAPTOOL_DATADIR=C:\Users\Sanders\.maptool

==== Java Information ====
Java Vendor.: Oracle Corporation
Java Home...: C:\Users\Sanders\AppData\Roaming\JWrapper-MapTool\JWrapper-Windows64JRE-00053600256-complete
Java Version: 1.8.0_101
Result of executing 'java -version':
............: Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
............: Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)


==== OS Information ====
OS Name........: Windows 10
OS Version.....: 10.0
OS Architecture: amd64
PATH...........: C:\Users\Sanders\AppData\Roaming\JWrapper-MapTool\JWrapper-Windows64JRE-00053600256-complete\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Users\Sanders\AppData\Local\Microsoft\WindowsApps;;.
Number of Procs: 8

==== User Information ====
User Name: Sanders
User Home: C:\Users\Sanders
User Dir.: C:\Users\Sanders\AppData\Roaming\JWrapper-MapTool\JWrapper-MapTool-00053648849-complete

==== Network Interfaces ====
Display Name..: Software Loopback Interface 1
Interface Name: lo
Address...: 127.0.0.1
Address...: 0:0:0:0:0:0:0:1

Display Name..: Qualcomm Atheros AR5BWB222 Wireless Network Adapter
Interface Name: wlan1
Address...: 192.168.1.2
Address...: fdf8:23b2:3fc6:d900:b5dc:c49d:f4d6:8008
Address...: fdf8:23b2:3fc6:d900:6c97:a33e:5787:4184
Address...: fe80:0:0:0:b5dc:c49d:f4d6:8008%wlan1

Display Name..: Microsoft Teredo Tunneling Adapter
Interface Name: net1
Address...: 2001:0:4137:9e76:56:524:a3fc:4228
Address...: fe80:0:0:0:56:524:a3fc:4228%net1

Host Address...: 192.168.1.2
Default Gateway: 192.168.1.1

==== Locale Information ====
Country.: United Kingdom
Language: English
Locale..: English (United Kingdom)
Variant.:

==== Display Information ====
Number of Displays: 1
Display 1: 1600x900(32)

==== Internet Gateway Devices ====
Device Name.: Huawei Home Gateway
Model Name..: HG633
Manufacturer: Huawei Technologies Co., Ltd.
Model Number: Huawei Model
Model Desc..: Huawei Home Gateway
Firmware....: Linux UPnP/1.0 Huawei-ATP-IGD
External IP.: 92.3.189.215


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Thu Oct 19, 2017 11:36 am
Posts: 30
 Post subject: Re: Recurring error message
PostPosted: Tue Dec 26, 2017 6:15 am 
Someone posted a similar issue viewtopic.php?f=86&t=27481

Have a look.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1202
Location: Bristol, UK
 Post subject: Re: Recurring error message
PostPosted: Tue Dec 26, 2017 8:43 am 
Indeed, you have a matching stacktrace. So I suspect the same error, that there is a corrupted token somewhere.

Suspicious that we have had two recently. Mind you the other thread was with 1.4.1.7, which is a long standing release so probably just coincidence. Unless its brought about by a recent Java update :?


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3799
Location: MD
 Post subject: Re: Recurring error message
PostPosted: Tue Dec 26, 2017 11:38 am 
Jagged wrote:
Suspicious that we have had two recently. Mind you the other thread was with 1.4.1.7, which is a long standing release so probably just coincidence. Unless its brought about by a recent Java update :?

Does Xavram's fix (duplicating the map) generate new asset id's for tokens?

If so... that's probably the issue.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6348
Location: Middle of Nowhere, NM
 Post subject: Re: Recurring error message
PostPosted: Tue Dec 26, 2017 4:40 pm 
If you duplicate a map the tokens on the new map get new IDs but the asset IDs for the images used by the tokens are the same.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1202
Location: Bristol, UK
 Post subject: Re: Recurring error message
PostPosted: Wed Dec 27, 2017 4:58 am 
The stacktrace points to token comparison rather than asset id, so hopefully duplicating the map will cure the problem.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6348
Location: Middle of Nowhere, NM
 Post subject: Re: Recurring error message
PostPosted: Wed Dec 27, 2017 9:12 am 
What's being sorted is:
Code:
   private final List<Token> tokenOrderedList = new LinkedList<Token>();

And the only thing the Comparator for the Token class does is compare the names:
Code:
   public static final Comparator<Token> NAME_COMPARATOR = new Comparator<Token>() {
      public int compare(Token o1, Token o2) {
         return o1.getName().compareToIgnoreCase(o2.getName());
      }
   };


Hmm, compareToIgnoreCase() returns just a signed integer and is not restricted to just {-1, 0, 1}. Does that matter when implementing compare()?


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1202
Location: Bristol, UK
 Post subject: Re: Recurring error message
PostPosted: Wed Dec 27, 2017 10:19 am 
The zone.putToken is also doing a zorder comparison. Which although still fairly simple, is slightly more complex and perhaps a more likely candidate for the error.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6348
Location: Middle of Nowhere, NM
 Post subject: Re: Recurring error message
PostPosted: Wed Dec 27, 2017 11:50 am 
I dare say that without a problem map/campaign file to work with no one is likely to find the actual cause of the problem.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sun Sep 04, 2011 6:01 am
Posts: 265
 Post subject: Re: Recurring error message
PostPosted: Fri Jan 05, 2018 8:54 am 
This is all over the forum since months and I have been away some time, so maybe I'm missing something.

But timsort, the (new) default sorting algorithm in Java, reacts allergic to comparators not compatible with equals. The above mentioned comparator is not compatible. You have three choices: (a) make the comparator compatible to the default equals, (b) implement equals on the objects being compared, (c) ignore the problem and add the -DuseLegacySort switch in the startup scripts.

Michael


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1752
Location: Chicagoland
 Post subject: Re: Recurring error message
PostPosted: Fri Jan 05, 2018 12:37 pm 
There has been some headway...

@OP Do you happen to be using Isometric/Figure tokens?

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1202
Location: Bristol, UK
 Post subject: Re: Recurring error message
PostPosted: Fri Jan 05, 2018 2:34 pm 
username wrote:
This is all over the forum since months and I have been away some time, so maybe I'm missing something.

Feel free to submit a push request.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sun Sep 04, 2011 6:01 am
Posts: 265
 Post subject: Re: Recurring error message
PostPosted: Fri Jan 05, 2018 5:41 pm 
Again, I have the feeling I am missing something. The NAME_COMPARATOR is not used and I would completely remove it.
In other words, I cloned the repo https://github.com/RPTools/maptool, removed this static instance completely and everything built (./gradlew clean release) fine. (Maybe getting to techy here?)

But that wouldn't solve the problem. :?


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6348
Location: Middle of Nowhere, NM
 Post subject: Re: Recurring error message
PostPosted: Fri Jan 05, 2018 6:00 pm 
As Jagged pointed out, there is a zorder comparator in there as well and it is used.

The suspicion is that this is only affecting users using iso grids and figure tokens though we haven't been able to reproduce the issue. While there have been several people who have reported it none of them have provided us with a campaign file or map that reproduces it.

If you can reproduce it and identify the exact problem, great.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1202
Location: Bristol, UK
 Post subject: Re: Recurring error message
PostPosted: Sat Jan 06, 2018 7:28 am 
Not sure it necessarily has to be on an iso map or using figure tokens. Since all maps will be using the same z-order comparator.

Still, an example map/campaign would help greatly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman