Bug report #7913

Crash on WFS auth fail

Added by Chris Berkhout over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Web Services clients/WFS
Affected QGIS version:master Regression?:No
Operating System:Mac, maybe others Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:16785

Description

QGIS version: edge (commit d68524bfd774b6b2fd91f49d914bf18e3ae7c22f). Tried this in 1.8.0 and it didn't crash.

Adding a WFS layer, where authentication is required and unsuccessful (403), an error dialog is shown with "Host requires authentication" (screenshot: https://www.evernote.com/shard/s282/sh/f9016e96-b0f3-4a91-b516-15bf64af63a5/956d1f55071e9bc48f2bbfb7e7b098fa) and after clicking "OK", QGIS crashes.

OSX crash log: https://gist.github.com/chrisberkhout/011728d91868e19e012a

Priority=Blocker since it's "a regression from a previous QGIS version".

0001-Fix-crash-when-authentication-fails.-Fix-7913.patch Magnifier (2.84 KB) Laurent Defert, 2013-05-29 08:45 AM

Associated revisions

Revision c1797fc7
Added by Laurent Defert over 6 years ago

Fix crash when authentication fails. Fix #7913

- Fix pointer dereferencing
- Remove call to uninitialized button
As stated by Valgrind:

13851 Use of uninitialised value of size 8
13851 at 0x9961780: QWidget::setEnabled(bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.2)
13851 by 0x27600FB1: QgsWFSSourceSelect::capabilitiesReplyFinished() (qgswfssourceselect.cpp:211)
13851 by 0x2760B78F: QgsWFSSourceSelect::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qgswfssourceselect.cxx:156)
13851 by 0x93F554E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.2)
13851 by 0x2760A458: QgsWFSCapabilities::gotCapabilities() (moc_qgswfscapabilities.cxx:103)
13851 by 0x275F88CD: QgsWFSCapabilities::capabilitiesReplyFinished() (qgswfscapabilities.cpp:156)
13851 by 0x2760A331: QgsWFSCapabilities::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qgswfscapabilities.cxx:54)
13851 by 0x93F554E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.2)
13851 by 0xA46E824: ? (in /usr/lib/x86_64-linux-gnu/libQtNetwork.so.4.8.2)
13851 by 0xA4DC904: ?
(in /usr/lib/x86_64-linux-gnu/libQtNetwork.so.4.8.2)
13851 by 0x93F4A2D: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.2)
13851 by 0x991470B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.2)
13851

Revision ce925496
Added by Marco Hugentobler over 6 years ago

Merge pull request #623 from biolds/master

Fix crash when authentication fails. Fix #7913

History

#1 Updated by Laurent Defert over 6 years ago

The patch in attachement fixes this issue for me.

#2 Updated by Giovanni Manghi over 6 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Status changed from Open to Feedback

Laurent Defert wrote:

The patch in attachement fixes this issue for me.

Hi! thanks for the patch! Would you be available to make a GitHub pull request? Otherwise patches here on the track can be "lost" for a while. On Github the pull request will be received by all core developers that then can review it and commit it.
Cheer!

#3 Updated by Laurent Defert over 6 years ago

Done. Thanks.

#4 Updated by Marco Hugentobler over 6 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF