Bug report #9119

srs.db not closed (with OTF reprojection)

Added by Luigi Pirelli almost 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Projection Support
Affected QGIS version:master Regression?:No
Operating System:Debian wheezy Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17759

Description

Hi,

I have this erros during short time setting style o a spatialite layer. I don't know if this happend with other kind of vector layers.

I try to save QGIS or SLD style and I obtain thi error.

terminal says:

(qgis:2915): Gtk-WARNING **: Failed to read filechooser settings from "/home/ginetto/.config/gtk-2.0/gtkfilechooser.ini": Too many open files

It's hard to me to identify a procedure to reproduce the error.

This happend also with a single layer with single polygon project.

Context is:

QGIS version 2.1.0-Master QGIS code revision 4fd011f
Compiled against Qt 4.8.2 Running against Qt 4.8.2
Compiled against GDAL/OGR 1.9.0 Running against GDAL/OGR 1.9.0
Compiled against GEOS 3.3.3-CAPI-1.7.4 Running against GEOS 3.3.3-CAPI-1.7.4
PostgreSQL Client Version 9.1.9 SpatiaLite Version 2.4.0
QWT Version 6.0.0-svn PROJ.4 Version 470
QScintilla2 Version 2.6.2 This copy of QGIS writes debugging output.

History

#1 Updated by Matthias Kuhn almost 6 years ago

  • Status changed from Open to Feedback

Can you run the following command when this happens next time, replacing [qgis-pid] with the actual pid

ls -l /proc/[qgis-pid]/fd/

#2 Updated by Luigi Pirelli almost 6 years ago

hmmm... seems is related to my opened db by my new plugin

it's full of: /tmp/srs.db

generating 20 more every zoom!

so probably it's my fault... one more check and after I'll close this ticket

#3 Updated by Luigi Pirelli almost 6 years ago

no... it's not my fault!

on fly repropjection open 12 /tmp/srs.db EVERY zoom or canvas redraw!

I don't know if it's related with dataProvider type (spatialite)

it's possibile to generate e lot of /tmp/srs.db doing this steps:

0) open qgis
0.1) ls -l /proc/<qgis pid>/fd/ |wc = 18 (more or less constant during normal operation)
1) create a spatialite layer in a proyection (I've a multipolygon in srid 32632)
2) set project on fly projection with other srid (I've current srid to 3003)
3) load spatialite layer
4) ls -l /proc/<qgis pid>/fd/ |wc = X
5) zoom
6) ls -l /proc/<qgis pid>/fd/ |wc = X+12

probably we have to change the issue title to somthing like: "On the fly reprojection doesn't close related files /tmp/srs.db"

I leave this issue opened

#4 Updated by Giovanni Manghi almost 6 years ago

  • Affected QGIS version changed from 2.0.1 to master
  • Target version changed from Version 2.0.0 to Future Release - High Priority
  • Priority changed from Normal to Severe/Regression
  • Category changed from 83 to Projection Support

I cannot add any technical detail but I can certainly confirm this issue as I have seen it many times in the last days on qgis master.

#5 Updated by Matthias Kuhn almost 6 years ago

  • Status changed from Feedback to Open
  • Subject changed from "Too many open files" trying to save style to srs.db not closed (with OTF reprojection)

#6 Updated by Marco Hugentobler almost 6 years ago

  • Status changed from Open to Feedback

There was a missing delete / db close. However, it does not explain why the number of open db grows with every zoom.
Could you git pull and see if the issue is still there?

#7 Updated by Luigi Pirelli almost 6 years ago

it works :)

19 opened at the open of qgis
37 after opened my project... after a while down to 25
zoom... remain 25 and after a while down to 23!

gooooood :)

#8 Updated by Matthias Kuhn almost 6 years ago

Thank you for the quick fix Marco.
It seems this can be closed.

Out of curiosity, is there a reason to have it open more than once?

#9 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

Also available in: Atom PDF