Bug report #3211
Nothing displayed in Legend and mapcanvas if layer is physically missing from qgs file.
|Affected QGIS version:||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||13271|
When opening a .qgs project which points to one or more layers which files are missing from disk, QGIS does not display anything in the Legend and mapcanvas. If you answer OK to locate the files, and then navigate to the new disk location of those files, the QGIS interface is still totally empty: empty legend and empty canvas, nothing at all!
If you cancel the locate file prompt, it is the same, nothing at all is displayed on the Legend and mapcanvas.
Go to project properties, selectable layers tab: all layers are listed there. The canvas scale is correct and the coordinates in the status bar are also correct when the mouse moves over the canvas, but, again, absolutely nothing is displayed.
#1 Updated by Goyo D about 12 years ago
I can confirm this bug with QGIS 1.6 from osgeo4w on wxp and 1.7 from qgis.org repo on Ubuntu Maverick. Find attached a sample project to reproduce it. It has two point layers, delete (or rename) the directory obsolete and the project can't be opened anymore.
I'm changing the priority to critical since I think the project file itself can be considered data in many senses and its corruption can be harmful. The file can be repaired by hand but not everu user can do that (and it's painful).
#2 Updated by Anne Ghisla over 11 years ago
- Resolution set to worksforme
- Status changed from Open to Closed
I tried in vain to reproduce the bug with QGIS 15378 on Fedora 14, default CRS EPSG:4326 and OTFR inactive:
1- load the sample project - the two layers are displayed.
2- Close QGIS and rename a folder.
3- Reopen QGIS, reopen the project. QGIS asks to locate the layer whose folder has been renamed.
4a- I point it to the new location, then click OK - the two layers are displayed correctly.
4b- I abort the search for the layer. QGIS displays only the unmodified layer.
Sounds like everything behaves as expected. Closing the ticket.