[gdal-dev] Re: GDALOverviews.cs gdal 1.5
Tamas Szekeres
szekerest at gmail.com
Fri Dec 28 18:41:28 EST 2007
Hi,
It seems the recently added callback support have broken some of the
existing functions at the SWIG C# interface. In order to make this
callback stuff work some typemaps should also be added that I've
originally planned to implement later.
But as looking into the code since the problem is critical and it
seems quite an easy to implement this, I'll commit a fix in the SVN
trunk and the branch 5.0 in a couple of hours.
You can submit a ticket for this problem till then.
http://trac.osgeo.org/gdal/newticket
Best regards,
Tamas
2007/12/29, luizmottanet at hotmail.com <luizmottanet at hotmail.com>:
> I run the example for C#:
> ..\FWTools2.0.4\csharp\apps\GDALOverviews.cs
>
> The method Dataset.BuildOverviews(string resampling, int[] overviewlist)
> make exception: "Attempt to dereference null GDALProgressFunc".
> In the FWTools 2.0.0. this method run perfect.
>
> I read source files where have the exception menssage.
>
> I believe the solution for call in:
> CSharp_Dataset_BuildOverviews and CSharp_Driver_CreateCopy
> where use the pointer to GDALProgressFunc is to not test null argument pass in calls
>
> File:
> ..\gdal-1.5.0\swig\csharp\gdal\gdal_wrap.cpp
>
> Line/Methods:
> a) 2483/SWIGEXPORT void * SWIGSTDCALL CSharp_Driver_CreateCopy(void * jarg1, char * jarg2, void * jarg3, int jarg4, void * jarg5, void * jarg6, void * jarg7)
>
> in line 2501 remove the test
> if (!argp6) ...
>
> b) 4670/SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_BuildOverviews(void * jarg1, char * jarg2, int jarg3, void * jarg4, void * jarg5, void * jarg6)
>
> in line 4686 remove test
> if (!argp5)
>
>
> The null values are test in the other call, how
> ..\gdal-1.5.0\gcore\gdaldataset.cpp
> 1122/CPLErr GDALDataset::BuildOverviews(...
>
> in line 1142 have test for null pointer to argument GDALProgressFunc.
>
> I beginner in use GDAL (one month) and C# (one year), is difficult for me compile the source, the makefile use very files, and my target is only one.
>
> In the other moment, next year, i would like use the ProgressFunc, where, change the class
> SWIGTYPE_p_GDALProgressFunc.
>
> If you don´t work in this topic, see you next year.
>
> I don´t like leave work for next year, but, this year is end, them
>
> Happy new year !
>
> Thank´s for read the menssage.
> Luiz Motta
>
>
>
>
>
>
More information about the gdal-dev
mailing list