Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash exporting to GS7BG format #31775

Closed
2 of 3 tasks
marisn opened this issue Sep 15, 2019 · 1 comment
Closed
2 of 3 tasks

Crash exporting to GS7BG format #31775

marisn opened this issue Sep 15, 2019 · 1 comment
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption

Comments

@marisn
Copy link
Contributor

marisn commented Sep 15, 2019

  • Search through existing issue reports and gis.stackexchange.com to check whether the issue already exists
  • Test with a clean new user profile.
  • Create a light and self-contained sample dataset and project file which demonstrates the issue

Describe the bug
Saving to GS7BG causes a segfault. The same dataset can be converted with gdal_translate without any problems.

How to Reproduce
Open any raster dataset and go to export. Choose "Golden Software 7 Binary Grid", enter file name and click save. Segfault in a few seconds.

QGIS and OS versions
Tested with 3.8.1 on Gentoo ~AMD64 with gdal 2.4.1
Originally I got a notice from a Windows user running 3.8.2.

Additional context
Backtrace from 364c937

No symbol table info available.
#1  0x00007fffee5fc6e2 in GDALRasterBand::IRasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, long long, long long, GDALRasterIOExtraArg*) () from /usr/lib64/libgdal.so.20
No symbol table info available.
#2  0x00007fffee5dd8d3 in GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, long long, long long, GDALRasterIOExtraArg*) () from /usr/lib64/libgdal.so.20
No symbol table info available.
#3  0x00007ffff3b815dc in QgsGdalProviderBase::gdalRasterIO (hBand=0x7fffac006680, eRWFlag=GF_Write, nXOff=500, nYOff=0, nXSize=500, nYSize=500, 
    pData=0x7fffaddc3580, nBufXSize=500, nBufYSize=500, eBufType=GDT_Float64, nPixelSpace=0, nLineSpace=0, feedback=0x0)
    at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/providers/gdal/qgsgdalproviderbase.cpp:304
        extra = {nVersion = 1, eResampleAlg = GRIORA_NearestNeighbour, pfnProgress = 0x0, pProgressData = 0x0, bFloatingPointWindowValidity = 0, 
          dfXOff = 2.4703282292062327e-321, dfYOff = 6.9533035377315488e-310, dfXSize = 6.9533035377299678e-310, dfYSize = 4.6355705437721583e-310}
        err = 32767
#4  0x00007ffff3b98a0c in QgsGdalProvider::write (this=0x7fffac9c5f30, data=0x7fffaddc3580, band=1, width=500, height=500, xOffset=500, yOffset=0)
    at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/providers/gdal/qgsgdalprovider.cpp:2952
        locker = {val = 140736079073249}
        rasterBand = 0x7fffac006680
#5  0x00007ffff428d7c0 in QgsRasterFileWriter::writeDataRaster (this=0x55555a6017a8, pipe=0x55555956e090, iter=0x7fffc0f0d9a0, nCols=3428, nRows=2119, 
    outputExtent=..., crs=..., destDataType=Qgis::Float32, destHasNoDataValueList=..., destNoDataValueList=..., destProvider=0x7fffac9c5f30, 
    feedback=0x5555595e0470) at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/raster/qgsrasterfilewriter.cpp:475
        i = 1
        destBlockList = {<QListSpecialMethods<QgsRasterBlock*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {
                    _q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, 
                array = {0x0}}, d = 0x7fffaca349d0}, d = 0x7fffaca349d0}}
        __FUNCTION__ = "writeDataRaster"
        iface = 0x55555a5f90c0
        srcProvider = 0x5555599f2470
        nBands = 1
        iterLeft = 500
        iterTop = 0
        iterCols = 500
        iterRows = 500
        blockList = {<QListSpecialMethods<QgsRasterBlock*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {
                    _q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, 
                array = {0x0}}, d = 0x7fffac0fef60}, d = 0x7fffac0fef60}}
        nParts = 35
        fileIndex = 1
