Author Topic: "Array Index Out of Bounds Exception" Alert  (Read 3548 times)

Offline Phisk

  • Vagabond
  • *
  • Posts: 3
  • Merit: 0
  • I haven't updated my profile yet!
    • View Profile
"Array Index Out of Bounds Exception" Alert
« on: December 16, 2014, 04:07:05 PM »
What does this alert mean and why does it show up? Thanks for your help!

Linkback: http://www.carcassonnecentral.com/community/index.php?topic=1353.0

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2453
  • Merit: 86
    • View Profile
    • sydby.com
Re: "Array Index Out of Bounds Exception" Alert
« Reply #1 on: December 17, 2014, 12:29:31 AM »
arrays are used in programming language. Could be you need to update Java (by Oracle media) or are you using a JavaScript yourself?

Arrays have an index and like the error says and could be anything but usually it's because the script is missing a semi-colon somewhere.
World record holder for a single game of Carcassonne using 10 007 tiles!

Offline Decar

  • Global Moderator
  • Chatelain Officier
  • *
  • Posts: 5340
  • Merit: 238
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: "Array Index Out of Bounds Exception" Alert
« Reply #2 on: December 17, 2014, 02:27:27 AM »
Hi Phisk,

a) Is this happening when the application starts up or when you're doing something in particular?

b) is there an error.log in the JCloisterZone directory?

c) Can you confirm what version of Java you are running?

d) Can you confirm JCloisterZone is the latest version 3.0.2?

Cheers :)

Offline Phisk

  • Vagabond
  • *
  • Posts: 3
  • Merit: 0
  • I haven't updated my profile yet!
    • View Profile
Re: "Array Index Out of Bounds Exception" Alert
« Reply #3 on: December 17, 2014, 04:06:22 AM »
Hi Decar,

a) I placed a tile and suddenly this showed up.

b) yes there is.

c) Unfortunately I'm not very experienced with computers so I don't know :-\

d) Yes, it's the latest version.

Thanks

Offline Decar

  • Global Moderator
  • Chatelain Officier
  • *
  • Posts: 5340
  • Merit: 238
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: "Array Index Out of Bounds Exception" Alert
« Reply #4 on: December 17, 2014, 07:28:25 AM »
That's useful,

Does it happen every time you place a tile or was it a one off?

Any chance you can paste the content of the error.log here - it might contain a clue.

I'm trying to find an easy way of checking your java version - it's probably 1.7 so I imagine that's not the cause.

Offline Decar

  • Global Moderator
  • Chatelain Officier
  • *
  • Posts: 5340
  • Merit: 238
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: "Array Index Out of Bounds Exception" Alert
« Reply #5 on: December 17, 2014, 07:30:06 AM »
You might be able to check you're up to date with this:

https://www.java.com/en/download/installed.jsp

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2453
  • Merit: 86
    • View Profile
    • sydby.com
Re: "Array Index Out of Bounds Exception" Alert
« Reply #6 on: December 17, 2014, 07:31:08 AM »
You might be able to check you're up to date with this:

https://www.java.com/en/download/installed.jsp

 :(y) Beat me to it!  ^-^

Offline farin

  • Duke
  • *
  • Posts: 233
  • Merit: 41
  • JCloisterZone maintainer
    • View Profile
Re: "Array Index Out of Bounds Exception" Alert
« Reply #7 on: December 17, 2014, 08:34:37 AM »
Hi
In help menu is choice to create bug report (which contains java version etc). So if it happens again plese try to create report.

Maybe you still have, error.log in game directory. If so please sent it to me. Thanks

Offline danisthirty

  • (well, 39 actually)
  • Administrator
  • Chatelain Grand Officier
  • *
  • Posts: 6437
  • Merit: 238
  • "First to 4 points wins?"
    • View Profile
Re: "Array Index Out of Bounds Exception" Alert
« Reply #8 on: December 17, 2014, 08:51:20 AM »
Hi
In help menu is choice to create bug report (which contains java version etc). So if it happens again plese try to create report.

Maybe you still have, error.log in game directory. If so please sent it to me. Thanks

 :(y)

Thanks farin!  :)
Heroically snatching defeat from the jaws of victory since 2018

Offline Phisk

  • Vagabond
  • *
  • Posts: 3
  • Merit: 0
  • I haven't updated my profile yet!
    • View Profile
Re: "Array Index Out of Bounds Exception" Alert
« Reply #9 on: December 17, 2014, 09:40:17 AM »
Ok, it says I have the recommended Java version installed.

It happened when I placed a single tile. I started a new game today and there were no problems at all.

the error.log says:

