lftjcq / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

ArrayIndexOutOfBoundsException in TileWriter.isSymbolicDirectoryLink #463

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
We are occasionally getting the following exception on user's devices running 
Android OS API Level 7 and 8.

java.lang.ArrayIndexOutOfBoundsException
at java.io.File.getCanonicalPath(File.java:542)
at 
org.osmdroid.tileprovider.modules.TileWriter.isSymbolicDirectoryLink(TileWriter.
java:172)
at 
org.osmdroid.tileprovider.modules.TileWriter.calculateDirectorySize(TileWriter.j
ava:155)
at org.osmdroid.tileprovider.modules.TileWriter.access$1(TileWriter.java:148)
at org.osmdroid.tileprovider.modules.TileWriter$1.run(TileWriter.java:54)

Unfortunately, issue is relatively rare and steps to reproduce were not found.

What version of the product are you using? On what operating system?
osmdroid-android-3.0.10 on Android OS 2.1 & 2.2

Please provide any additional information below.
Couple of ideas how to fix: 1) catch ArrayIndexOutOfBoundsException exception 
in TileWriter.isSymbolicDirectoryLink; or 2) make 
TileWriter.isSymbolicDirectoryLink protected so we could override it in our 
subclass.

Original issue reported on code.google.com by a...@mightypocket.com on 10 Aug 2013 at 6:03