Re: [gdal-dev] Crash using mem raster on Windows

2017-10-30 Thread Even Rouault
On lundi 30 octobre 2017 18:08:52 CET Andrew Bell wrote: > On Mon, Oct 30, 2017 at 4:36 PM, Even Rouault > > wrote: > > Andrew, > > > > > I'm creating a memory raster using the following code: > > > > > > [...] > > > > > > I read the three bands in succession. This works fine on OSX/Linux, but

Re: [gdal-dev] Crash using mem raster on Windows

2017-10-30 Thread Even Rouault
Andrew, > I'm creating a memory raster using the following code: > [...] > I read the three bands in succession. This works fine on OSX/Linux, but > fails when attempting to read the second band on Windows. Any thoughts on > what might be the issue? You need to use CPLPrintPointer() to format th

[gdal-dev] Crash using mem raster on Windows

2017-10-30 Thread Andrew Bell
Hi, I'm creating a memory raster using the following code: std::string makeColor() { // Red is specified. Green and blue are 0. static uint8_t rgb[12] = { 1, 2, 3, 4 }; std::ostringstream ss; ss << "MEM:::PIXELS=4,LINES=1,BANDS=3,DATAPOINTER=" << &rgb; return ss.str(); } I