Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5775 closed defect (fixed)

Segmentation fault with OGR_SKIP and LIBKML

Reported by: juliomalegria Owned by: warmerdam
Priority: normal Milestone: 1.11.2
Component: OGR_SF Version: 1.11.1
Severity: normal Keywords: libkml, segmentation fault, crash
Cc:

Description (last modified by juliomalegria)

Hey guys,

This is how you can repro this (you need to have LIBKML compiled):

$ ogrinfo --version
GDAL 1.11.1, released 2014/09/24

$ ogrinfo --formats | grep KML
  -> "LIBKML" (read/write)
  -> "KML" (read/write)

$python
from osgeo import ogr
ogr.RegisterAll()
ogr.RegisterAll()
# This works ...

$python
import os
os.environ['OGR_SKIP'] = 'LIBKML'
from osgeo import ogr
ogr.RegisterAll()
ogr.RegisterAll()
Segmentation fault

I works if I skip any other library

$python
import os
os.environ['OGR_SKIP'] = 'GeoJSON'
from osgeo import ogr
ogr.RegisterAll()
ogr.RegisterAll()
# This also works ..

Change History (3)

comment:1 by juliomalegria, 9 years ago

Description: modified (diff)

comment:2 by Even Rouault, 9 years ago

Milestone: 1.11.2
Resolution: fixed
Status: newclosed

branches/1.11 r28157 "LIBKML: when skipped, fix segfault on second OGRRegisterAll() call (#5775)"

Was fixed in trunk with RFC 46 works

comment:3 by Even Rouault, 9 years ago

branches/1.11 r28162, trunk r28163 "LIBKML: do not delete the libkml singleton factory. Causes weird issues (sometimes...) with Python autotest suite when it explicitely tries to call OGRCleanupAll(). And on Windows there might be cross-heap issues in using delete on the factory pointer (linked to #5775)"

Note: See TracTickets for help on using tickets.