Bug report #19739

doubleclick on last value column in query filter crash qgis

Added by Jérôme Seigneuret almost 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:High
Assignee:-
Category:Vectors
Affected QGIS version:3.2.2 Regression?:No
Operating System:Windows 7 Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:Yes Copied to github as #:27564

Description

User Feedback

Probleme in index list of colum if I doubleclick on last name colum that crash

I have test query and add in query name as " identifiant"

when i doubleclick on first value this is "identifiant" was added in expression

Query expression as built on shape layer to set a filter

Report Details

Crash ID: fb1e526ccfdd10ae9e905357029c54884a786fc9

Stack Trace

QString::resize :
QString::insert :
QgsCptCityColorRampDialog::~QgsCptCityColorRampDialog :
QgsQueryBuilder::lstFields_doubleClicked :
QMetaObject::activate :
QAbstractItemView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgsVectorLayerProperties::pbnQueryBuilder_clicked :
QMetaObject::activate :
QAbstractButton::clicked :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgisApp::showLayerProperties :
QgisApp::layerTreeViewDoubleClicked :
QMetaObject::activate :
QAbstractItemView::doubleClicked :
QTreeView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.2.2-Bonn
QGIS code revision: 26842169e9
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601

History

#1 Updated by Giovanni Manghi almost 2 years ago

  • Priority changed from Normal to High
  • Category changed from GUI to Vectors
  • Status changed from Open to Feedback
  • Crashes QGIS or corrupts data changed from No to Yes

From the description I'm really not sure if I understand what are the necessary steps to replicate.

Correct me if I'm wrong:

1) add a virtual column to a vector using an expression (what expression?)
2) double clicking (where, in the attributes table?) in a cell of this virtual column causes a crash(?)

please also try after removing any 3rd party plugin, or even better with a clean profile.

#2 Updated by Jérôme Seigneuret almost 2 years ago

That is a query filter on source panel for a shapefile layer
In there query dialogbox if I double clicking on list of fields I don't have good value returned

exemple of fields:
  • id
  • name
  • type

I have set a query:
select dictinct left(name, 3) as description from layer1

test query to check number of entities

next, I modify my query and at this time if I double clicking on "id" it return "description" in query textbox and if I double clicking on "type" QGIS crash

#3 Updated by Giovanni Manghi almost 2 years ago

Jérôme Seigneuret wrote:

That is a query filter on source panel for a shapefile layer
In there query dialogbox if I double clicking on list of fields I don't have good value returned

exemple of fields:
  • id
  • name
  • type

I have set a query:
select dictinct left(name, 3) as description from layer1

test query to check number of entities

next, I modify my query and at this time if I double clicking on "id" it return "description" in query textbox and if I double clicking on "type" QGIS crash

have you tried with a clean profile?
Can you attach a sample project+sample data (with the filter/expression set)?

#4 Updated by Jérôme Seigneuret almost 2 years ago

Hi,

Yes I have clean all and that is not in relation to virtual column. that is in relation to the test query button.

I think you can test with all shapefile

I create a new document

My shapefile is named test, it add 4 column id,a,b,c

I create a really simple query :

select a from test

If I doubleclicking on a in list of field it crash QGIS.
I do multiple test on multiple shapefile and resukt are the same if you test the query one time and change field.

I create an other simple query :

select * from test

In this case there is no problem

Test the query change list of value and index but that don't make sens. List of visible values and list of values really usabled are not syncronised and cause problem.

I think test button must not have an impact on the list of field.

error:

Crash ID: fb1e526ccfdd10ae9e905357029c54884a786fc9

Stack Trace

QString::resize :
QString::insert :
QgsCptCityColorRampDialog::~QgsCptCityColorRampDialog :
QgsQueryBuilder::lstFields_doubleClicked :
QMetaObject::activate :
QAbstractItemView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgsVectorLayerProperties::pbnQueryBuilder_clicked :
QMetaObject::activate :
QAbstractButton::clicked :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgisApp::showLayerProperties :
QgisApp::layerTreeViewDoubleClicked :
QMetaObject::activate :
QAbstractItemView::doubleClicked :
QTreeView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.2.2-Bonn
QGIS code revision: 26842169e9
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601

