Ticket #2303 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: micha Owned by: rugginoso
Priority: critical: causes crash or data corruption Milestone: Version 1.5.0
Component: GRASS Version: 1.3.0
Keywords: X-Y Location, raster Cc:
Platform Version: Win32 and Ubuntu 9.10 Platform: All
Must Fix for Release: No Awaiting user input: no

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.

Change History

Changed 3 years ago by jef

  • summary changed from Dislaying raster in a Location with undefined projection causes QGIS to crash to Displaying raster in a Location with undefined projection causes QGIS to crash

Changed 3 years ago by rblazek

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.

Changed 3 years ago by mloskot

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.

Changed 3 years ago by rblazek

  • status changed from new to closed
  • resolution set to fixed

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.

Changed 3 years ago by mloskot

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.

Changed 3 years ago by mloskot

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

Note: See TracTickets for help on using tickets.