Bug report #2670
assertion failure on libqgis
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | nobody - | ||
Category: | Map Canvas | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | Debian | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 12730 |
Description
Hello,
I tried to run an application using libqgis, and I received the following message:
/build/buildd/qgis-1.4.0/src/core/qgscoordinatereferencesystem.cpp:1268: long int [[QgsCoordinateReferenceSystem]]::getRecordCount(): Assertion @myResult == 0' failed.
I figured out that if ~/.qgis directory doesn't exist, this assertion fails.
Looking at qgscoordinatereferencesystem.cpp:1268 I found a comment regarding this situation:
myResult = sqlite3_open( [[QgsApplication]]::qgisUserDbFilePath().toUtf8().data(), &myDatabase ); if ( myResult != SQLITE_OK ) { [[QgsDebugMsg]]( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) ); // XXX This will likely never happen since on open, sqlite creates the // database if it does not exist. assert( myResult == SQLITE_OK ); }
Well, apparently if the directory doesn't exist, sqlite doesn't create it. It only creates the db file...
Associated revisions
fix #2670
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13508 c8812cc2-4d05-0410-92ff-de0c093fc19c
fix #2670
git-svn-id: http://svn.osgeo.org/qgis/trunk@13508 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by Jürgen Fischer over 14 years ago
- Resolution set to fixed
- Status changed from Open to Closed
fixed in f12eb06a (SVN r13509).