Opened 14 years ago

Closed 14 years ago

#3325 closed defect (fixed)

PCIDSK: Creating a tiled image and reopening the tiled image with another CPCIDSKFile instance fails

Reported by: pvachon Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: PCIDSK libpcidsk
Cc:

Description

Whenever creating a tiled PCIDSK image, filling it with some data, then attempting to re-open it before deleting the CPCIDSKFile that created the image, the following exception is thrown from GetVirtualFile() at line 339 in sysblockmap.cpp:

"GetImageSysFile(n): invalid image index"

I presume this is due to file structure not being finalised, but I haven't had time to look into tracking down the issue.

Change History (2)

comment:1 by warmerdam, 14 years ago

Component: defaultGDAL_Raster
Status: newassigned

I will look into having a synchronization method available on the PCIDSK file. There are non-trivial dangers with having more than on PCIDSKFile instance open on a pcidsk file with update access at the same time. There is no cross-process or even cross PCIDSKFile locking mechanism in place currently to make this safe.

comment:2 by warmerdam, 14 years ago

Resolution: fixed
Status: assignedclosed

I have introduced a Synchronize() method on the PCIDSK::PCIDSKFile class (r18547) which will ensure that all pending writes are flushed to disk. In the case of the tiled channels this means that the last updated block, and the block maps are written out to disk. It also is an issue for metadata.

Let me know if you would like me to press ahead with some sort of more comprehensive synchronization support.

Note: See TracTickets for help on using tickets.