Opened 16 years ago

Closed 16 years ago

#1006 closed defect (worksforme)

OGR provider opens multiple files per layer

Reported by: gsherman Owned by: warmerdam
Priority: major: does not work as expected Milestone:
Component: OGR Layer support Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Add a layer to newly started QGIS (for example, alaksa.shp) and check the open files:

lsof|grep alaska
qgis      30489   gsherman   10u      REG        8,6   260576    98290 /opt/atlas_revision/data/alaska.shp
qgis      30489   gsherman   12u      REG        8,6     5388    98295 /opt/atlas_revision/data/alaska.shx
qgis      30489   gsherman   13u      REG        8,6    27231    98182 /opt/atlas_revision/data/alaska.dbf
qgis      30489   gsherman   15u      REG        8,6   260576    98290 /opt/atlas_revision/data/alaska.shp
qgis      30489   gsherman   16u      REG        8,6     5388    98295 /opt/atlas_revision/data/alaska.shx
qgis      30489   gsherman   18u      REG        8,6    27231    98182 /opt/atlas_revision/data/alaska.dbf
qgis      30489   gsherman   20r      REG        8,6    34472    98238 /opt/atlas_revision/data/alaska.qix

Remove the layer from the canvas by right-clicking and choosing Remove. Open files are now:

lsof|grep alaska
qgis      30489   gsherman   10u      REG        8,6   260576    98290 /opt/atlas_revision/data/alaska.shp
qgis      30489   gsherman   12u      REG        8,6     5388    98295 /opt/atlas_revision/data/alaska.shx
qgis      30489   gsherman   13u      REG        8,6    27231    98182 /opt/atlas_revision/data/alaska.dbf

It seems that the layer should only be opened once and all files closed when the layer is removed from the canvas.

Change History (2)

comment:1 by warmerdam, 16 years ago

Gary,

I tried reproducing this but was unsuccessful.

I added a polygon shapefile layer and got:

COMMAND  PID     USER   FD   TYPE DEVICE     SIZE     NODE NAME
xmms    6633 warmerda    8r   REG   0,25 14372058 14745602 /usr3/mp3s/Pink Floyd/Animals/02 - Dogs.mp3 (gdal6:/usr3)
qgis    7196 warmerda   11u   REG   0,25   175784  8126495 /usr3/data/esri/shape/eg_data/polygon.shp (gdal6:/usr3)
qgis    7196 warmerda   12u   REG   0,25     3892  8126496 /usr3/data/esri/shape/eg_data/polygon.shx (gdal6:/usr3)
qgis    7196 warmerda   13u   REG   0,25   159752  8126490 /usr3/data/esri/shape/eg_data/polygon.dbf (gdal6:/usr3)

Then removed it and get:

COMMAND  PID     USER   FD   TYPE DEVICE     SIZE     NODE NAME
xmms    6633 warmerda    8r   REG   0,25 14372058 14745602 /usr3/mp3s/Pink Floyd/Animals/02 - Dogs.mp3 (gdal6:/usr3)

This was done with a qgis built from head today.

comment:2 by jef, 16 years ago

Resolution: worksforme
Status: newclosed

It wasn't reproduceable here either. Feel free to reopen, if the issue still exists.

Note: See TracTickets for help on using tickets.