Bug report #4690
Crash when adding field to a shape file's attribute table
|Affected QGIS version:||1.7.3||Regression?:||No|
|Operating System:||Ubuntu 10.04 LTS||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||14576|
When adding a new field to a shape file's attribute table, QGIS 1.7.3-Wroclaw (running on Ubuntu 10.04 LTS) crashes due to an out-of-range condition. I tried this on several existing and newly created shape files (feature type: lines). It does not matter whether the new field is added manually or automatically (by trying to store calculation results in a new field). I was unable to produce a backtrace because of missing debugging symbols. The shell output including the essential error message follows:
[email protected]:/home$ qgis
Python support ENABLED :-)
Loaded : Plugin Installer (package: plugin_installer)
Fatal: ASSERT failure in QList<T>::operator: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 443
#3 Updated by David Kneis almost 11 years ago
- File bug_4690_additional.pdf added
Try 1: I installed version 1.9.90-Alpha. All extensions disabled. The problem still exists.
Try 2: I removed older versions of libqgis. Then re-installed version 1.7.3. The problem still exists.
However, I detected a second 'strange' behavior which might be connected to the reported out-of-range crash: When I open the shape file's attribute table, no data are initially displayed. I need to click on the header of a column first to make the table's contents visible. Moreover, the message in the top panel of the window reads like "Attributes table - <Layer name> :: 0 / 0 objects selected" (translated from German). The second zero in "0 / 0" might actually point to an index problem since the number of features (and records in the attributes table) is > 0. I appended a screenshot (as a PDF) to illustrate this.
#8 Updated by David Kneis almost 11 years ago
I think I identified the condition leading to the described crash:
The crash does NOT occur if the default behavior for attribute tables is set to "Show all features" under Settings/Options/General/Attribute table behavior.
However, the crash does occur if the default behavior is set to "Show selected features".
#9 Updated by Jürgen Fischer almost 11 years ago
David Kneis wrote:
However, I detected a second 'strange' behavior which might be connected to the reported out-of-range crash: When I open the shape file's attribute table, no data are initially displayed. I need to click on the header of a column first to make the table's contents visible.
That is the bug. Sorting the empty table shouldn't change a thing.