Ticket #2375 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

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:
Platform Version: Platform: Windows
Must Fix for Release: Yes 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

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

Change History

Changed 3 years ago by trapanator

SQL code to create the table

Changed 3 years ago by trapanator

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

  Changed 3 years ago by lutra

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.

follow-up: ↓ 3   Changed 3 years ago by 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.

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

After if you exit Qgis, it crashes.

in reply to: ↑ 2 ; follow-up: ↓ 4   Changed 3 years ago by lutra

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   Changed 3 years ago by trapanator

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...)

  Changed 3 years ago by trapanator

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

  Changed 3 years ago by lutra

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

  Changed 3 years ago by trapanator

  • status changed from new to closed
  • resolution set to invalid

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.