#6  0x00007ffff428c880 in QgsRasterFileWriter::writeDataRaster (this=0x55555a6017a8, pipe=0x55555956e090, iter=0x7fffc0f0d9a0, nCols=3428, nRows=2119, 
    outputExtent=..., crs=..., transformContext=..., feedback=0x5555595e0470)
    at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/raster/qgsrasterfilewriter.cpp:303
        __FUNCTION__ = "writeDataRaster"
        iface = 0x55555a5f90c0
        srcProvider = 0x5555599f2470
        nBands = 1
        dataTypeSize = 4
        destHasNoDataValueList = {<QListSpecialMethods<bool>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {
                    _q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, 
                array = {0x0}}, d = 0x7fffac137850}, d = 0x7fffac137850}}
        destNoDataValueList = {<QListSpecialMethods<double>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {
                    _q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, 
                array = {0x0}}, d = 0x7fffac136cd0}, d = 0x7fffac136cd0}}
        destDataTypeList = {<QListSpecialMethods<Qgis::DataType>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {
                    _q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, 
                array = {0x0}}, d = 0x7fffac0e02a0}, d = 0x7fffac0e02a0}}
        destDataType = Qgis::Float32
        destProvider = 0x7fffac9c5f30
        pixelSize = 4.9999523045507512
        geoTransform = {335190.9914, 4.9999523045507512, 0, 335616.79359999998, 0, -4.99928419065595}
        error = 16280
#7  0x00007ffff428b7ae in QgsRasterFileWriter::writeRaster (this=0x55555a6017a8, pipe=0x55555956e090, nCols=3428, nRows=2119, outputExtent=..., crs=..., 
    transformContext=..., feedback=0x5555595e0470) at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/raster/qgsrasterfilewriter.cpp:154
        e = 4294902015
        __FUNCTION__ = "writeRaster"
        iface = 0x55555a5f90c0
        srcInput = @0x5555599f24b0: {_vptr.QgsRasterInterface = 0x7ffff49fa330 <vtable for QgsGdalProvider+800>, mInput = 0x0, 
          mStatistics = {<QListSpecialMethods<QgsRasterBandStats>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {
                      _q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, 
                  array = {0x0}}, d = 0x7fffac1377f0}, d = 0x7fffac1377f0}}, mHistograms = {<QListSpecialMethods<QgsRasterHistogram>> = {<No data fields>}, 
            {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, 
                  alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7fffec827480 <QListData::shared_null>}, 
              d = 0x7fffec827480 <QListData::shared_null>}}, mOn = true}
        iter = {static DEFAULT_MAXIMUM_TILE_WIDTH = 2000, static DEFAULT_MAXIMUM_TILE_HEIGHT = 2000, mInput = 0x55555a5f90c0, mRasterPartInfos = {
            d = 0x7fffac009b60}, mExtent = {mXmin = 335190.9914, mYmin = 325023.31040000002, mXmax = 352330.82789999997, mYmax = 335616.79359999998}, 
          mFeedback = 0x0, mMaximumTileWidth = 500, mMaximumTileHeight = 500}
        pyramidFile = <incomplete type>
#8  0x00007ffff423af81 in QgsRasterFileWriterTask::run (this=0x55555a601740)
    at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/raster/qgsrasterfilewritertask.cpp:59
No locals.
#9  0x00007ffff3f76089 in QgsTask::start (this=0x55555a601740) at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/qgstaskmanager.cpp:75
No locals.
#10 0x00007ffff3f797cf in QgsTaskRunnableWrapper::run (this=0x555558e8be00)
    at /run/media/maris/Nartiss_Terabyte/soft/qgis_marisn/src/core/qgstaskmanager.cpp:358
No locals.
#11 0x00007fffec5c4cd3 in QThreadPoolThread::run() () from /usr/lib64/libQt5Core.so.5
No symbol table info available.
#12 0x00007fffec5c1a52 in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
No symbol table info available.
#13 0x00007fffebf433a7 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#14 0x00007fffec062a8f in clone () from /lib64/libc.so.6
No symbol table info available.
@marisn marisn added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 15, 2019
@rouault
Copy link
Contributor

rouault commented Sep 15, 2019

Confirmed

@rouault rouault self-assigned this Sep 15, 2019
rouault added a commit to rouault/QGIS that referenced this issue Sep 16, 2019
rouault added a commit to rouault/QGIS that referenced this issue Sep 17, 2019
…gis#31775), and detect more potential crashing situations

Partial backport of qgis#31785
nyalldawson pushed a commit that referenced this issue Sep 17, 2019
…31775), and detect more potential crashing situations

Partial backport of #31785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption
Projects
None yet
Development

No branches or pull requests

2 participants