[Thread-21] ERROR com.jcloisterzone.ui.panel.GamePanel - null
java.lang.ArrayIndexOutOfBoundsException
   at com.jcloisterzone.board.DefaultTilePack.drawTile(DefaultTilePack.java:75)
   at com.jcloisterzone.board.DefaultTilePack.drawTiles(DefaultTilePack.java:86)
   at com.jcloisterzone.game.phase.BazaarPhase.handleRandSample(BazaarPhase.java:94)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at com.jcloisterzone.wsio.MessageDispatcher.dispatchOn(MessageDispatcher.java:47)
   at com.jcloisterzone.wsio.MessageDispatcher.dispatch(MessageDispatcher.java:30)
   at com.jcloisterzone.rmi.ClientStub.onWebsocketMessage(ClientStub.java:117)
   at com.jcloisterzone.wsio.Connection$1.onMessage(Connection.java:72)
   at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:248)
   at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:375)
   at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:158)
   at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:185)
   at java.lang.Thread.run(Thread.java:745)
[Thread-21] ERROR com.jcloisterzone.EventBusExceptionHandler - game event bus > Could not dispatch event: com.jcloisterzone.ui.InvokeInSwingUiAdapter@7f6ff426 to public void com.jcloisterzone.ui.InvokeInSwingUiAdapter.handleAllEvents(com.jcloisterzone.event.Event)
java.lang.NullPointerException
   at com.jcloisterzone.action.TilePlacementAction.toString(TilePlacementAction.java:102)
   at java.lang.String.valueOf(String.java:2981)
   at java.lang.StringBuilder.append(StringBuilder.java:131)
   at java.util.AbstractCollection.toString(AbstractCollection.java:462)
   at java.lang.String.valueOf(String.java:2981)
   at java.lang.StringBuilder.append(StringBuilder.java:131)
   at com.jcloisterzone.event.SelectActionEvent.toString(SelectActionEvent.java:36)
   at java.lang.String.valueOf(String.java:2981)
   at java.lang.StringBuilder.append(StringBuilder.java:131)
   at com.jcloisterzone.ui.InvokeInSwingUiAdapter.handleAllEvents(InvokeInSwingUiAdapter.java:30)
   at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
   at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
   at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
   at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
   at com.google.common.eventbus.EventBus.post(EventBus.java:275)
   at com.jcloisterzone.game.Game.flushEventQueue(Game.java:124)
   at com.jcloisterzone.rmi.ClientStub.phaseLoop(ClientStub.java:132)
   at com.jcloisterzone.rmi.ClientStub.onWebsocketMessage(ClientStub.java:118)
   at com.jcloisterzone.wsio.Connection$1.onMessage(Connection.java:72)
   at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:248)
   at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:375)
   at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:158)
   at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:185)
   at java.lang.Thread.run(Thread.java:745)

Offline Leven

  • Viscount
  • ****
  • Posts: 608
  • Merit: 38
    • View Profile
Re: "Array Index Out of Bounds Exception" Alert
« Reply #10 on: January 22, 2015, 01:47:24 PM »
FYI:
A few days ago I took part in a 3-player game where the Bridges, castles and bazaars expansion was included.
When there was only 2 tiles left in the stack, one of us drew the remaining Bazaar tile, and then it happened: the "ArrayIndexOutOfBoundsException" appeared.
So apparently the problem occurs when there is less tiles left than the number of players.

According to CAR, in such a situation the Bazaar has to be ignored so that would be the appropriate behaviour of JCZ.

Offline farin

  • Duke
  • *
  • Posts: 233
  • Merit: 41
  • JCloisterZone maintainer
    • View Profile
Re: "Array Index Out of Bounds Exception" Alert
« Reply #11 on: January 22, 2015, 03:01:07 PM »
hi,

in that case it is this bug https://github.com/farin/JCloisterZone/issues/98
will be fixed in 3.1-beta1 (i hope i will build it during weekend)

Offline Leven

  • Viscount
  • ****
  • Posts: 608
  • Merit: 38
    • View Profile
Re: "Array Index Out of Bounds Exception" Alert
« Reply #12 on: January 22, 2015, 04:38:29 PM »
That's it, exactly.
Fortunately the last two tiles of that game could not influence the final result yet, everything was already decided by that time.


Share via delicious Share via digg Share via facebook Share via furl Share via linkedin Share via myspace Share via reddit Share via stumble Share via technorati Share via twitter

  Subject / Started by Replies / Views Last post
xx
A copy of "Die Belagerer" for either "Die Katharer" or "Die Kornkreise I"

Started by Hylian87

3 Replies
3969 Views
Last post September 11, 2013, 03:04:52 PM
by Hylian87
xx
RGG "Princess" rule change a case of wrong trsl. or established for "retheming"

Started by Hounk

0 Replies
1529 Views
Last post July 09, 2015, 01:30:40 AM
by Hounk
clip
Exhibition "modell-hobby-spiel" in Leipzig, Germany - 03.-05.10.2014

Started by kettlefish

28 Replies
7974 Views
Last post October 09, 2014, 12:01:20 AM
by kettlefish
xx
Mini Expansion "German Castles" for Carcassonne-on-Tour 2015

Started by kettlefish

104 Replies
51369 Views
Last post October 24, 2015, 05:54:59 AM
by ARabidMeerkat
clip
Exhibition "modell-hobby-spiel" in Leipzig, Germany - 02.-04.10.2015

Started by kettlefish

7 Replies
2881 Views
Last post October 05, 2015, 12:31:13 PM
by quevy