[Gdal-dev] SetFeature crashing browser when used with OGR_L_GetFeature

Daniel Morissette dmorissette at mapgears.com
Tue Aug 22 06:34:18 EDT 2006


Hi Ben,

There may be a bug in the implementation of the PHP_OGR wrapper that 
frees the feature or does something illegal with it internally and that 
causes the crash.

Can you please post a bug with a complete test case (complete script and 
test dataset) in the GDAL bugzilla and make sure it is assigned to me? 
I'm not sure when we'll be able to look into it due to other priorities, 
but with a complete test case that will be easier.

Daniel



Ben Crane wrote:
> Hi all,
> 
> Daniel, thanx for the setfeature command, works like a
> charm and is surprisingly quick (no insult meant :).
> One thing though, now I have tried to select specific
> rows to re-write a feature. This does work, but in an
> odd way. What happens is that the browser tries to run
> the php script, I then get the standard Win XP crash
> message saying the PHP Script Interpreter has
> encountered an error and needs to close. The script
> then finishes, and then runs perfectly with the
> updated field present....very wierd.
> 
> Here is a section of code that is causing offense:
> 
> $tFeature = OGR_L_GetFeature( $hLayer, 1 );
> OGR_F_SetFieldString( $tFeature, 1, "test string" );
> OGR_L_SetFeature ($hLayer, $tFeature );
> 
> In particular, if I don't use $tFeature, then the
> browser doesn't crash, when I do try to select a
> specific feature, the SetFeature command causes the
> browser to crash. Any ideas...ironically it does work,
> but each time I get the Win XP IE "error, must close"
> message.
> 
> I've hunted around for other commands that may be
> required, but can't find any...I've even tried the
> Get_Fid command instead of manually assigning a
> feature ID. 
> 
> Thanx,
> Ben
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
> 


-- 
Daniel Morissette
http://www.mapgears.com/



More information about the Gdal-dev mailing list