#5 Updated by Giovanni Manghi almost 2 years ago

Jérôme Seigneuret wrote:

Hi,

Yes I have clean all and that is not in relation to virtual column. that is in relation to the test query button.

I think you can test with all shapefile

I create a new document

My shapefile is named test, it add 4 column id,a,b,c

I create a really simple query :
[...]

If I doubleclicking on a in list of field it crash QGIS.
I do multiple test on multiple shapefile and resukt are the same if you test the query one time and change field.

I create an other simple query :
[...]

In this case there is no problem

Test the query change list of value and index but that don't make sens. List of visible values and list of values really usabled are not syncronised and cause problem.

I think test button must not have an impact on the list of field.

I'm confused, where are you trying to apply such query? in "vector properties > source > provider feature filter" ?

#6 Updated by Jérôme Seigneuret almost 2 years ago

Giovanni Manghi wrote:

I'm confused, where are you trying to apply such query? in "vector properties > source > provider feature filter" ?

Yes

#7 Updated by Giovanni Manghi almost 2 years ago

Jérôme Seigneuret wrote:

Giovanni Manghi wrote:

I'm confused, where are you trying to apply such query? in "vector properties > source > provider feature filter" ?

Yes

no crashes here on QGIS master/Linux.

#8 Updated by Jérôme Seigneuret almost 2 years ago

Giovanni Manghi wrote:

Jérôme Seigneuret wrote:

no crashes here on QGIS master/Linux.

Ok so that is a comportment only on Windows OS ?

An other person can test it? have you a windows environnement?

I check that next time on other windows version.

#9 Updated by Giovanni Manghi almost 2 years ago

Jérôme Seigneuret wrote:

Giovanni Manghi wrote:

Jérôme Seigneuret wrote:

no crashes here on QGIS master/Linux.

Ok so that is a comportment only on Windows OS ?

An other person can test it? have you a windows environnement?

I check that next time on other windows version.

no crash on QGIS master/Windows 10 on a clean environment.

#10 Updated by Giovanni Manghi over 1 year ago

Please try on QGIS 3.4.1, if the issue is still valid change the affected version, thanks.

#11 Updated by Jérôme Seigneuret over 1 year ago

Hi,
Test crash on 3.4.1 on shapefile after test query and double click on field name in list.

exemple my shapefile is name a.shp

on parameter i do a simple query

select * from a
on query constructor click on test > result ok

my first column is named Codinsee

on parameter I do a simple query

select codinsee as id from a
on query constructor. click on test > result ok

next I double click on Codinsee > "id" is return in expression

if I double click on other field the order is inconsistant and the name is not the good but this is an other field name it returned and some fields crash QGIS

crash ID: daf4d4f12258fdf6c77f94efc932d7154f160a42

Stack Trace

memcpy :
QString::reallocData :
QString::resize :
QString::insert :
QgsCptCityColorRampDialog::~QgsCptCityColorRampDialog :
QgsQueryBuilder::lstFields_doubleClicked :
QMetaObject::activate :
QAbstractItemView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgsVectorLayerProperties::pbnQueryBuilder_clicked :
QMetaObject::activate :
QAbstractButton::clicked :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgisApp::showLayerProperties :
QgisApp::layerTreeViewDoubleClicked :
QMetaObject::activate :
QAbstractItemView::doubleClicked :
QTreeView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.4.1-Madeira
QGIS code revision: 383851c597
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.3.2
Running against GDAL: 2.3.2

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134

#12 Updated by Jürgen Fischer over 1 year ago

  • Status changed from Feedback to Closed
  • Resolution set to no timely feedback

Bulk closing 82 tickets in feedback state for more than 90 days affecting an old version. Feel free to reopen if it still applies to a current version and you have more information that clarify the issue.

Also available in: Atom PDF