Bug report #2618

Settings->Options -> assertion failing

Added by Sandro Santilli about 14 years ago. Updated almost 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:SuSE Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12678

Description

Startup, go to Settings, select Options and I get a crash:

Fatal: ASSERT: "myResult == 0" in file src/app/qgsoptions.cpp, line 716

r13221

History

#1 Updated by Sandro Santilli about 14 years ago

I belive the version of sqlite in use is 3.4.2 (system, not internal)

#2 Updated by Sandro Santilli about 14 years ago

Oops, but sqlite3 --version
3.6.4

so not sure, my previous assumption (3.4.2) was based on liblsqlite3.so version
being 0.8.6

#3 Updated by Jürgen Fischer almost 14 years ago

no reproducable here.

#4 Updated by Martin Dobias almost 14 years ago

Is the bug still valid?

If it is, try to open Python console in QGIS and type:

[[QgsApplication]].srsDbFilePath()

This will return the database file QGIS tries to open and fails badly. Is that file present and is it readable?

#5 Updated by Sandro Santilli almost 14 years ago

Still valid as of 42c15549 (SVN r13764)

Note that qgis was installed in non-standard directory (~/extra)
and when it starts this warning message comes out:


Couldn't load [[PyQGIS]].
Python support will be disabled.

Traceback (most recent call last):
  File "", line 1, in 
[[ImportError]]: No module named qgis.core

Python version:
2.6 (commit:8507ed3f (SVN r27):66714, Feb  3 2009, 20:52:03) 
[GCC 4.3.2 [gcc-4_3-branch revision 141291]]

Python path:
['/python', '/net/lafont/home/santisa/.qgis//python', '/net/lafont/home/santisa/.qgis//python/plugins', '/python/plugins', '/net/lafont/home/santisa/extra/lib/python', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/Numeric', '/usr/local/lib/python2.6/site-packages', '/usr/local/lib/python2.6/site-packages/wx-2.8-gtk2-unicode', '/usr/lib/python2.6/site-packages/gtk-2.0']

How do I open the python console ? Is it possible at all given the error above ?

#6 Updated by Sandro Santilli almost 14 years ago

Note: bindings are actuall installed in ~/extra/share/qgis/python
Built with -DCMAKE_INSTALL_PREFIX=/net/lafont/home/santisa/extra
qgis looks in ~/extra/lib/python instead

#7 Updated by Sandro Santilli almost 14 years ago

another note, the ~/extra/lib/python path came from my own env variable PYTHONPATH.
Unsetting it still fails to find the bindings (not looking in the install prefix)
and still crashes.

ldd reveals there's no old qgis library linked to the binary

#8 Updated by Sandro Santilli almost 14 years ago

There are old qgis headers installed in /usr/include/qgis
Not a privileged user on this host, so can't check if removing those would fix the bug.

Note that if that's the case it'll always be a problem building qgis on a system which
already has it installed...

#9 Updated by Martin Dobias almost 14 years ago

You seem to be affected by an issue that installation prefix is empty - this is typically caused by having some files from old installation (to be precise: a plugin for older version of qgis is loaded which also loads older qgis libraries and creates the mess). That's also why it fails to open the database file.

To fix this, the easiest way would be to remove your ~/extra directory and install qgis again. If you don't want to do that (other applications in that directory), just make sure to remove ~/extra/lib/qgis and all files matching ~/extra/lib/libqgis*

We should probably add some versioning to the names of plugin binaries to avoid loading incompatible plugins.

#10 Updated by Martin Dobias almost 14 years ago

QGIS automatically adds the path where the bindings have been installed, so there's no need to alter PYTHONPATH.

Also, old headers in /usr/include should have no impact.

#11 Updated by Martin Dobias almost 14 years ago

Btw. python console is available only if qgis python bindings have been successfully loaded, it is available in menu Plugins - Python Console.

#12 Updated by Sandro Santilli almost 14 years ago

Cleaning up ~/extra/lib/qgis and ~/extra/lib/libqgis* didn't help.
Still startup message and crash. Startup message:

Couldn't load [[PyQGIS]].
Python support will be disabled.

Traceback (most recent call last):
  File "", line 1, in 
[[ImportError]]: No module named qgis.core

Python version:
2.6 (commit:8507ed3f (SVN r27):66714, Feb  3 2009, 20:52:03) 
[GCC 4.3.2 [gcc-4_3-branch revision 141291]]

Python path:
['/python', '/net/lafont/home/santisa/.qgis//python', '/net/lafont/home/santisa/.qgis//python/plugins', '/python/plugins', '/net/lafont/home/santisa/extra/lib/python', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/Numeric', '/usr/local/lib/python2.6/site-packages', '/usr/local/lib/python2.6/site-packages/wx-2.8-gtk2-unicode', '/usr/lib/python2.6/site-packages/gtk-2.0']

Note that the directory where 'make install' puts python stuff is NOT found in the Python path
above, so qgis must be failing there (setting the correct path).
The correct path is ~/extra/share/qgis/python, can you see is not there ?

#13 Updated by Martin Dobias almost 14 years ago


Please try to change CMAKE_INSTALL_PREFIX to a completely different directory and install qgis there to verify whether the problem is caused by older installation or not.

#14 Updated by Sandro Santilli almost 14 years ago

Done, rm -rf build; mkdir build; cd build ccmake -DCMAKE_INSTALL_PREFIX=/tmp ../qgis && make && make install

Same problem, still get '/python' as first element of Python path.
Maybe cmake caches something in the source tree ?

#15 Updated by Sandro Santilli almost 14 years ago

Sorry, CMAKE_INSTALL_PREFIX was set to /tmp/qgis, which didn't exist, and after 'make install' it does exist and contains all the qgis stuff (just to confirm things are working except the set of python path)

#16 Updated by gjm - almost 14 years ago

This problem may be fixed in 576c0409 (SVN r13885). Please try and report back.

#17 Updated by Sandro Santilli almost 14 years ago

Fix confirmed, thanks !

#18 Updated by gjm - almost 14 years ago

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

Also available in: Atom PDF