Opened 14 years ago

Closed 14 years ago

#2493 closed bug (fixed)

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

Reported by: lutra Owned by: cfarmer
Priority: critical: causes crash or data corruption Milestone: Version 1.5.0
Component: Python plugins and bindings Version: Trunk
Keywords: Cc: gislab
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

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.

Attachments (3)

evora_rios_shp.zip (76.8 KB ) - added by lutra 14 years ago.
evora_rios_singlepart_shp.zip (78.1 KB ) - added by lutra 14 years ago.
simplify_error.png (124.1 KB ) - added by lutra 14 years ago.
windows python error message

Download all attachments as: .zip

Change History (4)

by lutra, 14 years ago

Attachment: evora_rios_shp.zip added

by lutra, 14 years ago

by lutra, 14 years ago

Attachment: simplify_error.png added

windows python error message

comment:1 by cfarmer, 14 years ago

Resolution: fixed
Status: newclosed

Should be fixed in r13033. 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

Note: See TracTickets for help on using tickets.