Opened 13 years ago

Closed 8 years ago

#4049 closed defect (fixed)

GDAL on C# fails with System.AccessViolationException on .NET 4.0

Reported by: Abstraction Owned by: tamas
Priority: normal Milestone:
Component: CSharpBindings Version: 1.7.3
Severity: normal Keywords:
Cc:

Description

Minimal code to see this:

OSGeo.OGR.Ogr.RegisterAll(); OSGeo.OGR.Driver drv = OSGeo.OGR.Ogr.GetDriverByName("ESRI Shapefile");

The problem here is that static constructor OgrPINVOKE.SWIGStringHelper() isn't called in .NET 4.0 thus causing calling 0x0 address instead of callback function. Wasn't tested in 1.8.0.

Change History (5)

comment:1 by Even Rouault, 13 years ago

Component: defaultCSharpBindings
Owner: changed from warmerdam to tamas

comment:2 by Jukka Rahkonen, 9 years ago

Is this issue still there, tamas? If it is still an issue, what should be done for fixing it?

comment:3 by Jukka Rahkonen, 9 years ago

Repeating my question and hoping that someone who knows .NET is reading.

comment:4 by kellyelton, 8 years ago

This no longer happens in .net 4.0

comment:5 by Jukka Rahkonen, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.