Bug report #676

Could not open SRS database on 0.8.1-pr3 results in segfault

Added by maris-gis-gmail-com - about 17 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Magnus Homann
Category:-
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 #:10735

Description

When I try to add any vector layer to newly installed QGIS 0.8.1-pr3 on Windows XP, it pops-up multiple sequential error messages:
"Could not open SRS database C:/Documents and Settings/Māris Nartišs/.qgis/qgis.db
Error(14): unable to open database file"
File exists and is readable in specified location.

Trying to do anything related to projections (open project properties etc.), qgis segfaults with message:

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Assertion failed!

Program: C:\\Program Files\\Quantum GIS\\qgis.exe
File: C:\\dev\\cpp\\qgis0.8branch\\src\\wid...\\qgspro...tor.cpp
Line: 532

Expression: myResult == 0

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)

Associated revisions

Revision cb3584aa
Added by Magnus Homann about 17 years ago

sqlite3_open() MUST have db name in Utf-8. Fixes #676.

git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6827 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 4589ddba
Added by Magnus Homann about 17 years ago

sqlite3_open() MUST have db name in Utf-8. Fixes #676.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6828 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision c09e954c
Added by Magnus Homann about 17 years ago

sqlite3_open() MUST have db name in Utf-8. Fixes #676.

git-svn-id: http://svn.osgeo.org/qgis/trunk@6828 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Magnus Homann about 17 years ago

Completely uninstall old version, and try to re-install pre3 into an empty directory.

#2 Updated by maris-gis-gmail-com - about 17 years ago

Uninstalled pr3, "Program filez/qgis" was removed properly, also rmed user/.qgis dir (with that .db file). Installed qgis into different directory but still same - cannot read SRS db file and anything projection related results in segfault.

#3 Updated by Magnus Homann about 17 years ago

  • Status changed from Open to In Progress

It's due to having i18n characters in your home directory path. Interesting problem, I haven't been able to solve it yet.

#4 Updated by Magnus Homann about 17 years ago

  • Resolution set to fixed
  • Status changed from In Progress to Closed

It was a bug in Qgis. The file name sent to sqlite3_open() must be in UTF-8, and not the local charset. Most Unix and Mac computers uses Utf-8 as default, but not Windows.

Fixed in .

Good catch Māris!

#5 Updated by Anonymous over 14 years ago

Milestone Version 0.8.1 deleted

Also available in: Atom PDF