atom feed18 messages in net.java.dev.imageio-ext.devRE: Errors reading MrSID on linux
FromSent OnAttachments
Nidel, MikeJul 29, 2008 6:19 am 
Daniele RomagnoliJul 29, 2008 6:41 am 
Nidel, MikeJul 29, 2008 6:44 am 
Daniele RomagnoliJul 29, 2008 6:51 am 
Nidel, MikeJul 29, 2008 7:00 am 
Nidel, MikeJul 29, 2008 7:15 am 
Daniele RomagnoliJul 29, 2008 7:16 am 
Daniele RomagnoliJul 29, 2008 7:18 am 
Nidel, MikeJul 29, 2008 7:20 am 
Nidel, MikeJul 29, 2008 7:26 am 
Daniele RomagnoliJul 29, 2008 7:32 am 
Nidel, MikeJul 29, 2008 7:35 am 
Daniele RomagnoliJul 29, 2008 7:45 am 
Nidel, MikeJul 29, 2008 7:50 am 
Nidel, MikeJul 29, 2008 8:10 am 
Nidel, MikeJul 29, 2008 8:15 am 
Nidel, MikeJul 29, 2008 8:37 am 
Nidel, MikeJul 29, 2008 1:10 pm 
Subject:RE: Errors reading MrSID on linux
From:Nidel, Mike (mike@lmco.com)
Date:Jul 29, 2008 8:15:40 am
List:net.java.dev.imageio-ext.dev

Here's the native code which throws the error in gdal_wrap.cpp:

if (jarg2 && jenv->GetArrayLength(jarg2) != 6) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "incorrect array size"); return ; }

obviously somehow JNI is deciding that the array size coming in is not 6! I don't know how this could happen...

________________________________

From: Nidel, Mike Sent: Tuesday, July 29, 2008 11:11 AM To: 'de@imageio-ext.dev.java.net' Subject: RE: Errors reading MrSID on linux

OK I'm focusing on the error I get on x86_64 which is a Java error and seemingly more manageable.

The error is an index out of bounds error:

java.lang.IndexOutOfBoundsException: incorrect array size at org.gdal.gdal.gdalJNI.Dataset_GetGeoTransform(Native Method) at org.gdal.gdal.Dataset.GetGeoTransform(Dataset.java:77) at it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.setGeor eferencingInfo(GDALCommonIIOImageMetadata.java:271)

This is obviously happening at the JNI interface to GDAL. What I don't understand at all is that I modified Dataset.java to print out the array length and it's always 6. What could possibly be causing such an error? I'm going to look at the CPP code next.

________________________________

From: Daniele Romagnoli [mailto:dany@gmail.com]

Sent: Tuesday, July 29, 2008 10:46 AM To: de@imageio-ext.dev.java.net Subject: Re: Errors reading MrSID on linux

On Tue, Jul 29, 2008 at 4:35 PM, Nidel, Mike <mike@lmco.com> wrote:

Yes and no...

I have only built imageio-ext on Windows. I don't have maven installed on the linux server where I'm building the GDAL .so files. I was working on the assumption that the jar files built on Windows (imageio-ext-gdalframework, imageio-ext-gdalmrsid, imageio-ext-gdal etc.) would work fine in my Java program on Linux. Is this a bad assumption?

I guess it's not a bad assumption. The important thing is that if you are using GDAL 1.5, you need to use the modified gdalframework as well as the modified imageio-ext-gdal (the JNIs). Anyway, Windows an Linux version need to leverages on the proper GDAL 1.5 build (DLL/SO) as well as the proper JNI native libraries build (SWIG generated). On Linux, do you have a proper GDAL 1.5 SO as well as the SWIG generated JNI SO bindings?

Daniele

So on Windows all I need to properly perform the maven tests is to add these jars to the PATH

________________________________

From: Daniele Romagnoli [mailto:dany@gmail.com]

Sent: Tuesday, July 29, 2008 10:32 AM

To: de@imageio-ext.dev.java.net Subject: Re: Errors reading MrSID on linux

On Tue, Jul 29, 2008 at 4:20 PM, Nidel, Mike <mike@lmco.com> wrote:

How does the maven build for imageio-ext locate the GDAL DLLs?

I guess you are talking about the GDAL SOs :) The maven build uses a JVM for tests. It looks for the Dynamic libs in the Load Library Path. A typical location where to put your SOs could be the JRE/lib/i386 folder or some other locations properly referred by the LD_LIBRARY_PATH.

Do I need to copy them from my GDAL build into the repository or someplace?

________________________________

From: Daniele Romagnoli [mailto:dany@gmail.com]

Sent: Tuesday, July 29, 2008 10:19 AM

To: de@imageio-ext.dev.java.net Subject: Re: Errors reading MrSID on linux

Which fail occurs? Did you checked you are using the right JNI libs with the related JNI.jar? Remind that Imageio-ext is actually leveraging on GDAL 1.4.4.

Let me know. Daniele

On Tue, Jul 29, 2008 at 4:15 PM, Nidel, Mike <mike@lmco.com> wrote:

I should mention that the tests fail during the maven build... I always just assumed there was something wrong with the tests but maybe I need to configure something else that's not mentioned in the setup doc?

________________________________

From: Daniele Romagnoli [mailto:dany@gmail.com]

Sent: Tuesday, July 29, 2008 9:52 AM

To: de@imageio-ext.dev.java.net Subject: Re: Errors reading MrSID on linux

