Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#258 closed bug (fixed)

WMS getcapabilities may crash on parsing DOM

Reported by: anonymous Owned by: g_j_m
Priority: critical: causes crash or data corruption Milestone:
Component: WMS Version:
Keywords: Cc:
Must Fix for Release: No Platform: Debian
Platform Version: Awaiting user input: no

Description

Connecting to http://aes.gsfc.nasa.gov/cgi-bin/wms makes QGIS to segfault.

OS: GNU/Linux x86
Qt: 4.1.2
QGIS: 05.09.2006 SVN.

QgsHttpTransaction::getSynchronously: Response received.
Debug: qgshttptransaction.cpp: 59: (~QgsHttpTransaction) QgsHttpTransaction: deconstructing.
QgsWmsProvider::getServerCapabilities: Converting to DOM.
QgsWmsProvider::parseCapabilitiesDOM: entering.
Segmentation fault

BT:

#0  0xb67cb27b in strlen () from /lib/tls/i686/cmov/libc.so.6
#1  0xb679f2e4 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
#2  0xb67bca36 in vsnprintf () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7dd1eba in qvsnprintf () from /usr/lib/libQtCore.so.4
#4  0xb7d9239b in qWarning () from /usr/lib/libQtCore.so.4
#5  0xb46b06e0 in QgsWmsProvider::parseCapabilitiesDOM (this=0x823d580, xml=@0x823d5cc, capabilitiesProperty=@0x823d5d8)
    at qgswmsprovider.cpp:828
#6  0xb46b487a in QgsWmsProvider::retrieveServerCapabilities (this=0x823d580, forceRefresh=false) at qgswmsprovider.cpp:666
#7  0xb46b573f in QgsWmsProvider::supportedLayers (this=0x823d580, layers=@0xffffffff) at qgswmsprovider.cpp:195
#8  0xb6b93517 in QgsServerSourceSelect::populateLayerList (this=0x816e028, wmsProvider=0xffffffff)
    at qgsserversourceselect.cpp:179
#9  0xb6b95588 in QgsServerSourceSelect::on_btnConnect_clicked (this=0x816e028) at qgsserversourceselect.cpp:428
#10 0xb6c14971 in QgsServerSourceSelect::qt_metacall (this=0x816e028, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfec1a5c)
    at qgsserversourceselect.moc.cpp:81
#11 0xb7e332bd in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb7e334e9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb799e5a5 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
#14 0xb7840e06 in QButtonGroup::id () from /usr/lib/libQtGui.so.4
#15 0xb7840ffd in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#16 0xb767deec in QWidget::event () from /usr/lib/libQtGui.so.4
#17 0xb7841426 in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#18 0xb78a297c in QPushButton::event () from /usr/lib/libQtGui.so.4
#19 0xb763e7c5 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#20 0xb763fa5a in QApplication::notify () from /usr/lib/libQtGui.so.4
#21 0xb7690e7d in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#22 0xb7690568 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#23 0xb76a184e in non-virtual thunk to QDesktopWidget::~QDesktopWidget() () from /usr/lib/libQtGui.so.4
#24 0xb7e2568a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#25 0xb7e2589d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#26 0xb790b0e6 in QDialog::exec () from /usr/lib/libQtGui.so.4
#27 0xb6a6c6eb in QgisApp::addWmsLayer (this=0x80df568) at qgisapp.cpp:1968
#28 0xb6c0cf41 in QgisApp::qt_metacall (this=0x80df568, _c=QMetaObject::InvokeMetaMethod, _id=83, _a=0xbfec2acc)
    at qgisapp.moc.cpp:294
#29 0xb7e332bd in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#30 0xb7e334e9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#31 0xb763a069 in QAction::triggered () from /usr/lib/libQtGui.so.4
#32 0xb763aa07 in QAction::activate () from /usr/lib/libQtGui.so.4
#33 0xb78d859a in QToolButton::nextCheckState () from /usr/lib/libQtGui.so.4
#34 0xb7840dc9 in QButtonGroup::id () from /usr/lib/libQtGui.so.4
#35 0xb7840ffd in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#36 0xb767deec in QWidget::event () from /usr/lib/libQtGui.so.4
#37 0xb7841426 in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#38 0xb78d8344 in QToolButton::event () from /usr/lib/libQtGui.so.4
#39 0xb763e7c5 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#40 0xb763fa5a in QApplication::notify () from /usr/lib/libQtGui.so.4
#41 0xb7690e7d in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#42 0xb7690568 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#43 0xb76a184e in non-virtual thunk to QDesktopWidget::~QDesktopWidget() () from /usr/lib/libQtGui.so.4
#44 0xb7e2568a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#45 0xb7e2589d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#46 0xb7e27fe7 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#47 0xb763e565 in QApplication::exec () from /usr/lib/libQtGui.so.4
#48 0x0804c729 in main (argc=1, argv=0xbfec38a4) at main.cpp:604

Change History (3)

comment:1 by g_j_m, 18 years ago

Owner: changed from morb_au to g_j_m

That's a really big capabilities document - about 2MB, and qqis is failing when trying to print it out in a bit of debugging code. If you compile with debugging turned off, the problem might go away (then again it might not :).

comment:2 by g_j_m, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in SVN r5765. Problem was with the use of the qWarning function, which only has space for a string of max length 8192 bytes. A second problem exists in Qt4.1.2 and later (will be fixed in qt4.2.0) that could of been contributing to the problem. This commit works around the Qt4.1.2 problem, and uses the QgsLogger class instead of qWarning, which doesn't have the 8192 character limitation.

comment:3 by (none), 15 years ago

Milestone: Version 0.8

Milestone Version 0.8 deleted

Note: See TracTickets for help on using tickets.