Bug report #2303

Displaying raster in a Location with undefined projection causes QGIS to crash

Added by Micha Silver over 14 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Lorenzo Masini
Category:GRASS
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 #:12363

Description

When working in a Location with no projection information (an "X-Y" Location), you can display vector maps, but trying to display a raster causes QGIS to crash. Same results in both Linux and windows.

Recreate the issue as follows:
Using the "Create new Mapset" wizard create a new location with undefined CRS. Open a GRASS teminal and run r.mapcalc "test=1" (or equivalent in the GRASS Toolbox).
Trying to add the test raster causes the crash. Vectors display properly.

The same Location, mapset, and raster will display properly in GRASS itself - outside of QGIS.

History

#1 Updated by Redmine Admin over 14 years ago

It is bug in GDAL GRASS driver, I have reported the bug in GDAL trac http://trac.osgeo.org/gdal/ticket/3323 with patch attached.

Unfortunately there is no workaround in QGIS, I'll keep it open at least until the patch is applied in GDAL.

#2 Updated by Mateusz Loskot - over 14 years ago

Radim,

Wouldn't it be simpler to fix G_free_key_value function in GRASS to follow semantic of free() and do nothing for null pointer? The G_free in GRASS already does nothing for null pointer, as standard free() promises.

#3 Updated by Redmine Admin over 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Yes, better to fix also in GRASS, but it would take too long to wait for it in distributions.

I close it, the fix is applied in GDAL trunk.

#4 Updated by Mateusz Loskot - over 14 years ago

Radim,

Understood, though I still suggest to apply the fix to GRASS as well. So, once new fixed version is released, messing 3rd parties code is no longer needed.

#5 Updated by Mateusz Loskot - over 14 years ago

The issue has been fixed in GRASS (https://trac.osgeo.org/grass/ticket/866)

Also available in: Atom PDF