On Tue, Jul 29, 2008 at 3:44 PM, Nidel, Mike <mike@lmco.com> wrote:

I'm using the jars that I built on Windows -- They are taken from the imageio-ext trunk although I haven't done an update in several weeks.

In such a case, I dont understand why they work on windows while they don't on linux. Maybe some maven call (did you used maven?) mixed the version although I didn't deployed any new module to refractions and therefore you should have the old ones. Can you tell me which revision do you have of imageio-ext?

Do you think I should check out the latest code?

Daniele

________________________________

From: Daniele Romagnoli [mailto:dany@gmail.com] Sent: Tuesday, July 29, 2008 9:41 AM To: de@imageio-ext.dev.java.net Subject: Re: Errors reading MrSID on linux

Hi Mike, it seems a very strange error.

Just some questions: did you updated and built imageio-ext on linux or are you using old jars (deployed on refractions)? This week, I'm doing some changes on metadata classes (Although without modifying the interfaces. I just simply collected some common methods within another module). Before deploying the new modules on refractions (the remote repo where imageio-ext will look for jars when they are not locally available), I wish to end some refactorings on other Not-Imageio-ext modules.

Did you tried a clean build of your imageio-ext? I guess you are working with some updated code on trunk using some jars on your local repo which aren't updated. Can you let me know if this solve your problem?

Finally, is that data available somewhere so I can download it and get a try in case the error still exsist?

Cheers, Daniele

On Tue, Jul 29, 2008 at 3:19 PM, Nidel, Mike <mike@lmco.com> wrote:

I have two linux systems, one is AMD x86_64 and the other is i386/i686. I've built GDAL and I'm using imageio-ext on top of it to read MrSID imagery. It's working fine on Windows but on these two systems I get two different errors.

First, on the x86_64 system:

java.lang.IndexOutOfBoundsException: incorrect array size at org.gdal.gdal.gdalJNI.Dataset_GetGeoTransform(Native Method) at org.gdal.gdal.Dataset.GetGeoTransform(Dataset.java:76) at

it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.setGeor

eferencingInfo(GDALCommonIIOImageMetadata.java:323) at

it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.<init>( GDALCommonIIOImageMetadata.java:265) at

it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.<init>( GDALCommonIIOImageMetadata.java:305) at

it.geosolutions.imageio.gdalframework.GDALImageReader.createDatasetMetad ata(GDALImageReader.java:304) at

it.geosolutions.imageio.gdalframework.GDALImageReader.initialize(GDALIma geReader.java:272) at

it.geosolutions.imageio.gdalframework.GDALImageReader.getNumImages(GDALI mageReader.java:1033)

Second, on the i386 system:

ERROR 5: GDALDataset::GetRasterBand(-1945631748) - Illegal band #

Creating FileImageInputStreamExtImpl ERROR 5: GDALDataset::GetRasterBand(-1945631684) - Illegal band #

Closing /external/mnidel/superoverlay/../testdata/Baghdad_2006_R1C1.sid java.lang.NullPointerException at

it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.setMemb ers(GDALCommonIIOImageMetadata.java:349) at

it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.<init>( GDALCommonIIOImageMetadata.java:264) at

it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.<init>( GDALCommonIIOImageMetadata.java:288) at

it.geosolutions.imageio.gdalframework.GDALCommonIIOImageMetadata.<init>( GDALCommonIIOImageMetadata.java:208) at

it.geosolutions.imageio.plugins.mrsid.MrSIDIIOImageMetadata.<init>(MrSID IIOImageMetadata.java:59) at

it.geosolutions.imageio.plugins.mrsid.MrSIDImageReader.createDatasetMeta data(MrSIDImageReader.java:61) at

it.geosolutions.imageio.gdalframework.GDALImageReader.initialize(GDALIma geReader.java:260) at

it.geosolutions.imageio.gdalframework.GDALImageReader.getNumImages(GDALI mageReader.java:1033)

This second error looks like an architecture/datatype issue but I really have no idea. Have you seen either of these before?

thanks,

Mike

--------------------------------------------------------------------- To unsubscribe, e-mail: dev-@imageio-ext.dev.java.net For additional commands, e-mail: dev-@imageio-ext.dev.java.net

--

------------------------------------------------------- Eng. Daniele Romagnoli Software Engineer

GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy

phone: +39 0584983027 fax: +39 0584983027 mob: +39 328 0559267

http://www.geo-solutions.it

-------------------------------------------------------

--

------------------------------------------------------- Eng. Daniele Romagnoli Software Engineer

GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy

phone: +39 0584983027 fax: +39 0584983027 mob: +39 328 0559267

http://www.geo-solutions.it

-------------------------------------------------------

--

------------------------------------------------------- Eng. Daniele Romagnoli Software Engineer

GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy

phone: +39 0584983027 fax: +39 0584983027 mob: +39 328 0559267

http://www.geo-solutions.it

-------------------------------------------------------

--

------------------------------------------------------- Eng. Daniele Romagnoli Software Engineer

GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy

phone: +39 0584983027 fax: +39 0584983027 mob: +39 328 0559267

http://www.geo-solutions.it

-------------------------------------------------------

-- ------------------------------------------------------- Eng. Daniele Romagnoli Software Engineer

GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy

phone: +39 0584983027 fax: +39 0584983027 mob: +39 328 0559267

http://www.geo-solutions.it