Opened 17 years ago

Closed 5 years ago

#1648 closed defect (wontfix)

S-57 Update Crash with ATTF

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: OGR_SF Version: 1.4.0
Severity: normal Keywords: s57
Cc: blackmoreb

Description

ogrinfo crashes when attempting to open JP352BRG.000/001. Traceback:

(gdb) where 5
#0  0x00002aaaaae2e5c1 in DDFField::GetRepeatCount (this=0x0)
    at ddffield.cpp:207
#1  0x00002aaaab1caecc in S57Reader::ApplyRecordUpdate (this=0x2aaaaeab5010, 
    poTarget=0x60e770, poUpdate=0x663830) at s57reader.cpp:2484
#2  0x00002aaaab1cb2f2 in S57Reader::ApplyUpdates (this=0x2aaaaeab5010, 
    poUpdateModule=0x7fffffe387d0) at s57reader.cpp:2618
#3  0x00002aaaab1cb612 in S57Reader::FindAndApplyUpdates (
    this=0x2aaaaeab5010, pszPath=0x51fb30 "JP352BRG.000")
    at s57reader.cpp:2718
#4  0x00002aaaab1c5b2a in S57Reader::Ingest (this=0x2aaaaeab5010)
    at s57reader.cpp:444

It appears the update adds some attributes to ATTF, but the .000 file had no ATTF at all.

Change History (8)

comment:1 by warmerdam, 17 years ago

Status: newassigned

Analysis confirmed. The crash occurs applying this update record:

Record 9 (114 bytes)
    Field 0001: ISO/IEC 8211 Record Identifier
    Field FRID: Feature Record Identifier field
        RCNM = 100
        RCID = 259
        PRIM = 1
        GRUP = 2
        OBJL = 129
        RVER = 2
        RUIN = 3
    Field FOID: Feature Object Identifier field
        AGEN = 260
        FIDN = 35320560
        FIDS = 259
    Field ATTF: Feature Record Attribute field
        ATTL = 148
        ATVL = `JP,JP,graph,K1045'
        ATTL = 147
        ATVL = `20060406'

To this target feature record which has no ATTF:

Record 1924 (91 bytes)
    Field 0001: ISO/IEC 8211 Record Identifier
    Field FRID: Feature Record Identifier field
        RCNM = 100
        RCID = 259
        PRIM = 1
        GRUP = 2
        OBJL = 129
        RVER = 1
        RUIN = 1
    Field FOID: Feature Object Identifier field
        AGEN = 260
        FIDN = 35320560
        FIDS = 259
    Field FSPT: Feature Record to Spatial Record Pointer field
        NAME = 0x6EEC000000     VRID RCNM = 110,RCID = 236
        ORNT = 255
        USAG = 255
        MASK = 255

The correct fix is to create an ATTF field in this situation. The minimum workaround is to avoid a crash in this situation.

comment:2 by blackmoreb, 17 years ago

Cc: blackmoreb added

comment:3 by warmerdam, 17 years ago

r11628 patches this in 1.4.x branch so there is no crash, though the update is not properly applied. (an error is issued).

comment:4 by warmerdam, 17 years ago

Milestone: 1.4.21.5.0

That's all I'm going to do in 1.4.x, so I'm retargetting this to 1.5

comment:5 by warmerdam, 16 years ago

Milestone: 1.5.01.5.1

comment:6 by Jukka Rahkonen, 10 years ago

If I knew what is "JP352BRG.000/001" I would probably test what happens with GDAL 1.11.

comment:7 by Even Rouault, 9 years ago

Milestone: 1.8.1

Removing obsolete milestone

comment:8 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: assignedclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.