closing Views is crashing the box quite often

Issue #1227 resolved
Andreas Rabe created an issue

While testing, the EnMAP-Box is crashing quite often, it feels like at least every 5 minutes.

I was able to reproduce this with some clicks, hopefully that helps:

Python Stack Trace

Windows fatal exception: access violation

Current thread 0x000075e0 (most recent call first):
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 886 in syncProjects
    QGIS.addMapLayers(to_add, False)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 862 in addDock
    self.rootNode.addChildNode(dockNode)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 741 in createDock
    self.sigDockAdded.emit(dock)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 1863 in createDock
    return self.mDockManager.createDock(*args, **kwds)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 1422 in loadCurrentMapSpectra
    dock = self.createDock(SpectralLibraryDock)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 1810 in setCurrentLocation
    self.loadCurrentMapSpectra(spatialPoint, mapCanvas)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 1371 in 
    lambda crs, pt, c=canvas: self.setCurrentLocation(SpatialPoint(crs, pt), canvas)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\EnMAP-Box Develop/python/plugins\enmapboxplugin\enmapbox\qgispluginsupport\qps\maptools.py", line 291 in canvasReleaseEvent
    self.sigLocationRequest[QgsCoordinateReferenceSystem, QgsPointXY].emit(crs, geoPoint)

Stack Trace
No stack trace is available.

QGIS Info
QGIS Version: 3.24.0-Tisler
QGIS code revision: 6b44a42058
Compiled against Qt: 5.15.2
Running against Qt: 5.15.2
Compiled against GDAL: 3.4.1
Running against GDAL: 3.4.1

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

Comments (13)

  1. Benjamin Jakimow

    How to reproduce:
    1. Open map with enmap image

    2. Select profiles map tool, clikc on raster pixel to open speclib Viewer

    3. Close speclib viewer, close maps

    4. Do step 1 again

    5. Do step 2 again (map tool still activated) to crash EnMAP-Box

  2. Benjamin Jakimow

    Related stack traces / call stacks:
    How to reproduce:
    - start EnMAPBox + load example data
    - close created map view
    - drop “enamp” image to grey area

    Windows fatal exception: access violation
    
    Current thread 0x000025a4 (most recent call first):
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 907 in syncProjects
        QGIS.addMapLayers(to_add, False)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 1807 in onDataSourcesAdded
        self.syncProjects()
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\datasources\manager.py", line 287 in addDataSources
        self.sigDataSourcesAdded.emit(added)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 354 in onAddedChildren
        self.sigAddedLayers.emit(added)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\docks.py", line 964 in addLayers
        tree.addLayer(lyr)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 601 in onDockAreaDragDropEvent
        NEW_DOCK.addLayers(dropped_maplayers)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 524 in 
        dockArea.sigDropEvent.connect(lambda event: self.onDockAreaDragDropEvent(dockArea, event))
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\docks.py", line 350 in dropEvent
        self.sigDropEvent.emit(event)
    

    Another (occurend on closing a map dock)

    Another strack trace (dropping datasource to empty area):

    Current thread 0x00006650 (most recent call first):
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 907 in syncProjects
        QGIS.addMapLayers(to_add, False)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 1807 in onDataSourcesAdded
        self.syncProjects()
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\datasources\manager.py", line 287 in addDataSources
        self.sigDataSourcesAdded.emit(added)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 354 in onAddedChildren
        self.sigAddedLayers.emit(added)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 466 in insertLayer
        self.insertChildNodes(idx, nodes)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\mapcanvas.py", line 1396 in dropEvent
        layerTree.insertLayer(0, lyr)
    Windows fatal exception: access violation
    
    Current thread 0x00006650 (most recent call first):
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 907 in syncProjects
        QGIS.addMapLayers(to_add, False)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 1807 in onDataSourcesAdded
        self.syncProjects()
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\datasources\manager.py", line 287 in addDataSources
        self.sigDataSourcesAdded.emit(added)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 354 in onAddedChildren
        self.sigAddedLayers.emit(added)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\dataviews\dockmanager.py", line 466 in insertLayer
        self.insertChildNodes(idx, nodes)
      File "C:\Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins\enmapboxplugin\enmapbox\gui\mapcanvas.py", line 1396 in dropEvent
        layerTree.insertLayer(0, lyr)
    

  3. Benjamin Jakimow

    @Andreas Janz @Fabian Thiel do you get such errors as well when starting the EnMAP-Box from Python / PyCharm?

  4. Log in to comment