Opened 14 years ago

Closed 14 years ago

#2375 closed bug (invalid)

If there is any feature selected, QGIS crashes on exiting.

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

Description

I've wrote a python plugin that selects some features and views them on the map.

I found that if there's a particular PostGIS layer and you select some features from a Shapefile Vector layer, exiting QGIS crashes.

To test a plugin, you can download the "Find attribute plugin 0.3" and modify it in order to view the selected features. I'll attach it anyway.

Steps to reproduce:

1) create a PostGIS layer whith the attached code; 2) open QGIS; 3) add the PostGIS layer; 4) add a line multistring shapefile vector layer (i.e. roads); 5) use the Find By Attribute 0.3 plugin and modify it in order to view selected features 6) exit QGIS by clicking on "X" of the window 7) QGIS crashes

Attachments (2)

table.sql (383 bytes ) - added by trapanator 14 years ago.
SQL code to create the table
Findbyattr.py (6.3 KB ) - added by trapanator 14 years ago.
the modified code of Find By Attribute 0.3 in order to view the selected features

Download all attachments as: .zip

Change History (9)

by trapanator, 14 years ago

Attachment: table.sql added

SQL code to create the table

by trapanator, 14 years ago

Attachment: Findbyattr.py added

the modified code of Find By Attribute 0.3 in order to view the selected features

comment:1 by lutra, 14 years ago

I'm trying to replicate the issue but I'm not understanding much.

Can you explain me what exactly to do in step 5)?

The features to be selected are in the postgis layer created with the sql you attached or in the vector you say to add in step 4) ? What has one vector to do with the other?

The findbyattr.py file you attached is to replace the original provided with the "find by attribute plugin"? If yes, should I see something different in the modified plugin? I tried and it seems the same to me.

comment:2 by trapanator, 14 years ago

Download "find by attribute 0.3" from the plugin repository; then replace the Findbyattr.py code with the attached one.

The difference is that the attached code selects the found features on the map and zooms to them.

Use the plugin to find for road name (from the vector layer).

After if you exit Qgis, it crashes.

in reply to:  2 ; comment:3 by lutra, 14 years ago

Replying to trapanator:

Download "find by attribute 0.3" from the plugin repository; then replace the Findbyattr.py code with the attached one.

The difference is that the attached code selects the found features on the map and zooms to them.

ok, I'll try it.

Use the plugin to find for road name (from the vector layer).

what vector layer? the sql statement you attached does not add any "road" vector/table.

in reply to:  3 comment:4 by trapanator, 14 years ago

Replying to lutra:

Use the plugin to find for road name (from the vector layer).

what vector layer? the sql statement you attached does not add any "road" vector/table.

see the step 3) of the description of the bug. If you want to test, download it from here:

http://webapps.comune.trento.it/base/varie.zip

crashes in Windows XP (with OSGEO4W and the official setup), but maybe it's a Operating System related bug (in Ubuntu I am not able to reproduce it...)

comment:5 by trapanator, 14 years ago

I found that de-selecting features BEFORE exit, QGIS no longer crashes. Maybe it's a memory leak bug.

comment:6 by lutra, 14 years ago

I really don't know if I'm doing it right, but I get no crashes under qgis 1.4 (osgeo4w) under xp.

Added the the "grafo" vector layer

Replaced the findbyattr.py of the "find by attribute plugin"

Tested the modified plugin (that seems to work fine) on the "grafo" vector layer both as shape and postgis

Even with features selected, closing qgis (in all possible ways) does not give a crash

comment:7 by trapanator, 14 years ago

Resolution: invalid
Status: newclosed

I made another test. It's a subdle bug, and I found that the guilty might be a corrupted ECW image.

Setting this bug CLOSED INVALID.

Note: See TracTickets for help on using tickets.