Bug report #6440
qgis master [windows,linux] will die opening a project after saving a project
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||15681|
Finally managed to come up with easy steps to reproduce a long-standing (memory?) issue with qgis master that results in qgis being hyper slow in loading a project file and often simply crashing before project is fully loaded.
Steps to reproduce this critical issue:
1. Open QGIS
2. Load a project file (if possible, with at least a 20 layers)
3. After loading, click on the "Save Project" button
4. Then, re-load the same project (via menu's recent project or by selection project in file dialogue box, doesn't matter)
Upon loading a project after saving an ongoing project, QGIS becomes increasingly slow at loading each layer of project being loaded, and eventually can crash while loading. I've been seeing this problem with both my windows and linux machine.
Not sure what is causing this; memory corruption in the saving project function? It is a regression from previous versions of QGIS, and a big one at it.
#2 Updated by Giuseppe Sucameli almost 7 years ago
- Status changed from Open to Feedback
I'm unable to reproduce the bug on by Ubuntu 11.04.
I've made some changes to project opening and closing in commit bc1bce195e, maybe that commit fixed also this problem and that's the reason I can't reproduce it.
Could you try again with the latest master?
#3 Updated by Mathieu Pellerin - nIRV almost 7 years ago
Hmm; I've downloaded latest nightly (both osgeo4w and ubuntu packages), and I can still reproduce the issue. Have you tried loading a project with many layers? A small project won't show the issue to its full extend. Will come up with a video recording of the issue now.
#6 Updated by Mathieu Pellerin - nIRV almost 7 years ago
- The above video was made using qgis master with all plugins disabled (ruling out a defective plugin causing the issue).
- I've tried a variety of large projects on my computer; all of them will result in slow / freezed loading after saving a project.
- Issue not raster related as projects with no raster layers will be affected by this issue.
- All of my projects are heavily reliant on shapefiles; all of the layers a file-based (i.e. no database or server-based layers).
- I can reproduce this on three different machines (two ubuntu machines, as well as one windows 7 machine)
Giuseppe, just to be clear re my previous comment, I'm still seeing this issue with builds that include the commit your referred to.
#7 Updated by Mathieu Pellerin - nIRV almost 7 years ago
I just found out what's happening!
The slowdown / die will occur when loading a project after saving a project within a same session when project being loaded as composer map(s) with rendering set to cache.
So what must be happening is that for some reason, after saving a project, qgis will not suspend composer map(s) rendering when loading project.
#8 Updated by Mathieu Pellerin - nIRV almost 7 years ago
Giuseppe, one way to fix this is to insure project's composers are initiated after all layers are loaded (avoiding the composer map(s) cache from being refreshed while loading project upon insertion of each layer). I'm however not familiar enough with the QGIS source code to figure out how it triggers loading of composers when opening the project's xml file.
#10 Updated by Marco Hugentobler almost 7 years ago
- Status changed from Feedback to Closed
Turned out the composers were not properly cleaned up, therefore the composermaps received update notifications.
Should be fixed in master (65141e29eec30e8f70d42d3f6df3b160c5d65c57). Please test and reopen if the issue is still there.