2

The crash occurs for:

  • Ubuntu 18.04 bionic
  • QGIS 3.4.2

For reproduce the crash, I use the data from Natural Earth Data:

Here the code:

canvas = qgis.utils.iface.mapCanvas()
for ml in QgsProject.instance().mapLayers().values():
    if ml.name() == 'ne_110m_admin_0_countries':
        layer = ml
        par = ml.id()
    elif ml.name() == 'ne_110m_populated_places_simple':
        chi = ml.id()

rel = QgsRelation()
rel.setReferencingLayer(chi)
rel.setReferencedLayer(par)
rel.addFieldPair('adm0_a3', 'ADM0_A3')
rel.setId('countries_places')
rel.setName('Relation beetween places & countries')
if rel.isValid():
    QgsProject.instance().relationManager().addRelation(rel)

dialog = QgsDualView()
dialog.init(layer, canvas)
dialog.setView(QgsDualView.AttributeEditor)
dialog.show()

In a QGIS Project with the two vector layers loaded, the code above generates a QgsDualView dialogue type and sets up a QgsRelation between vector layers.

When I click on the toggle Editing button on the QgsRelationEditorWidget, QGIS crashes, even if the relation is set manually. What could be a problem?

  • Getting the same issue on my Windows 10 and GIS 3.0.3. Have you tried sending a bug report? – Taras Apr 10 at 8:02
  • No, I haven't take the time to transfer and re-verify my old redmine tickets to github. And I post it here for verify if its a code error or a qgis error. – J. Monticolo Apr 10 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.