Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3238 closed defect (fixed)

SWIG java binding pointer-dereference error

Reported by: collinsb Owned by: Even Rouault
Priority: normal Milestone:
Component: JavaBindings Version: 1.6.2
Severity: normal Keywords:
Cc:

Description

The "%define OPTIONAL_POD(type,argstring)" from the jave typemaps does not work for the optional_int* used when doing a read_raster on a dataset with multiple bands. The attached patch calls the JVM to get the int array elements. This is not a great general solution but it's better than the fully broken code that's there now.

Attachments (1)

typemap.patch (1.8 KB ) - added by collinsb 14 years ago.

Download all attachments as: .zip

Change History (3)

by collinsb, 14 years ago

Attachment: typemap.patch added

comment:1 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Indeed, the GDAL bindings for GDAL 1.6 are known to be broken in many parts, because there was a lack for a GDAL Java binding maintainer in the 1.5 and 1.6 versions. I've completely reworked them in trunk for the future GDAL 1.7 and they should be pretty more usable. Your patch made me realize that this typemap wasn't used anymore, so I've just remove it (r18044)

So I'd encourage you trying trunk and report if you see any problem. See http://gdal.org/java for the new API.

If you can't use trunk, I know that some projects have grabbed the trunk Java bindings from trunk in 1.6 branch (a copy&paste of the swig directory + minor editing should do)

comment:2 by Even Rouault, 14 years ago

I meant : "the GDAL *Java* bindings for GDAL 1.6 are known to be broken".... Other bindings like python, perl, c# worked fine

Note: See TracTickets for help on using tickets.