Ticket #382 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

"Memory allocation failed" when attempting to get FGF text from certain features

Reported by: jng Owned by: gregboone
Priority: critical Milestone: 3.4.0
Component: FDO API Version: 3.2.0
Severity: 1 Keywords:
Cc: mloskot External ID:

Description (last modified by mloskot) (diff)

Trying to get the fgf text from certain geometries will result in a "Memory allocation failed" error being thrown.

Steps to reproduce:

  • Connect to Parcels.shp in Providers/SHP/TestData/Sheboygan
  • Get the fgf binary of FeatId? = 97
  • Create an IGeometry instance from this fgf
  • Call the Text property, the error is thrown here

mloskot: I have added reference to the thread on the list:  How does FDO handle invalid fgf geometries?

Attachments

PatchFor#382.patch Download (29.6 KB) - added by gregboone 5 years ago.
Resolution of the issue

Change History

Changed 5 years ago by mloskot

  • cc mloskot added
  • description modified (diff)

Changed 5 years ago by jng

Additional notes by Dan Stoica:

Did some investigations on this matter. Turns out that:

a) the polygon in question has a ring which is not closed. b) the geometry factory throws an appropriate exception "Open ring" c) the exception is not caught by GetText?() d) for some odd reason the exception is turned into "memory allocation error"

Changed 5 years ago by gregboone

  • status changed from new to assigned

Changed 5 years ago by gregboone

  • milestone set to 3.4.0

Changed 5 years ago by gregboone

Resolution of the issue

Changed 5 years ago by gregboone

  • status changed from assigned to closed
  • resolution set to fixed

Changed 5 years ago by mloskot

For easier reference, the fix submission is r4080

Note: See TracTickets for help on using tickets.