Bug report #14404

Preview table crashes DB-Manager when using virtual layers

Added by Jérôme Guélat about 4 years ago. Updated about 4 years ago.

Status:Closed
Priority:High
Assignee:Hugo Mercier
Category:DB Manager
Affected QGIS version:2.14.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22385

Description

To reproduce the bug:

1. Open DB-Manager and select one layer in the "Virtual Layers" section
2. Click on the "Table" panel
3. DB-Manager will freeze

You can see there's some Python error if you manage to close DB-Manager window

Associated revisions

Revision 7dbc0bf8
Added by Hugo Mercier about 4 years ago

[db manager] Fix virtual layers plugin (fixes #14404)

Revision 363050db
Added by Hugo Mercier about 4 years ago

[db manager] Fix virtual layers plugin (fixes #14404)

(cherry-picked from commit 7dbc0bf81992cd58a6e4d0b081941f3c20f168ca)

History

#1 Updated by Hugo Mercier about 4 years ago

Hi,

I cannot reproduce. What is the exact error message ?

#2 Updated by Jérôme Guélat about 4 years ago

Hi!

Thanks for looking at it... After more testing (using Windows and Mac OS X), I noticed this doesn't happen with layers containing points. But there is definitely a problem with polygons (I didn't test with lines).

The Python error is "list index out of range". The offending code seems to be in the file data_model.py (lines 62, 124)

#3 Updated by Jérôme Guélat about 4 years ago

Well, it also happens with points... Just had a problem when I was browsing the table (same error).

I have the impression the problem appears because of the geometry column... For example my point layer has many fields and DB Manager can show all of them except the geometry. It crashes after trying to show the last column (which is the geometry).

#4 Updated by Hugo Mercier about 4 years ago

  • Assignee set to Hugo Mercier

Thanks. Indeed I observe this error with certain types of layers. But I don't understand when exactly this error occurs, tracing db manager code is not easy

#5 Updated by Hugo Mercier about 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF