Bug report #11217

crash / bad alloc when loading raster with only nodata values

Added by Vincent Schut about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Rasters
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:19527

Description

When loading a geotiff with only nodata values (e.g. the nodata value is set to 0, and the tif is full of 0's), qgis crashes (when started with "qgis <therasterfile.tif>") gives a "std:bad alloc" error in a small window (when loading the raster from a running qgis).

Attached is a test file (geotiff of 10x10 pixels, all zero's, nodata=0)

This is the output when qgis is started in the console with the offending raster as argument ("qgis emtpy_test_small.tif"):

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

Qgis version: updated from git trunk yesterday
OS: Arch Linux 64 bit

empty_test_small.tif (748 Bytes) Vincent Schut, 2014-09-17 07:00 AM

Associated revisions

Revision 086b262e
Added by Jürgen Fischer about 10 years ago

avoid creating a histogram without range (fixes #11217)

History

#1 Updated by Giovanni Manghi about 10 years ago

  • Affected QGIS version changed from 2.4.0 to master
  • Priority changed from Normal to Severe/Regression

It is a regression as it worked fine until 2.2 included. Master and 2.4 are affected. Tested on Linux and Windows.

#2 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF