Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1434 closed bug (fixed)

GRASS user's map WMS crashes QGIS

Reported by: msieczka Owned by: nobody
Priority: critical: causes crash or data corruption Milestone:
Component: WMS Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

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
#1  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
#2  0x00007f7625da62ec in QgsRasterLayer::draw (this=0x2055260, rendererContext=@0x143f8b8) at /home/shoofi/src/straight/qgis-trunk/src/core/raster/qgsrasterlayer.cpp:1483
#3  0x00007f7625cf8092 in QgsMapRenderer::render (this=0x143f820, painter=0x7fff2e54f3a0) at /home/shoofi/src/straight/qgis-trunk/src/core/qgsmaprenderer.cpp:340
#4  0x00007f76260f7029 in QgsMapCanvasMap::render (this=0x14490e0) at /home/shoofi/src/straight/qgis-trunk/src/gui/qgsmapcanvasmap.cpp:84
#5  0x00007f76260f1c52 in QgsMapCanvas::refresh (this=0x14e39c0) at /home/shoofi/src/straight/qgis-trunk/src/gui/qgsmapcanvas.cpp:365
#6  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
#7  0x00000000004c4005 in QgisApp::addWmsLayer (this=0x1388bd0) at /home/shoofi/src/straight/qgis-trunk/src/app/qgisapp.cpp:2275
#8  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
#9  0x00007f76258f06d4 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#10 0x00007f7624dfad77 in QAction::triggered () from /usr/lib/libQtGui.so.4
#11 0x00007f7624dfb540 in QAction::activate () from /usr/lib/libQtGui.so.4
#12 0x00007f762510bcca in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007f762510bf65 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#14 0x00007f76251d374a in QToolButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#15 0x00007f7624e53139 in QWidget::event () from /usr/lib/libQtGui.so.4
#16 0x00007f7624e00a5d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#17 0x00007f7624e0904a in QApplication::notify () from /usr/lib/libQtGui.so.4
#18 0x00007f7625cac70e in QgsApplication::notify (this=0x7fff2e5512b0, receiver=0x13cb350, event=0x7fff2e5503d0)
    at /home/shoofi/src/straight/qgis-trunk/src/core/qgsapplication.cpp:78
#19 0x00007f76258dc381 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#20 0x00007f7624e083e8 in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
#21 0x00007f7624e6c909 in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007f7624e6b7ff in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#23 0x00007f7624e92c84 in ?? () from /usr/lib/libQtGui.so.4
#24 0x00007f762173f78b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#25 0x00007f7621742f5d in ?? () from /usr/lib/libglib-2.0.so.0
#26 0x00007f762174311b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#27 0x00007f762590470f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#28 0x00007f7624e9244f in ?? () from /usr/lib/libQtGui.so.4
#29 0x00007f76258daca2 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#30 0x00007f76258dae2d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#31 0x00007f76258dd2dd in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#32 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.

Attachments (2)

wms_grass.png (9.3 KB ) - added by msieczka 15 years ago.
wms_marble.png (11.1 KB ) - added by msieczka 15 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by mhugent, 15 years ago

This WMS works for me (tested with r9742). 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

in reply to:  1 comment:2 by msieczka, 15 years ago

Replying to mhugent:

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

Still crashes on me as of r9743.

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).

by msieczka, 15 years ago

Attachment: wms_grass.png added

by msieczka, 15 years ago

Attachment: wms_marble.png added

comment:3 by borysiasty, 15 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?

comment:4 by mhugent, 15 years ago

Resolution: fixed
Status: newclosed

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 r9751, there is a fix that QGIS does not crash and give an error message instead.

in reply to:  4 comment:5 by msieczka, 15 years ago

Platform: DebianAll
Resolution: fixed
Status: closedreopened

Replying to 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 r9751, 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.

comment:6 by mhugent, 15 years ago

Resolution: fixed
Status: reopenedclosed

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 r9776, 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

comment:7 by (none), 15 years ago

Milestone: Version 1.0.0

Milestone Version 1.0.0 deleted

Note: See TracTickets for help on using tickets.