GRASS error routin conflict
|Assigned to:||Lorenzo Masini||% Done:||
|Target version:||Version 2.0.0|
|Platform version:||Affected version:||master|
|Status info:||0||Causes crash or corruption:||No|
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