Bug report #14766

Attribute table broken (duplicated fields) in master

Added by Even Rouault over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:Matthias Kuhn
Category:Attribute table
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22723

Description

The attribute table in table mode displays the right number of columns, but their name and content is the one of the first attribute. It affects several providers so it seems to be really an attribute table issue. I indeed see a number of commits in that area in the last couple days (2 and 3 may)

Reordering columns with the "Hide some fields" button (the tooltip should likely be changed to "Hide/reorder fields") doesn't help


Related issues

Related to QGIS Application - Bug report #14765: attribute table from fresh created shp file only shows 'i... Closed 2016-05-04
Duplicated by QGIS Application - Bug report #14774: Import CSV returns incorrect table Closed 2016-05-05

Associated revisions

Revision ffcf655b
Added by Matthias Kuhn over 8 years ago

Don't always show first column in attribute table

Add tests for some basic attribute table functionality

Fix #14774
Fix #14765
Fix #14766

History

#1 Updated by Even Rouault over 8 years ago

And when dragging&dropping columns in the window opened by the "Hide some fields" button, I get the following exception:

Warning: QVariant::save: unable to save type 314.
Stacktrace (piped through c++filt):
output/bin/qgis[0x409320]
output/bin/qgis(myMessageOutput(QtMsgType, char const*)+0xec)[0x40971a]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(qt_message_output(QtMsgType, char const*)+0x1e)[0x7f78073c0f7e]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(+0x82148)[0x7f78073c1148]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(qWarning(char const*, ...)+0x94)[0x7f78073c1894]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(QVariant::save(QDataStream&) const+0xac)[0x7f78074ea0dc]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(operator<<(QDataStream&, QVariant const&)+0xf)[0x7f78074ea1df]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(QAbstractItemModel::encodeData(QList<QModelIndex> const&, QDataStream&) const+0xb5)[0x7f78074bb985]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(QAbstractItemModel::mimeData(QList<QModelIndex> const&) const+0xbe)[0x7f78074bbaae]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(+0x772877)[0x7f7806dc7877]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QAbstractItemView::startDrag(QFlags<Qt::DropAction>)+0x5f)[0x7f7806d6ad7f]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QListView::startDrag(QFlags<Qt::DropAction>)+0x48)[0x7f7806d7e808]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QAbstractItemView::mouseMoveEvent(QMouseEvent*)+0x316)[0x7f7806d68eb6]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QListView::mouseMoveEvent(QMouseEvent*)+0x4c)[0x7f7806d7f4cc]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QWidget::event(QEvent*)+0x95b)[0x7f78068aaa8b]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QFrame::event(QEvent*)+0x26)[0x7f7806c55126]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QAbstractItemView::viewportEvent(QEvent*)+0x40b)[0x7f7806d60bcb]
/home/even/install-qt-4.8.5/lib/libQtCore.so.4(QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)+0x86)[0x7f78074c7b56]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x7c)[0x7f780685ae0c]
/home/even/install-qt-4.8.5/lib/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0x99b)[0x7f780685fb1b]
src/core/qgsmessagelog.cpp: 45: (logMessage) [6409ms] 2016-05-05T00:17:00 Qt[1] QVariant::save: unable to save type 314.

#2 Updated by Etienne Trimaille over 8 years ago

I found this bug too.
This bug appears when I started using the new feature "hide fields" for me : https://github.com/qgis/QGIS/pull/2839#issuecomment-216725033

#3 Updated by Richard Duivenvoorde over 8 years ago

probably related/duplicate to #14765

#4 Updated by Anonymous over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF