qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.68k stars 3.02k forks source link

QGIS crashing when displaying postgresql metadata when hovering on table #41158

Open reinieroost opened 3 years ago

reinieroost commented 3 years ago

After switching from a Macbook to windows I noticed QGIS3 (version 3.16.1-Hannover) started crashing a lot. I discovered this had to do with the label that is displayed when hovering on a postgresql-table in the browser. When a table contains a lot of metadata - which it often does for me - and it tries to show this metadata as a label it causes QGIS to crash. I assume this a bug?

For the meantime, how can I avoid labels when hovering in the browser?

gioman commented 3 years ago

@reinieroost is this a question or a bug report? If is the latter please add the requested infos, as requested in the report an issue template. Please also try with a new QGIS profile, if the problem persist attach a sample project+data.

Describe the bug

How to Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error -->

QGIS and OS versions

Additional context

reinieroost commented 3 years ago

Thanks for your quick reply. It is a bug report, but also a question to see if there is a workaround. Hereby more information:

Describe the bug: QGIS crashes when hovering with your mouse on a PostGIS-table in the browser. It freezes and after 2 seconds it crashes.

How to Reproduce

  1. Create a connection with a Postgres database (PSQL-version 11, PostGIS version 2.4) and prepare a postgres-table with a lot of metadata following this procedure (https://www.postgresql.org/docs/9.1/sql-comment.html).
  2. Go to the database, schema and hover on the table with metadata
  3. Tables with few metadata will show information about the geometry name, srid en type, and the metadata involved.
  4. Tables with a lot of metadata will result in a 2 second freeze and crash

QGIS and OS Versions QGIS version: version 3.16.1-Hannover Windows version: Microsoft Windows 10 Pro 10.0.19042 Build 19042

Additional context

Event viewer info: Faulting application name: qgis-bin-g7.exe, version: 0.0.0.0, time stamp: 0x5fb87b9e Faulting module name: ucrtbase.dll, version: 10.0.19041.546, time stamp: 0x43cbc11d Exception code: 0xc0000409 Fault offset: 0x000000000007287e Faulting process id: 0x1d80 Faulting application start time: 0x01d6f3047aba06ee Faulting application path: C:\Program Files\QGIS 3.16\bin\qgis-bin-g7.exe Faulting module path: C:\Windows\System32\ucrtbase.dll Report Id: cf3f8731-d332-41eb-b017-83a15bfecd8a Faulting package full name: Faulting package-relative application ID:

gioman commented 3 years ago
1. Create a connection with a Postgres database (PSQL-version 11, PostGIS version 2.4) and prepare a postgres-table with a lot of metadata following this procedure (https://www.postgresql.org/docs/9.1/sql-comment.html)

@reinieroost it would be simpler if you could attach a dump of an example table

gioman commented 3 years ago

but also a question to see if there is a workaround.

@reinieroost questions are better asked on the users/developers mailing lists or here https://github.com/qgis/QGIS/discussions

reinieroost commented 3 years ago

@gioman hereby a dump (see attachment).

sample_data.zip

roya0045 commented 3 years ago

3.16.1 is known to be instable, just update to a recent version and see if this is still valid.

reinieroost commented 3 years ago

@roya0045 Thanks for the suggestion. I've installed the latest version (3.16.3) and retried with a fresh profile. Unfortunately, the same problem occurred.

jgrocha commented 3 years ago

Unable to reproduce the error on Ubuntu, QGIS compiled from master. I used the sample data.

huge comment

roya0045 commented 3 years ago

@jgrocha windows specific maybe?

gioman commented 3 years ago

@jgrocha windows specific maybe?

@roya0045 confirmed on Windows, works on ok Ubuntu 20.04.

roya0045 commented 3 years ago

@gioman got any stacktrace?

gioman commented 3 years ago

@gioman got any stacktrace?

zero, it just disappear.

jonnyforestGIS commented 3 years ago

Confirmed on master (3.17) hover and immediately crash. Using the Debugiew Windows application, after I hover the mouse in the connection the debugview show this: "[2886628] Fatal: createDIB: CreateDIBSection failed (-7821x160, format: 6)".

Here the log of debugView in the attach debug_view.log

I don't know if this is related but in a quick search I found this topic: https://bugreports.qt.io/browse/QTBUG-54248

roya0045 commented 3 years ago

@jonnyforestGIS Nice job debugging this.