Bug report #1434

GRASS user's map WMS crashes QGIS

Added by Maciej Sieczka - almost 16 years ago. Updated about 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Web Services clients/WMS
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11494

Description

Crash viewing GRASS users WMS map http://mapserver.gdf-hannover.de/cgi-bin/grassuserwms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.0.0 :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f7626414710 (LWP 22557)]
0x00000000004b6186 in QString (this=0x7fff2e54e300, other=@0x0) at /usr/include/qt4/QtCore/qstring.h:670
670    inline QString::QString(const QString &other) : d(other.d)
(gdb) bt
#0  0x00000000004b6186 in QString (this=0x7fff2e54e300, other=@0x0) at /usr/include/qt4/QtCore/qstring.h:670
#3905  0x00007f76106514c4 in [[QgsWmsProvider]]::draw (this=0x2078920, viewExtent=@0x7fff2e54e6a0, pixelWidth=870, pixelHeight=435)
    at /home/shoofi/src/straight/qgis-trunk/src/providers/wms/qgswmsprovider.cpp:382
#3906  0x00007f7625da62ec in [[QgsRasterLayer]]::draw (this=0x2055260, rendererContext=@0x143f8b8) at /home/shoofi/src/straight/qgis-trunk/src/core/raster/qgsrasterlayer.cpp:1483
#3907  0x00007f7625cf8092 in [[QgsMapRenderer]]::render (this=0x143f820, painter=0x7fff2e54f3a0) at /home/shoofi/src/straight/qgis-trunk/src/core/qgsmaprenderer.cpp:340
#3908  0x00007f76260f7029 in [[QgsMapCanvasMap]]::render (this=0x14490e0) at /home/shoofi/src/straight/qgis-trunk/src/gui/qgsmapcanvasmap.cpp:84
#3909  0x00007f76260f1c52 in [[QgsMapCanvas]]::refresh (this=0x14e39c0) at /home/shoofi/src/straight/qgis-trunk/src/gui/qgsmapcanvas.cpp:365
#3910  0x00000000004b9b81 in [[QgisApp]]::addRasterLayer (this=0x1388bd0, rasterLayerPath=@0x7fff2e54f850, baseName=@0x7fff2e54f840, providerKey=@0x7fff2e54f830, 
    layers=@0x7fff2e54f820, styles=@0x7fff2e54f810, format=@0x7fff2e54f800, crs=@0x7fff2e54f7f0) at /home/shoofi/src/straight/qgis-trunk/src/app/qgisapp.cpp:5228
#3911  0x00000000004c4005 in [[QgisApp]]::addWmsLayer (this=0x1388bd0) at /home/shoofi/src/straight/qgis-trunk/src/app/qgisapp.cpp:2275
#3912  0x000000000069bf94 in [[QgisApp]]::qt_metacall (this=0x1388bd0, _c=QMetaObject::InvokeMetaMethod, _id=88, _a=0x7fff2e54fa40)
    at /home/shoofi/src/straight/qgis-trunk/build/src/app/moc_qgisapp.cxx:330
#3913  0x00007f76258f06d4 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#10 0x00007f7624dfad77 in QAction::triggered () from /usr/lib/libQtGui.so.4
#3914 0x00007f7624dfb540 in QAction::activate () from /usr/lib/libQtGui.so.4
#3915 0x00007f762510bcca in ?? () from /usr/lib/libQtGui.so.4
#3916 0x00007f762510bf65 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#3917 0x00007f76251d374a in QToolButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#3918 0x00007f7624e53139 in QWidget::event () from /usr/lib/libQtGui.so.4
#3919 0x00007f7624e00a5d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#3920 0x00007f7624e0904a in QApplication::notify () from /usr/lib/libQtGui.so.4
#3921 0x00007f7625cac70e in [[QgsApplication]]::notify (this=0x7fff2e5512b0, receiver=0x13cb350, event=0x7fff2e5503d0)
    at /home/shoofi/src/straight/qgis-trunk/src/core/qgsapplication.cpp:78
