https://issues.qgis.org/https://issues.qgis.org/favicon.ico2009-11-29T04:56:36ZQGIS Issue TrackingQGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204222009-11-29T04:56:36ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>confirmed in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/29ca1a234968f105a17a0b432ca51223e5f61351" title="fix #2151 git-svn-id: http://svn.osgeo.org/qgis/trunk@12280 c8812cc2-4d05-0410-92ff-de0c093fc19c">29ca1a23</a> (SVN r12281)</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204232010-01-09T07:24:41ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>I created a GRASS raster using r.external pointing to the raster available in the qgis sample dataset. Called it "teste". Under windows xp qgis crashes when adding it. The output returned by <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/DebugView">DebugView</a> for Windows is the following</p>
<pre>
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(34) : (QgsGrassSelect::QgsGrassSelect) [[QgsGrassSelect]]() type = 2
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(203) : (QgsGrassSelect::setMapsets) setMapsets()
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(245) : (QgsGrassSelect::setMaps) setMaps()
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\providers\\grass\\qgsgrass.cpp(759) : (QgsGrass::rasters) entered.
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\providers\\grass\\qgsgrass.cpp(796) : (QgsGrass::rasters) mapsetPath = C:/Documents and Settings/Gio/Desktop/qgis_sample_data/qgis_sample_data/grassdata/alaska/demo
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(340) : (QgsGrassSelect::setLayers) setLayers()
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(203) : (QgsGrassSelect::setMapsets) setMapsets()
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(245) : (QgsGrassSelect::setMaps) setMaps()
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\providers\\grass\\qgsgrass.cpp(759) : (QgsGrass::rasters) entered.
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\providers\\grass\\qgsgrass.cpp(796) : (QgsGrass::rasters) mapsetPath = C:/Documents and Settings/Gio/Desktop/qgis_sample_data/qgis_sample_data/grassdata/alaska/demo
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(340) : (QgsGrassSelect::setLayers) setLayers()
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\plugins\\grass\\qgsgrassselect.cpp(340) : (QgsGrassSelect::setLayers) setLayers()
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\core\\qgsmaplayer.cpp(55) : (QgsMapLayer::QgsMapLayer) lyrname is 'teste'
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\core\\qgsmaplayer.cpp(61) : (QgsMapLayer::QgsMapLayer) layerName is 'teste'
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\core\
aster\\qgsrastershader.cpp(25) : (QgsRasterShader::QgsRasterShader) called.
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\core\
aster\\qgsrastershaderfunction.cpp(24) : (QgsRasterShaderFunction::QgsRasterShaderFunction) entered.
d:\\progs\\c\\qgis-build\\src\\qgis\\qgis_unstable\\src\\core\\qgsmaplayer.cpp(106) : (QgsMapLayer::setLayerName) new name is 'teste'
</pre> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204242010-02-04T13:15:39ZRedmine Admin
<ul></ul><p>Please check with new data provider in trunk <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/728ecc694335f7f8566dd54dcc6134e929b440be" title="GRASS raster data provider git-svn-id: http://svn.osgeo.org/qgis/trunk@12880 c8812cc2-4d05-0410-...">728ecc69</a> (SVN r12881) .</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204252010-02-05T00:55:34ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Tested under XP and still crashes.</p>
<p>The curios thing is that qgis crashes if you try add the raster from the grass browser but doesn't crash if you add the raster from the qgis grass toolbar. Nevertheless the raster doesn't show correctly and qgis shows the following message:</p>
<pre>
Cannot draw raster
Cannot start module
command: C:/OSGeo4W/apps/qgis-dev/./grass/modules/qgis.d.rast.exe map=teste1@demo window=-7.1176e+06,1.33306e+06,4.89704e+06,7.80968e+06,1170,631<br><br>ERRO:Unable to locate symbol <GDALAllRegister>
</pre>
<p>The resulting raster is all grey and in the properties shows no color bands.</p>
<p>As raster to test I used the one in the qgis demo dataset.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204262010-02-05T03:05:47ZRedmine Admin
<ul></ul><p>Replying to [comment:5 lutra]:</p>
<blockquote>
<p>Tested under XP and still crashes.</p>
</blockquote>
<p>Thanks for testing.</p>
<blockquote>
<p>The curios thing is that qgis crashes if you try add the raster from the grass browser but doesn't crash if you add the raster from the qgis grass toolbar.</p>
</blockquote>
<p>That is OK, I just forgot to use the new driver also in browser and module, fixed in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/a132e79d4e667ef3220cecf32bcf0d65f0b33871" title="use GRASS raster provider everywhere git-svn-id: http://svn.osgeo.org/qgis/trunk@12885 c8812cc2-...">a132e79d</a> (SVN r12886).</p>
<blockquote>
<p>Nevertheless the raster doesn't show correctly and qgis shows the following message:</p>
</blockquote>
<pre>
> Cannot draw raster
> Cannot start module
> command: C:/OSGeo4W/apps/qgis-dev/./grass/modules/qgis.d.rast.exe map=teste1@demo window=-7.1176e+06,1.33306e+06,4.89704e+06,7.80968e+06,1170,631<br><br>ERRO:Unable to locate symbol <GDALAllRegister>
</pre>
<p>It seems that GRASS libs are compiled with GDAL but the module qgis.d.rast.exe was not compiled with GDAL libs. I have added GDAL_LIBRARY into CMakeLists.txt in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/8ed95c6454ea2abfe9b3e1511a8b606d143a6d65" title="added GDAL_LIBRARY for GRASS modules because GRASS libs can use GDAL git-svn-id: http://svn.osge...">8ed95c64</a> (SVN r12887).</p>
<blockquote>
<p>The resulting raster is all grey and in the properties shows no color bands.</p>
</blockquote>
<p>It just draws the gray rectangle if the GRASS module fails.</p>
<p>No we have to wait until tomorrow for the new build.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204272010-02-05T05:51:14ZRedmine Admin
<ul></ul><p>I have got working an old PC with XP today, I have downloaded fresh nightly build via osgeo4w and it works!</p>
<p>Lutra, are you sure your installation is not broken? Maybe qgis-dev was built with newer version of libs? Could you try to reinstall from scratch?</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204282010-02-05T06:00:28ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Hi,</p>
<p>I'm putting together several notes about the results of your last commits. I'll check this ticket again in the next minutes and then I'll leave further feedback.</p>
<p>Thanks in advance</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204292010-02-05T06:36:51ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Hi again,</p>
<p>under xp I removed, cleaned and reinstalled everything. In my case the result is the same as above, and so is under Vista 32bit (I made a fresh install of the OS).</p>
<p>In both cases the windows OS are installed in virtual machines.</p>
<p>To test I used the "landcover.img" raster in the qgis demo dataset.</p>
<p>Under linux is ok.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204302010-02-05T07:14:35ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>PS<br />I'm available to further tests as many times as necessary, but I will need a little insight about Dbgview.exe in order to produce outputs that can help solve this problems.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204312010-02-05T08:13:16ZRedmine Admin
<ul></ul><p>Replying to [comment:9 lutra]:</p>
<blockquote>
<p>To test I used the "landcover.img" raster in the qgis demo dataset.</p>
</blockquote>
<p>landcover.img? Aren't we talking about GRASS? I am testing with gtopo30 from demo mapset in alaska GRASS location from demo dataset.</p>
<blockquote>
<p>PS I'm available to further tests as many times as necessary, but I will need a little insight about Dbgview.exe in order to produce outputs that can help solve this problems.</p>
</blockquote>
<p>You can try to just get working the C:/OSGeo4W/apps/qgis-dev/grass/modules/qgis.d.rast.exe from GRASS shell and check with something like ldd and nm for Windows why GDALAllRegister cannot be found.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204322010-02-05T08:21:11ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><blockquote>
<p>landcover.img? Aren't we talking about GRASS? I am testing with gtopo30 from demo mapset in alaska GRASS location from demo dataset.</p>
</blockquote>
<p>Yes, I'm just importing the image in a mapset with r.in. By the way is the same raster you find in mapset in the qgis demo dataset. By the way the results (for me) are the same when using directly the data inside the mapset of the qgis demo dataset.</p>
<p>I'll try to do what you suggest and the report back.</p>
<p>In any case as for you is working I would suggest to test some other windows installation, maybe are just mine that are giving problems.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204332010-02-05T09:11:02ZRedmine Admin
<ul></ul><p>Replying to [comment:12 lutra]:</p>
<p>Sorry, I have overlooked we are in r.external bug, there were many tickets about GRASS rasters. I thought that even native GRASS rasters don't work.</p>
<p>I have inspected qgis.d.rast.exe with dependency walker and it indeed does not depend on gdal, so if the map needs to read external data via GDAL it obviously fails.</p>
<p>Let us wait until tomorrow to see if the change in CMakeLists.txt helped.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204342010-02-06T16:37:03ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Hi, I just updated to <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/4be3de4bdaffa8c5172b427ec761a9d902e339ec" title="fix #2408 git-svn-id: http://svn.osgeo.org/qgis/trunk@12891 c8812cc2-4d05-0410-92ff-de0c093fc19c">4be3de4b</a> (SVN r12892). As expected now there is no more crash when adding a raster created with r.external. Nevertheless I'm always getting qgis warnings like</p>
<pre>
Cannot draw raster
Cannot start module
command: C:/OSGeo4W/apps/qgis-dev/./grass/modules/qgis.d.rast.exe map=land@demo window=-7.1176e+06,1.32961e+06,4.89704e+06,7.80968e+06,1184,639<br><br>
GRASS_INFO_ERROR(2864,1): Unable to locate symbol <GDALAllRegister>
GRASS_INFO_END(2864,1)
</pre>
<pre>
Cannot query raster
Cannot start module
command: C:/OSGeo4W/apps/qgis-dev/./grass/modules/qgis.g.info.exe info=query rast=land@demo coor=-3.89397e+06,5.61803e+06<br><br>
GRASS_INFO_ERROR(1596,1): Unable to locate symbol <GDALAllRegister>
GRASS_INFO_END(1596,1)
</pre>
<p>on both XP and Vista, and the raster is rendered all grey with no color bands. Always using "landcover.img" as test image.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204352010-02-07T01:27:22ZRedmine Admin
<ul></ul><p>I have got the same error with GRASS / OSGeo4W. So please, fill first a bug report for GRASS project and once it is working in GRASS / OSGeo4W and not in QGIS / OSGeo4W make a new comment here.</p>
<p>It is most probably also the reason why it was crashing QGIS when loaded via GDAL, but there could be other problems with circular reference, GDAL was reading data from GRASS which was reading data through GDAL: QGIS->GDAL->GRASS->GDAL->data</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204362010-02-07T08:21:10ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Replying to [comment:15 rblazek]:</p>
<blockquote>
<p>I have got the same error with GRASS / OSGeo4W. So please, fill first a bug report for GRASS project and once it is working in GRASS / OSGeo4W and not in QGIS / OSGeo4W make a new comment here.</p>
</blockquote>
<p>done</p>
<p><a class="external" href="https://trac.osgeo.org/grass/ticket/913">https://trac.osgeo.org/grass/ticket/913</a></p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204372010-02-07T08:54:24ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Resolution</strong> set to <i>fixed</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Closing as the bug that crashed qgis is fixed and the following one (see comment 14) is not in qgis but seems to be in GRASS for windows (both osgeo4w packages and standalone installer).</p>
<p>See<br /><a class="external" href="https://trac.osgeo.org/grass/ticket/913">https://trac.osgeo.org/grass/ticket/913</a></p>
<p>reopen if necessary.</p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204382010-02-07T09:27:51ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Replying to [comment:16 lutra]:</p>
<blockquote>
<p>Replying to [comment:15 rblazek]:</p>
<blockquote>
<p>I have got the same error with GRASS / OSGeo4W. So please, fill first a bug report for GRASS project and once it is working in GRASS / OSGeo4W and not in QGIS / OSGeo4W make a new comment here.</p>
</blockquote>
<p>done</p>
<p><a class="external" href="https://trac.osgeo.org/grass/ticket/913">https://trac.osgeo.org/grass/ticket/913</a></p>
</blockquote>
<p>see also</p>
<p><a class="external" href="https://trac.osgeo.org/grass/ticket/885">https://trac.osgeo.org/grass/ticket/885</a></p> QGIS Application - Bug report #2078: [Windows] adding a GRASS raster created with r.external crashes QGIShttps://issues.qgis.org/issues/2078?journal_id=204392010-02-09T05:35:30ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>O, I noticed that today GRASS was updated in the osgeo4w installer. I then tested r.external and all seems to works fine now.</p>