Bug report #2375

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

Added by luca76 - over 14 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Jürgen Fischer
Category:Python plugins
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:invalid
Crashes QGIS or corrupts data: Copied to github as #:12435

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

table.sql - SQL code to create the table (383 Bytes) luca76 -, 2010-01-18 07:07 AM

Findbyattr.py Magnifier - the modified code of Find By Attribute 0.3 in order to view the selected features (6.27 KB) luca76 -, 2010-01-18 07:08 AM

History

#1 Updated by Giovanni Manghi over 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.

#2 Updated by luca76 - over 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.

#3 Updated by Giovanni Manghi over 14 years ago

Replying to [comment:2 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.

#4 Updated by luca76 - over 14 years ago

Replying to [comment:3 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...)

#5 Updated by luca76 - over 14 years ago

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

#6 Updated by Giovanni Manghi over 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

#7 Updated by luca76 - over 14 years ago

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

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.

Also available in: Atom PDF