Ticket #1571 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

OGR/Mapserver STYLEITEM "AUTO" broken in GDAL 1.4.1?

Reported by: wollah Assigned to: dmorissette
Priority: normal Milestone: 1.4.2
Component: OGR_SF Version: 1.4.1
Severity: normal Keywords: mitab style
Cc: dmorissette, warmerdam

Description

This pertains to GDAL 1.4.1/Mapserver 4.9. After upgrading from GDAL 1.3.2 to 1.4.1 STYLEITEM AUTO stopped working with most of the MapInfo? TAB files in my project. With GDAL 1.3.2. the same mapfile worked fine. All ANNOTATION layers and some of the LINE layers don't display now ("premature end of script headers..."). All the files display fine in FME, QGIS, MapInfo?, and they display with OGR when omitting STYLEITEM AUTO. I attach two non-working examples: DI_Ltg (LINE) and DI_Flurx (ANNOTATION).

Wollah

Attachments

Kataster.zip (24.7 kB) - added by wollah on 04/10/07 13:33:39.
Zipped MapInf?ó data
valgrind-1.3.2_DI_Flurx.err (1.9 kB) - added by wollah on 04/12/07 03:24:50.
valgrind-1.4.1_DI_Flurx.err (5.6 kB) - added by wollah on 04/12/07 03:25:12.
valgrind-1.4.1_DI_Ltg.err (8.2 kB) - added by wollah on 04/12/07 03:25:29.

Change History

04/10/07 13:33:39 changed by wollah

  • attachment Kataster.zip added.

Zipped MapInf?ó data

04/10/07 14:34:20 changed by warmerdam

  • keywords set to mitab style.
  • owner changed from warmerdam to mloskot.
  • version changed from unspecified to 1.4.1.
  • component changed from default to OGR_SF.
  • cc set to dmorissette, warmerdam.

Mateusz,

Could you review differences in style strings returned for the above dataset, and document here? We will likely need to follow up with Daniel if there is a change that looks like it is broken. For now lets try to analyse this with ogrinfo rather than trying it with MapServer?.

It is also desirable to compare 1.4.1 to 1.4.0 and trunk to see if any issue might already have been fixed in MITAB.

04/10/07 15:40:39 changed by dmorissette

"premature end of script headers..." suggests that mapserver is crashing with GDAL 1.4.1 on those files. For this reason I suspect the issue is not related to the style strings but perhaps to some other changes in the MITAB lib. I'm leaving in a few minutes for the rest of the week so I can't test myself now, but I'd suggest that you start by a valgrind of ogrinfo on the files to see if that reports anything obvious.

04/11/07 09:11:53 changed by wollah

I have been digging around a little and found the following:

this issue does not show up in my Windows builds (VC++7.0) of the same source trees (1.4.0/1.4.1/nightly snapshots). Thus, it is only occurring when built on my Linux Debian 3.1). The last working version is 1.3.2.0, released 2006/05/02. This looks quite strange to me.

04/11/07 10:51:50 changed by warmerdam

I would agree with Daniel. Do a quick test of an "ogrinfo -al" report on the dataset with valgrind and if that is clean, close the problem as "works for me", and let Wollah follow up with MapServer? and sufficient detail to reproduce the problem.

04/12/07 03:24:50 changed by wollah

  • attachment valgrind-1.3.2_DI_Flurx.err added.

04/12/07 03:25:12 changed by wollah

  • attachment valgrind-1.4.1_DI_Flurx.err added.

04/12/07 03:25:29 changed by wollah

  • attachment valgrind-1.4.1_DI_Ltg.err added.

04/12/07 03:26:08 changed by wollah

I did some testing with gdal-1.3.2/1.4.1/valgrind and the mapserver tool 'shp2img' on two of the datasets in question. Attached is the output of valgrin ("valgrind --leak--check=yes"). HTH

05/02/07 15:01:08 changed by dmorissette

  • owner changed from mloskot to dmorissette.

Based on the Valgrind outputs I believe the issue is that OGRStyleTool::GetRGBFromString() receives a NULL pszColor and doesn't check that case. This would be related to the following MapServer? bug: http://trac.osgeo.org/mapserver/ticket/1950

This bug is fixed in MapServer?'s SVN trunk and in the 4.10 branch (will be in 4.10.2), but I think we should still make GetRGBFromString() more robust by checking if the pszColor is NULL before calling sscanf. I'll make that change.

05/02/07 15:47:16 changed by dmorissette

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in SVN trunk in r11398 (not backported to 1.4).

05/02/07 16:09:37 changed by warmerdam

Backported to 1.4 (r11399)

05/02/07 16:09:50 changed by warmerdam

  • milestone set to 1.4.2.