https://issues.qgis.org/https://issues.qgis.org/favicon.ico2010-06-26T11:39:35ZQGIS Issue TrackingQGIS Application - Bug report #2840: adding an empty spatialite db causes qgis to crashhttps://issues.qgis.org/issues/2840?journal_id=225112010-06-26T11:39:35ZJürgen Fischerjef@norbit.de
<ul></ul><p>Are you using SDA4PP? Seems like that it intercepts GDAL errors, but crashes when one happens.</p>
<p>See also <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/2829" title="qgis doesn't show any message/warning when splitting a polygon with an invalid geometry (Closed)">#2829</a> and probably also <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/2768" title="crash when opening an invalid file (Closed)">#2768</a>.</p> QGIS Application - Bug report #2840: adding an empty spatialite db causes qgis to crashhttps://issues.qgis.org/issues/2840?journal_id=225122010-06-26T14:33:22ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>I removed SDA4PP and the messages changes slightly, but sI still have a crash.</p>
<p>if using "add raster layer" I get</p>
<p>"/home/gio/Desktop/teste is not a supported raster data source"</p>
<p>I believe that this should appear more like "empty db"</p>
<p>if using "add vector layer" qgis crashes with</p>
<pre>
ERROR 10: Pointer 'hLayer' is NULL in 'OGR_L_GetExtent'.
ERROR 10: Pointer 'hLayer' is NULL in 'OGR_L_GetSpatialRef'.
ERROR 10: Pointer 'hLayer' is NULL in 'OGR_L_GetLayerDefn'.
Fatal: ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 439
Aborted
</pre> QGIS Application - Bug report #2840: adding an empty spatialite db causes qgis to crashhttps://issues.qgis.org/issues/2840?journal_id=225132010-06-27T01:03:31ZJürgen Fischerjef@norbit.de
<ul></ul><p>We don't have support for rasterlite. So it's an unsupported datasource.</p>
<p>When I try to add spatialite layers using OGR (ie. "Add Vector Layers...") I get:<br />- on a completely empty sqlite database: "empty.db is not a valid or recognized datasource".<br />- on a fresh spatialite database without any layers: a sublayer list with geom_ref_sys, geometry_columns and spatial_ref_sys. and selecting a table produces a mostly useless layer,<br />- on a spatialite database with layers: adding a "valid" layer also produces a useless layer.</p>
<p>Why are you trying to you OGR instead of the spatialite provider?</p>
<p>Anyway still no crash. Are you sure that you don't have any other misbehaving plugins? What about a backtrace?</p> QGIS Application - Bug report #2840: adding an empty spatialite db causes qgis to crashhttps://issues.qgis.org/issues/2840?journal_id=225142010-06-27T02:51:34ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Hi,</p>
<p>Replying to [comment:3 jef]:</p>
<blockquote>
<p>We don't have support for rasterlite. So it's an unsupported datasource.</p>
</blockquote>
<p>well, gdal 1.7 supports it, so I was just playing around. In any case if you try open a rasterlite db trough "add raster layer" it works fine... since the db has just one raster map, see <a class="issue tracker-2 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/1040" title="[PATCH] qgis crashes when I try to add RPF A.TOC file (also: RasterLite support) (Closed)">#1040</a></p>
<blockquote>
<p>When I try to add spatialite layers using OGR (ie. "Add Vector Layers...") I get:<br />- on a completely empty sqlite database: "empty.db is not a valid or recognized datasource".<br />- on a fresh spatialite database without any layers: a sublayer list with geom_ref_sys, geometry_columns and spatial_ref_sys. and selecting a table produces a mostly useless layer,</p>
</blockquote>
<p>In these two cases here I'm getting the crash, see the above message.</p>
<blockquote>
<p>- on a spatialite database with layers: adding a "valid" layer also produces a useless layer.</p>
</blockquote>
<p>If the SL db has at least one layer in it, it works fine for me. If it has more than one qgis correctly present the window to let choose what layers to load, and it all shows fine in the qgis canvas. I used the SL sample dataset.</p>
<blockquote>
<p>Why are you trying to you OGR instead of the spatialite provider?</p>
</blockquote>
<p>for no reason in particular, as is valid ogr datasource I was testing qgis behavior.</p>
<blockquote>
<p>Anyway still no crash. Are you sure that you don't have any other misbehaving plugins? What about a backtrace?</p>
</blockquote>
<p>I removed all the plugins (removed the entire .qgis directory) and I still see the crash when opening empty SL or sqlite dbs.</p>
<p>If you please help me on how obtain the backtrace I will post it back right after.</p>
<p>cheers</p> QGIS Application - Bug report #2840: adding an empty spatialite db causes qgis to crashhttps://issues.qgis.org/issues/2840?journal_id=225152010-06-27T07:44:15ZJürgen Fischerjef@norbit.de
<ul></ul><p>Replying to [comment:4 lutra]:</p>
<blockquote>
<p>Replying to [comment:3 jef]:</p>
<blockquote>
<p>We don't have support for rasterlite. So it's an unsupported datasource.</p>
</blockquote></blockquote>
<blockquote>
<p>well, gdal 1.7 supports it, so I was just playing around. In any case if you<br />try open a rasterlite db trough "add raster layer" it works fine... since the<br />db has just one raster map, see <a class="issue tracker-2 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/1040" title="[PATCH] qgis crashes when I try to add RPF A.TOC file (also: RasterLite support) (Closed)">#1040</a></p>
</blockquote>
<p>Ok. With GDAL 1.7 from experimental I can add the the layer. Is there a<br />sample set with multiple rasters?</p>
<blockquote><blockquote>
<p>When I try to add spatialite layers using OGR (ie. "Add Vector Layers...") I get:<br />- on a completely empty sqlite database: "empty.db is not a valid or recognized datasource".<br />- on a fresh spatialite database without any layers: a sublayer list with geom_ref_sys, geometry_columns and spatial_ref_sys. and selecting a table produces a mostly useless layer,</p>
</blockquote></blockquote>
<blockquote>
<p>In these two cases here I'm getting the crash, see the above message.</p>
</blockquote>
<p>Still no crash on the first case, but on the second with GDAL 1.7. Fixed in<br /><a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/0c1a961268c19875729dddba1a0e8a3fdeec28a7" title="fix crash on layerless OGR data sources git-svn-id: http://svn.osgeo.org/qgis/trunk@13817 c8812c...">0c1a9612</a> (SVN r13818).</p>
<blockquote><blockquote>
<p>- on a spatialite database with layers: adding a "valid" layer also produces a useless layer.</p>
</blockquote></blockquote>
<blockquote>
<p>If the SL db has at least one layer in it, it works fine for me. If it has<br />more than one qgis correctly present the window to let choose what layers to<br />load, and it all shows fine in the qgis canvas. I used the SL sample dataset.</p>
</blockquote>
<p>Works fine with GDAL 1.7 for me now, too.</p>
<blockquote><blockquote>
<p>Anyway still no crash. Are you sure that you don't have any other misbehaving plugins? What about a backtrace?</p>
</blockquote>
<p>I removed all the plugins (removed the entire .qgis directory) and I still<br />see the crash when opening empty SL or sqlite dbs. If you please help me on<br />how obtain the backtrace I will post it back right after.</p>
</blockquote>
<p>I added instructions to <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/UsingTracWithQuantumGis">UsingTracWithQuantumGis</a></p> QGIS Application - Bug report #2840: adding an empty spatialite db causes qgis to crashhttps://issues.qgis.org/issues/2840?journal_id=225162010-06-27T14:21:44ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><blockquote>
<p>Ok. With GDAL 1.7 from experimental I can add the the layer. Is there a<br />sample set with multiple rasters?</p>
</blockquote>
<p>I prepared one here</p>
<p><a class="external" href="http://www.faunalia.pt/downloads/db.sqlite.tar.gz">http://www.faunalia.pt/downloads/db.sqlite.tar.gz</a></p>
<p>The message that shows is</p>
<pre>
/home/gio/Desktop/db.sqlite is not a supported raster data source
This raster file has no bands and is invalid as a raster layer.
</pre>
<blockquote>
<p>Still no crash on the first case, but on the second with GDAL 1.7. Fixed in<br /><a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/0c1a961268c19875729dddba1a0e8a3fdeec28a7" title="fix crash on layerless OGR data sources git-svn-id: http://svn.osgeo.org/qgis/trunk@13817 c8812c...">0c1a9612</a> (SVN r13818).</p>
</blockquote>
<p>forget about the first case, I was probably testing a sqlite db not well formed, I tested again and is ok.</p>
<blockquote>
<p>I added instructions to <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/UsingTracWithQuantumGis">UsingTracWithQuantumGis</a></p>
</blockquote>
<p>thanks!</p> QGIS Application - Bug report #2840: adding an empty spatialite db causes qgis to crashhttps://issues.qgis.org/issues/2840?journal_id=225172010-06-27T21:53:44ZJürgen Fischerjef@norbit.de
<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>Replying to [comment:6 lutra]:</p>
<blockquote>
<blockquote>
<p>Ok. With GDAL 1.7 from experimental I can add the the layer. Is there a<br />sample set with multiple rasters?</p>
</blockquote></blockquote>
<blockquote>
<p>I prepared one here</p>
</blockquote>
<blockquote>
<p><a class="external" href="http://www.faunalia.pt/downloads/db.sqlite.tar.gz">http://www.faunalia.pt/downloads/db.sqlite.tar.gz</a></p>
</blockquote>
<p>Thanks. I meanwhile found planet_earth.sqlite and use it to come up with a patch for <a class="issue tracker-2 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/1040" title="[PATCH] qgis crashes when I try to add RPF A.TOC file (also: RasterLite support) (Closed)">#1040</a>.</p>
<p>But I take it this doesn't crash anymore anyway. So I'm closing the ticket.</p>