#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)
Change History (3)
by , 14 years ago
Attachment: | typemap.patch added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 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.
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)