[Gdal-dev] Null-Pointer in GDALOpen?

Mateusz Loskot mateusz at loskot.net
Mon Oct 22 14:02:43 EDT 2007


Tom Kazimiers wrote:
> 
> thanks for the replys.
> Sure I do test against null - the posted code was just an excerpt :) -
> thanks anyway.
> And yes, the crash occurs within GDALOpen() - I put a MessageBox before
> and after GDALOpen() - only the first one appeared, than the crash.
> The file handle explanation looked promising but before this line is
> arrived I still can open files plus after a restart it also does not work.

Tom,

It sounds strange. Perhaps you could post complete snippet of code,
then it will be easier to investigate it.

> The path "a.tif" is the full path of the file as this image is stored in
> root directory of Windows CE 5.

Do you mean that using file name only works like full path to root
directory \, then it's wrong. It doesn't work this way under Windows CE.

If you use only file name, it's assumed you open it from \My Documents,
which is a default data location under Windows CE.

> The last thing I tryed was to put "GDALAllRegister();" right befor
> GDALOpen() - before this I did it in completely different function,
> which I think, should work, too.
> But also this change did it not...

Another thing I'd suggest to check is to see if you have built GDAL with
 GTiff driver, means check if the GTiff driver is properly registered
and available, in run-time.

p.s. Please, use Reply To All, so gdal-dev address is included.
Otherwise, you reply only to post author, me in this case,
but not the list.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list