Bug report #9357

Updated by Giovanni Manghi about 6 years ago

I have a standalone python script that creates a bunch of PDFs for me.

Recently this script has developed an issue. It uses QGIS-dev so it could be related to some of the changes in master recently as it works fine with QGIS 2.0.

It makes about 42 PDFs then it stops.

It is not actually crashing as such, as you can see it running in task manager. It stays running using between 0 and 2% processor, and fluctuates a little with memory use (around 108840kB). But it does not produce any more PDFs. It is like it is stuck.

From the log file that my script creates, I know that it is hanging with this line of code:

@vlayer = QgsVectorLayer(uri.uri(), layerName, "postgres")@

If I try and connect to the database using DB Manager in QGIS or pgAdmin III while the script is still running, I get an error saying there is already too many clients already. If I kill the process in windows task manager, I am then able to connect to the database using DB manager.

Has anyone any suggestions as to what is wrong here? Is this a bug?

I updated QGIS dev this morning using the OSGeo4W installer (its revision is commit:eb9ce3a).

As per Tim's response on the "qgis-developer mailing list":http://lists.osgeo.org/pipermail/qgis-developer/2014-January/030280.html, I added code to remove my PostGIS layers from the MapLayerRegistry when I was finished with them, but this has made no difference, and I didn't need to do this using QGIS 2.0.