Bug report #19388

Consistent crash with join layer

Added by Dan Isaacs over 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:High
Assignee:Alessandro Pasotti
Category:Vectors
Affected QGIS version:3.2 Regression?:Yes
Operating System:Windows 7 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:27216

Description

QGIS3.2 consistently crashes when using the identify tool on a layer with a joined layer.

However, if I first remove the join, then re-join everything works fine.

I've tried to replicate it on a simple project, but can't so it must be something in the actual layer, but the layer that's being joined to contains about 50 expressions, many of which relate to data from the join, so it would be incredibly time-consuming to replicate one expression at a time to see if any of them cause the problem. I have tested a set up with just two expression linked to the join, and that seems to work fine.

I've also tested the various options for joining layers (such as making it dynamically editable, creating an index etc) no variation here seems to solve the problem.

The project was crated in QGIS2.18, updated to 3, if that makes any difference.

Crash dump

User Feedback

Report Details

Crash ID: af29262b0770c29d393bd3d6d6c66fc4ae6638b5

Stack Trace

QgsField::QgsField :
QgsAttributeForm::createWidgetFromDef :
QgsAttributeForm::init :
QgsAttributeForm::QgsAttributeForm :
QgsAttributeDialog::init :
QgsAttributeDialog::QgsAttributeDialog :
QgsFeatureAction::newDialog :
qt_qFindChild_helper :
QgsIdentifyResultsDialog::featureForm :
QCoreApplication::translate :

QGIS Info
QGIS Version: 3.2.0-Bonn
QGIS code revision: bc43194061
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: i386
Kernel Type: winnt
Kernel Version: 6.1.7601

Test.zip (115 KB) Dan Isaacs, 2018-08-23 12:01 PM

Associated revisions

Revision 2609815c
Added by Alessandro Pasotti about 6 years ago

Fix a crash on attribute form widget

Fixes #19388 - Consistent crash with join layer

History

#1 Updated by Dan Isaacs over 6 years ago

Just to add, I've just loaded all the layers to a fresh QGIS3.2 project and copied over the styles (and expressions). The same problem occurs there, so it's nothing to do with it being an older project updated.

#2 Updated by Nyall Dawson over 6 years ago

  • Status changed from Open to Closed

Can you please share the project?

#3 Updated by Dan Isaacs about 6 years ago

  • File Test.zip added
  • Status changed from Closed to Reopened

Nyall Dawson wrote:

Can you please share the project?

Sample project is attached.

Just to recap, the layer 'Survey Data' is joined to the layer 'Stands' and 'Stands' has some virtual expressions which use data from 'Survey Data', but I have experimented with a blank project with this type of set-up (expressions based on joined layers) and it doesn't not reproduce the crash. It's something about the exact expressions I'm using here I think.

To recreate the issue -

1. Open the project.
2. Use the identify tool or open the attributes table for the layer 'Stands'.
3. Project consistently crashes.

To workaround (if it helps understand the issue)
1. Open the project.
2. Before using any tool, open the properties dialogue for the layer 'Stands' - Weirdly, you don't need to make any changes at all, just click 'OK'.
3. Now use the identify tool or attribute table, everything is fine.

#4 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Reopened to Feedback
  • Category changed from Unknown to Vectors
  • Priority changed from Normal to High

Dan Cuillin wrote:

Nyall Dawson wrote:

Can you please share the project?

Sample project is attached.

If I understand correctly this was not an issue on 2.18, right?

#5 Updated by Dan Isaacs about 6 years ago

Giovanni Manghi wrote:

Dan Cuillin wrote:

Nyall Dawson wrote:

Can you please share the project?

Sample project is attached.

If I understand correctly this was not an issue on 2.18, right?

That's somewhat correct, although there was an issue. What used to happen on 2.18 was that the joined fields would all be assigned the wrong aliases in the form widget. Again, this was only until I re-joined the layers and then everything would work fine, but it would not crash in the same way as 3 does.

#6 Updated by Giovanni Manghi about 6 years ago

  • Regression? changed from No to Yes
  • Status changed from Feedback to Open

#7 Updated by Dan Isaacs about 6 years ago

Just to add, in this same project, I now have an additional join layer and on adding a third am now getting a consistent hang on exit. Unfortunately I can't re-create this on the test project, hence I've not opened a new ticket. It must be something to do with complexity of the actual project (confidential, unfortunately) that can't be easily replicated. I thought I'd add the info here though because it seems like something's not working with respect to joins and the two issues may be linked.

#8 Updated by Dan Isaacs about 6 years ago

Does anyone know any more about this issue yet? I've got to recommend QGIS to a client in a couple of weeks, for a project starting next year, but I can't do so if major functions aren't working. If anyone has any idea whether this issue is likely to be fixed in that kind of timescale, I'd be very grateful to hear from them.

#9 Updated by Alessandro Pasotti about 6 years ago

  • Assignee set to Alessandro Pasotti

#10 Updated by Anonymous about 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF