Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2303 closed bug (fixed)

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:
Must Fix for Release: No Platform: All
Platform Version: Win32 and Ubuntu 9.10 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 (6)

comment:1 Changed 11 years ago by jef

Summary: Dislaying raster in a Location with undefined projection causes QGIS to crashDisplaying raster in a Location with undefined projection causes QGIS to crash

comment:2 Changed 11 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.

comment:3 Changed 11 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.

comment:4 Changed 11 years ago by rblazek

Resolution: fixed
Status: newclosed

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.

comment:5 Changed 11 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.

comment:6 Changed 11 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.