Opened 17 years ago

Closed 17 years ago

#1759 closed defect (fixed)

GDAL GPF's in CreateCopy(...) for all Tif's when statically linked into a DLL

Reported by: negeelum Owned by: warmerdam
Priority: high Milestone: 1.4.3
Component: default Version: 1.4.1
Severity: normal Keywords: geotiff
Cc:

Description

Dear GDAL community PLEASE help!!!

I am using the latest version of GDAL in this Windows project. GDAL was built on Windows XP, using MSVC8 for this project, then it is statically linked into another library. So bottom line I am using the static version of GDAL that gets linked into another static library, which is then linked into a DLL. This DLL functions a wrapper/interface for Java programs to use GDAL. When the Java sample runs it tries to open up an image then it creates a copy to save back out. This DLL works perfectly for all file formats except for Tif's! When trying to create the copy GDAL has a GPF in the GDAL CreateCopy(...) method. All other image file formats work, and Tifs work when the lib is used directly bypassing the DLL.

Has anyone else had these problems with GTiff and Tiffs? Thanks in advance!

Steven Matyk GCS Research smatyk@…

Attachments (1)

gdal_svn_trunk_addition_to_1759.patch (2.2 KB ) - added by Even Rouault 17 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by warmerdam, 17 years ago

Keywords: geotiff added
Milestone: 1.4.3
Status: newassigned

Hi,

I'm guessing this is the same problem described and fixed in #1736. Basically GeoTIFF createcopy is allocating very large arrays (several hundred kilobytes) on the stack and this blows the stack for situations with modest stacks (likely this includes java virtual machines).

You can grab a 1.4 branch snapshot (http://download.osgeo.org/gdal/daily/) or apply the patch described in #1736. Please close this bug with status "duplicate" if this turns out to be the issue. Otherwise we will need to dig deeper and see what could be happening.

comment:2 by Even Rouault, 17 years ago

I think we should also apply the attached patch that fixes the same kind of issue for gt_overview.cpp

by Even Rouault, 17 years ago

comment:3 by warmerdam, 17 years ago

Additional patch applied in trunk (r12108) and 1.4 branch (r12109).

Thanks!

comment:4 by warmerdam, 17 years ago

Resolution: fixed
Status: assignedclosed

This seems to be fixed, and we have had no feedback to the contrary, closing.

Note: See TracTickets for help on using tickets.