[Qgis-developer] 1.6.0 qml files vs. 1.7.3

Jim Hammack hammack at GotSlack.org
Mon Dec 19 13:51:01 EST 2011


This issue may have been around for a while, but I just ran into it.  I 
have some shapefiles for which I created .qml files in the past using 
1.6.0-Copiapo.  The shapefiles and the .qml files reside in the same 
directory.   When I try to load these shapefiles with 1.7.3 ($ qgis 
fred.shp) , I get this error:

Fatal: ASSERT: "pfi.exists()" in file 
/jah/qgis-1.7.3/src/core/qgsproject.cpp, line 1382
Aborted

and QGIS goes away.

Looking at the code, I see:

     // so this one isn't absolute, but also doesn't start // with ./ or 
../.
     // That means that it was saved with an earlier version of 
"relative path support",
     // where the source file had to exist and only the project 
directory was stripped
     // from the filename.
     QFileInfo pfi( fileName() );
     Q_ASSERT( pfi.exists() );

Deleting the .qml file allows the shapefile to be loaded so it's not a 
huge problem, but it took me a few minutes to figure out what was 
causing the crash.

Wouldn't a warning dialog be more appropriate here than a full abort?

                                                     Jim








More information about the Qgis-developer mailing list