Opened 14 years ago

Closed 14 years ago

#2618 closed bug (fixed)

Settings->Options -> assertion failing

Reported by: strk Owned by: nobody
Priority: critical: causes crash or data corruption Milestone: Version 1.5.0
Component: Build/Install Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: SuSE
Platform Version: Awaiting user input: yes

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

Change History (19)

comment:1 by strk, 14 years ago

Platform: DebianSuSE

comment:2 by strk, 14 years ago

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

comment:3 by strk, 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

comment:4 by jef, 14 years ago

Awaiting user input: set

no reproducable here.

comment:5 by wonder, 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?

comment:6 by strk, 14 years ago

Still valid as of r13763

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 (r26: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 ?

comment:7 by strk, 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

comment:8 by strk, 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

comment:9 by strk, 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...

comment:10 by wonder, 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.

comment:11 by wonder, 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.

comment:12 by wonder, 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.

comment:13 by strk, 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 (r26: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 ?

comment:14 by wonder, 14 years ago

Well, the first item in python path '/python' should actually be ~/extra/share/qgis/python instead - and that's the source of all problems you have.

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.

comment:15 by strk, 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 ?

comment:16 by strk, 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)

comment:17 by gjm, 14 years ago

This problem may be fixed in r13884. Please try and report back.

comment:18 by strk, 14 years ago

Fix confirmed, thanks !

comment:19 by gjm, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.