Bug report #2493

ftools: simplify geometries tool crashes/freezes qgis (or throws a pyhton error)

Added by Giovanni Manghi over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:Low
Assignee:cfarmer -
Category:Python plugins
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 #:12553

Description

The tool seems to not like/not work with multipart geometries, so a control should be added. A singlepart version of the problematic vector (attached) stills crashes qgis when using the tool.

Maybe it is a problem with the geometry of the vector I tested, nevertheless crash should be avoided.

With the attached vector "evora_rios" with qgis trunk under Ubuntu 9.10, qgis crashes with the following terminal message.

Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
<unknown>: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

I tried also to obtain a singlepart version ("evora_rios_singlepart", also attached here) of the same vector (using the multipart to singleparts tool in ftools) and the results are no better as qgis freezes or crashes (same message as above)***.

Under windows xp (qgis trunk/osgeo4w) I get (with the same vectors) python errors instead of crashes and freezes. I attach the error message (is the same for the multipart and singlepart version of the vector) as image as is possible to ctrç-c the error message but then ctrl-v does not work.

Under Ubuntu 9.04 (and qgis 1.4 from the ubuntugis repository) the crash message is slightly different from the one thrown under 9.10

Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: QPixmap: It is not safe to use pixmaps outside the GUI thread
Warning: X Error: [[BadImplementation]] (server does not implement operation) 17
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x21
qgis.bin: ../../src/xcb_io.c:242: process_responses: Assertion @(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed.
Aborted

***
To notice that also the new plugin "dpsimplify" crashes with the multipart version of the attached vector, but with the singlepart version it works ok.

evora_rios_shp.zip (76.8 KB) Giovanni Manghi, 2010-03-06 11:49 AM

evora_rios_singlepart_shp.zip (78.1 KB) Giovanni Manghi, 2010-03-06 11:49 AM

simplify_error.png - windows python error message (124 KB) Giovanni Manghi, 2010-03-06 11:50 AM

Associated revisions

Revision bdca8289
Added by cfarmer - over 10 years ago

Simplify geometry tool now works properly for multipart features. Note: tool now uses builtin simplify function from QgsGeometry (i.e. should be noticeably faster). Fixes #2493 and #2499.

git-svn-id: http://svn.osgeo.org/qgis/trunk/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 1f0d1afa
Added by cfarmer - over 10 years ago

Simplify geometry tool now works properly for multipart features. Note: tool now uses builtin simplify function from QgsGeometry (i.e. should be noticeably faster). Fixes #2493 and #2499.

git-svn-id: http://svn.osgeo.org/qgis/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by cfarmer - over 10 years ago

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

Should be fixed in 1f0d1afa (SVN r13034). Now using built-in simplify function from QgsGeometry? (added at the last hackfest). Tested on sample shapefile attached to this ticket, works nicely on both multipart and singlepart versions. Note, this bug is likely a duplicate of #2499 (or vice versa :-))

-Carson

Also available in: Atom PDF