Opened 14 years ago

Closed 13 years ago

#111 closed defect (fixed)

Index out of bounds exception in java console

Reported by: erik@… Owned by: writetodan@…
Priority: major Milestone:
Component: applet Version:
Keywords: java exception index out of bounds Cc:

Description

Not reproduceable yet.

Exception in thread "Thread-305" java.lang.ArrayIndexOutOfBoundsException?: 0 >= 0

at java.util.Vector.elementAt(Unknown Source) at org.openstreetmap.client.Tile.getEle(Tile.java:361) at org.openstreetmap.client.ImFetch?.run(Tile.java:437)

This is the log entries:

Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=16.929931640625,61.7419302246182,16.94091796875,61.74453081889597&width=256&height=128 adding image 1541,14389 mousePressed in ModeManager? with currentMode=org.openstreetmap.processing.OSMApplet$LineMode?@aa2ef2 and overButton=false Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=16.94091796875,61.7289239586037,16.951904296875,61.73152565113397&width=256&height=128 adding image 1542,14384 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=16.94091796875,61.7289239586037,16.951904296875,61.73152565113397&width=256&height=128 adding image 1542,14384 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=16.94091796875,61.73152565113397,16.951904296875,61.73412712398737&width=256&height=128 adding image 1542,14385 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=16.94091796875,61.73152565113397,16.951904296875,61.73412712398737&width=256&height=128 adding image 1542,14385 Exception in thread "Thread-305" java.lang.ArrayIndexOutOfBoundsException?: 0 >= 0

at java.util.Vector.elementAt(Unknown Source) at org.openstreetmap.client.Tile.getEle(Tile.java:361) at org.openstreetmap.client.ImFetch?.run(Tile.java:437)

getting nodes and lines trying url: http://www.openstreetmap.org/api/0.2/map?bbox=16.910602569580078,61.73166151838643,16.940643310546875,61.74182223008769 2005-dec-28 22:36:56 org.apache.commons.httpclient.auth.AuthChallengeProcessor? selectAuthScheme INFO: basic authentication scheme selected GPX parser started... Start of Document End of Document

Change History (5)

comment:1 Changed 14 years ago by erik@…

I think it's impossibleto use the "create segment" tool when this happens.

comment:2 Changed 14 years ago by 80n80n@…

Priority: minormajor

I got a similar error. The applet just stops responding but is indistinguishable from a slow server so you can wait around for a long time before deciding that you need to reload the applet. Hence I've increased the priority a bit.


Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=-2.955322265625,51.034485632974125,-2.9443359375,51.037939894299356&width=256&height=128 getting nodes and lines trying url: http://www.openstreetmap.org/api/0.2/map?bbox=-2.9868006706237797,51.0391213348809,-2.9567599296569824,51.0526117317383 adding image -269,10839 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=-2.955322265625,51.034485632974125,-2.9443359375,51.037939894299356&width=256&height=128 adding image -269,10839 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=-2.955322265625,51.037939894299356,-2.9443359375,51.04139389812637&width=256&height=128 adding image -269,10840 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=-2.955322265625,51.04139389812637,-2.9443359375,51.04484764446179&width=256&height=128 adding image -269,10841 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=-2.955322265625,51.04484764446179,-2.9443359375,51.04830113331224&width=256&height=128 mousePressed in ModeManager? with currentMode=null and overButton=false adding image -269,10842 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=-2.955322265625,51.04830113331224,-2.9443359375,51.05175436468443&width=256&height=128 30-Dec-2005 19:48:24 org.apache.commons.httpclient.auth.AuthChallengeProcessor? selectAuthScheme INFO: basic authentication scheme selected GPX parser started... Start of Document End of Document adding image -269,10843 Trying to download image http://www.openstreetmap.org/tile/0.1/wms?map=/usr/lib/cgi-bin/steve/wms.map&service=WMS&WMTVER=1.0.0&REQUEST=map&STYLES=&TRANSPARENT=TRUE&LAYERS=landsat,gpx&bbox=-2.955322265625,51.05175436468443,-2.9443359375,51.055207338584964&width=256&height=128 adding image -269,10844 Exception in thread "Thread-420" java.lang.ArrayIndexOutOfBoundsException?: 0 >= 0

at java.util.Vector.elementAt(Unknown Source) at org.openstreetmap.client.Tile.getEle(Tile.java:361) at org.openstreetmap.client.ImFetch?.run(Tile.java:437)

getting nodes and lines trying url: http://www.openstreetmap.org/api/0.2/map?bbox=-2.9874014854431157,51.03129510442612,-2.9573607444763184,51.04478778009968 30-Dec-2005 19:49:58 org.apache.commons.httpclient.auth.AuthChallengeProcessor? selectAuthScheme INFO: basic authentication scheme selected GPX parser started... Start of Document End of Document

comment:3 Changed 14 years ago by Immanuel Scholz

Probably a synchronisation problem.

The fetch thread does not lock the vector, so could it be possible, that removeUnusedTiles is called by drag which will remove the last element in the vector exactly between the fetch thread checks for empty vector and the call to getEle with an empty imv-vector?

Imi.

comment:4 Changed 13 years ago by writetodan@…

Owner: changed from steve@… to writetodan@…

Almost certainly due to unsafe thread access.

Am just testing some fixes now.

comment:5 Changed 13 years ago by writetodan@…

Resolution: fixed
Status: newclosed

fix deployed to www

Note: See TracTickets for help on using tickets.