[gdal-dev] Crash using mem raster on Windows

Andrew Bell andrew.bell.ia at gmail.com
Mon Oct 30 09:11:04 PDT 2017


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 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?

Thanks,

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171030/497fd5a1/attachment.html>


More information about the gdal-dev mailing list