Bug report #7485

Open Attribute Table causes QGIS to crash (for clipped layer)

Added by Robin Lovelace about 11 years ago. Updated about 11 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System:Ubuntu 12.04 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16437

Description

I just clipped a layer of contiguous polygons using qgis's inbuilt 'clip' function.
The result opens fine, but causes a crash when you try to open the attribute table.
The attribute table opens fine for other shapefiles, so guess it's clip's fault.
Would be interested if this problem is replicated in other versions (see attached).

clipped-crash.zip (19.6 KB) Robin Lovelace, 2013-04-01 08:32 AM

Associated revisions

Revision c4645ea0
Added by Jürgen Fischer about 11 years ago

Merge pull request #495 from matthias-kuhn/fix-7485

[FIX #7485]: Don't crash when expression fails to parse in dual view/preview column.

History

#1 Updated by Robin Lovelace about 11 years ago

p.s. I'm using the latest master branch qgis 1.9.0+git20130330+0229ea9~precise-ubuntugis1

#2 Updated by Matthias Kuhn about 11 years ago

  • Status changed from Open to In Progress

Was caused by the second last column which seems to have no name (empty string)

The following patch makes this more stable:
https://github.com/qgis/Quantum-GIS/pull/495

Still, the problem persists, that QgsExpression is unable to handle an empty attribute name.

#3 Updated by Jürgen Fischer about 11 years ago

  • Status changed from In Progress to Closed

#4 Updated by Robin Lovelace about 11 years ago

Many thanks to speedy update.
Could not verify that the fix works on latest qgis version on my system, however (supplied by the following repos:
#deb http://qgis.org/ubuntugis-nightly precise main
#deb-src http://qgis.org/ubuntugis-nightly precise main)

Opening the files caused a crash, but this may have because of problems with python-qgis, which occurred while upgrading the system (see terminal report below). Instead I've reverted to qgis 1.8.0-1~precise3, which opens the attributes fine.

"pycentral: pycentral pkginstall: error byte-compiling files (539)
pycentral pkginstall: error byte-compiling files (539)
dpkg: error processing python-qgis-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-qgis:
python-qgis depends on python-qgis-common (= 1.9.0+git20130401+af7d6f8~precise-ubuntugis1); however:
Package python-qgis-common is not configured yet.
dpkg: error processing python-qgis (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
Errors were encountered while processing:
python-qgis-common
python-qgis"

#5 Updated by Robin Lovelace about 11 years ago

Fix confirmed. Many thanks Jürgen.

#6 Updated by Jürgen Fischer about 11 years ago

Robin Lovelace wrote:

Fix confirmed. Many thanks Jürgen.

I just pulled in the fix - Matthias is the one to thank.

Also available in: Atom PDF