Ticket #2618 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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:
Platform Version: Platform: SuSE
Must Fix for Release: No 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

Changed 3 years ago by strk

  • platform changed from Debian to SuSE

Changed 3 years ago by strk

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

Changed 3 years ago by strk

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

Changed 3 years ago by jef

  • status_info set

no reproducable here.

Changed 3 years ago by wonder

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?

Changed 3 years ago by strk

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 ?

Changed 3 years ago by strk

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

Changed 3 years ago by strk

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

Changed 3 years ago by strk

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...

Changed 3 years ago by wonder

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.

Changed 3 years ago by wonder

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.

Changed 3 years ago by wonder

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

Changed 3 years ago by strk

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 ?

Changed 3 years ago by wonder

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.

Changed 3 years ago by strk

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 ?

Changed 3 years ago by strk

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)

Changed 3 years ago by gjm

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

Changed 3 years ago by strk

Fix confirmed, thanks !

Changed 3 years ago by gjm

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.