logo separator

[mkgmap-dev] Random compiling failures

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Nov 25 08:16:41 GMT 2016

Hi all,

I am rather clueless here. I have a mkgmap.jar and a set of 31 input files
and I can reproduce the problem with them. So I think the crash is not
related to I/O errors. It happens in the Java Integer class:
   public static Integer valueOf(int i) {
        if (i >= IntegerCache.low && i <= IntegerCache.high)
*            return IntegerCache.cache[i + (-IntegerCache.low)];*
        return new Integer(i);
    }

The parameter i is calculated "on the fly" in this line in LBLFileReader:
poi.setZip(zips.get(*zipIndex-1*));

I thought the problem is caused by mkgmap code which isn't thread safe and
changes the content of zipIndex, so I added some debug info. With that debug
info the problem disappeared. To make sure that I did not change anything
else I removed the debug info again and the problem still did not occur. So,
I have now two different binaries compiled with - I hope - the same sources,
one always crashing with the 31 files, the other not crashing. The only
difference in the two binaries is the timestamp of the compile date.

I only have one idea:
The just-in-time compiler works different for the two binaries and does
something wrong for one.
Is that possible?

Gerd


Gerd Petermann wrote
> Hi Carlos,
> 
> today I noticed an ArrayIndexOutOfBoundsException with the same stacktrace
> while compiling a map for Japan. I was able to reproduce it, so I hope I
> can find out what happens. 
> 
> Gerd
> Carlos Dávila-2 wrote
>> Hi Gerd, thanks for your response.
>> In some cases error occurs while combining old elevation img files with 
>> new ones, but in many other cases only recently created img are 
>> involved, so it could be I/O problems as you suggest. I'll investigate 
>> that route.
>> 
>> El 06/11/16 a las 20:33, Gerd Petermann escribió:
>>> Hi Carlos,
>>>
>>> IIRC Minko reported a similar problem and it turned out that he combined
>>> img
>>> files which were created with an older version of mkgmap with newer
>>> ones.
>>> Could this happen here, too? For examples img files with  elevation data
>>> ?
>>> If not I think it is more likely to be an I/O problem on your machine.
>>>
>>> Gerd
>>>
>>>
>>> Carlos Dávila-2 wrote
>>>> I build maps daily for some 60 countries for my web. Since a couple of
>>>> months or so, almost every day there are some maps that fail to build
>>>> with an ArrayIndexOutOfBoundsException. Maps that fail change from one
>>>> day to the next. I have not been able to reproduce the problem, as
>>>> failure seems to be random. If I later build any of the maps that
>>>> failed, even using the same input file, it usually builds fine. Problem
>>>> doesn't seem to be style related, as it happens (also randomly) with
>>>> any
>>>> of the two styles I use for my maps. Error message is as follows:
>>>>
>>>> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
>>>> 265
>>>>           at java.lang.Integer.valueOf(Integer.java:831)
>>>>           at
>>>> uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:422)
>>>>           at
>>>> uk.me.parabola.imgfmt.app.lbl.LBLFileReader.
>>>> 
>> <init>
>>>> (LBLFileReader.java:75)
>>>>           at
>>>> uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326)
>>>>           at
>>>> uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313)
>>>>           at
>>>> uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259)
>>>>           at
>>>> uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152)
>>>>           at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:575)
>>>>           at
>>>> uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128)
>>>>           at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135)
>>>>           at uk.me.parabola.mkgmap.main.Main.main(Main.java:106)
>>>>
>>>> I would need any hint that helps me to reproduce the problem, so that
>>>> we
>>>> can debug it.
>>>>
>>>>
>> 
>> _______________________________________________
>> mkgmap-dev mailing list

>> mkgmap-dev at .org

>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
View this message in context: http://gis.19327.n8.nabble.com/Random-compiling-failures-tp5885477p5886479.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list