Bug report #3211

Nothing displayed in Legend and mapcanvas if layer is physically missing from qgs file.

Added by Benoit de Cabissole almost 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:GUI
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

Description

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.

sample.tar.gz (2.58 KB) Goyo D, 2010-11-18 02:52 PM

History

#1 Updated by Goyo D almost 10 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 9 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.

#3 Updated by Anne Ghisla over 9 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (worksforme)

I overlooked the platform, and can't check on Windows - reopening. Sorry for noise.

#4 Updated by Benoit de Cabissole over 9 years ago

Thanks for reminding me to check!
All is working as expected on 1054cfaa (SVN r15348) on Win7. Will check on winXP later tonight and close the ticket if it is fine.

#5 Updated by Benoit de Cabissole over 9 years ago

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

Also work as expected in Win XP with version 1.7 revision 1054cfaa (SVN r15348). Closed.

Also available in: Atom PDF