Bug report #2347
GRASS error routin conflict
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||12407|
It is possible to set a routine which handles GRASS errors with G_set_error_routine. The problem is, that both QGIS GRASS plugin and GDAL GRASS driver do it. GDAL sets Grass2CPLErrorHook while GRASS QgsGrass::error_routine. When an error happens in GDAL it does not call the Grass2CPLErrorHook but QgsGrass::error_routine because the routine was reset in the mean time by QGIS GRASS plugin. QgsGrass::error_routine throws QgsGrass::Exception but that is not caught by raster layer renderer (right, it is expecting error from GDAL) and thus qgis crashes. Isn't it nice!?
This was discovered when fixing #1900