[QGIS-trac] [Quantum GIS] #2670: assertion failure on libqgis

Quantum GIS qgis at qgis.org
Thu Apr 22 07:25:01 EDT 2010


#2670: assertion failure on libqgis
---------------------------------------------------------+------------------
   Reporter:  orgads                                     |              Owner:  nobody       
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.5.0
  Component:  MapCanvas                                  |            Version:  1.4.0        
   Keywords:                                             |   Platform_version:               
   Platform:  Debian                                     |           Must_fix:  No           
Status_info:  0                                          |  
---------------------------------------------------------+------------------
 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...

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2670>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list