#3922 0x00007f76258dc381 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#3923 0x00007f7624e083e8 in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
#3924 0x00007f7624e6c909 in ?? () from /usr/lib/libQtGui.so.4
#3925 0x00007f7624e6b7ff in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#3926 0x00007f7624e92c84 in ?? () from /usr/lib/libQtGui.so.4
#3927 0x00007f762173f78b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#3928 0x00007f7621742f5d in ?? () from /usr/lib/libglib-2.0.so.0
#3929 0x00007f762174311b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3930 0x00007f762590470f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#3931 0x00007f7624e9244f in ?? () from /usr/lib/libQtGui.so.4
#3932 0x00007f76258daca2 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#3933 0x00007f76258dae2d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#3934 0x00007f76258dd2dd in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#3935 0x00000000004b5599 in main (argc=1, argv=0x7fff2e5519a8) at /home/shoofi/src/straight/qgis-trunk/src/app/main.cpp:683
(gdb)

Debian testing amd64, SVN r9173.

wms_grass.png (9.33 KB) Maciej Sieczka -, 2008-12-05 09:12 AM

wms_marble.png (11.1 KB) Maciej Sieczka -, 2008-12-05 09:12 AM

History

#1 Updated by Marco Hugentobler almost 16 years ago

This WMS works for me (tested with 44a2e730 (SVN r9743)). Could you test again and close if the problem has gone? If not, did you select any special option? I used png output and WGS84 crs.

Marco

#2 Updated by Maciej Sieczka - almost 16 years ago

Replying to [comment:1 mhugent]:

This WMS works for me (tested with 44a2e730 (SVN r9743)). Could you test again and close if the problem has gone?

Still crashes on me as of .

If not, did you select any special option? I used png output and WGS84 crs.

I cannot select any "Image encoding" for this WMS - the dialog is empty (screendumpd attached wms_grass.png). Unlike for other WMS's, e.g. NASA Blue Marble http://wms.jpl.nasa.gov/wms.cgi?request=GetCapabilities (screendumpd wms_marble.png).

#3 Updated by Borys Jurgiel almost 16 years ago

It crashes at mine too (rev 9743 @ Ubuntu 8.04), however after removing the redundant request works fine: http://mapserver.gdf-hannover.de/cgi-bin/grassuserwms

Maybe qgis should parse the url and reject/simplify it if something unneeded is added?

#4 Updated by Marco Hugentobler almost 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Ah, you entered the whole capabilities request instead the URL? The URL is only:
http://mapserver.gdf-hannover.de/cgi-bin/grassuserwms

Nevertheless, QGIS shouldn't crash. The problem is not the redundant REQUEST and SERVICE parameters, it is the VERSION=1.0.0 Parameter. QGIS currently only supports 1.1, 1.1.1 and 1.3. 1.0 has a slightly different capabilities response.

In 7bf27ff2 (SVN r9752), there is a fix that QGIS does not crash and give an error message instead.

#5 Updated by Maciej Sieczka - almost 16 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

Replying to [comment:4 mhugent]:

Ah, you entered the whole capabilities request instead the URL? The URL is only:
http://mapserver.gdf-hannover.de/cgi-bin/grassuserwms

Thanks for correcting me. But I guess the whole capabilities request URL used to work few weeks ago with SVN trunk QGIS. Possible?

Nevertheless, QGIS shouldn't crash. The problem is not the redundant REQUEST and SERVICE parameters, it is the VERSION=1.0.0 Parameter. QGIS currently only supports 1.1, 1.1.1 and 1.3. 1.0 has a slightly different capabilities response.

In 7bf27ff2 (SVN r9752), there is a fix that QGIS does not crash and give an error message instead.

Well if the URL I used is invalid, QGIS should issue the error message when I click 'Connect' button and not provide a crippled WMS layers list at all, like it currently does.

#6 Updated by Marco Hugentobler almost 16 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Thanks for correcting me. But I guess the whole capabilities request URL used to >work few weeks ago with SVN trunk QGIS. Possible?

Yes, this is because the WMS provider takes the URL now from the capabilities response. This was a bugfix to support WMS servers that have different urls for GetCapabilities and GetMap.
In b7a0c918 (SVN r9777), I changed behaviour such that the baseURL (as before) is taken if there was no URL found in capabilities. The request therefore works now again (but nevertheless, take the correct URL ;-)

Marco

#7 Updated by Anonymous about 15 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF