Bug report #21028

DB manager: SQLite objects created in a thread can only be used in that same thread

Added by Janneke van Dijk about 1 year ago. Updated about 1 year ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:DB Manager
Affected QGIS version:3.4.3 Regression?:No
Operating System:Any Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:28847

Description

On a geopackage, when running a SQL query, the first query will run fine, but quite soon I will get the error message "SQLite objects created in a thread can only be used in that same thread". It seems a normal select query can be run repetitively, but for example a query creating a trigger, or using transform cannot be run twice in a row. The only way to continue with the SQL query is to close the DB manager and start it again. Let me know if I need to do more tests. I have attached a geo package which shows the problem, but have tried with several others with the same issue.

test_1point.gpkg (96 KB) Janneke van Dijk, 2019-01-18 10:51 AM


Related issues

Related to QGIS Application - Bug report #18974: No geometry operation on geopackages layers Open 2018-05-17
Duplicates QGIS Application - Bug report #20331: DB Manager - error editing an SQLite query - single threads Open 2018-11-02

Associated revisions

Revision 8fb112d2
Added by Alessandro Pasotti about 1 year ago

[db-manager] Invalidate sqlite connection if it was created in another thread

Fixes #21028 - DB manager: SQLite objects created in a thread can only be used in that same thread

Revision b0b068d4
Added by Alessandro Pasotti about 1 year ago

[db-manager] Invalidate sqlite connection if it was created in another thread

Fixes #21028 - DB manager: SQLite objects created in a thread can only be used in that same thread

Revision 4ce65d27
Added by Alessandro Pasotti about 1 year ago

[db-manager] Invalidate sqlite connection if it was created in another thread

Fixes #21028 - DB manager: SQLite objects created in a thread can only be used in that same thread

Revision bd54f9a2
Added by Alessandro Pasotti about 1 year ago

[db-manager] Invalidate sqlite connection if it was created in another thread

Fixes #21028 - DB manager: SQLite objects created in a thread can only be used in that same thread

History

#1 Updated by Janneke van Dijk about 1 year ago

This might be the same as #20331 - though I can run consecutive 'plain' select statements without the message popping up

#2 Updated by Alessandro Pasotti about 1 year ago

  • Assignee set to Alessandro Pasotti

#3 Updated by Giovanni Manghi about 1 year ago

This seems also the same issue... actually at the moment no query (even the first one) works on GPKGs in DB Manager #18974-6

#4 Updated by Giovanni Manghi about 1 year ago

  • Related to Bug report #20331: DB Manager - error editing an SQLite query - single threads added

#5 Updated by Giovanni Manghi about 1 year ago

#6 Updated by Alessandro Pasotti about 1 year ago

  • Operating System changed from Windows 10 - 64 to Any
  • Status changed from Open to In Progress
  • Pull Request or Patch supplied changed from No to Yes
  • Resolution set to fixed/implemented

#7 Updated by Alessandro Pasotti about 1 year ago

  • Related to deleted (Bug report #20331: DB Manager - error editing an SQLite query - single threads)

#8 Updated by Alessandro Pasotti about 1 year ago

  • Duplicates Bug report #20331: DB Manager - error editing an SQLite query - single threads added

#9 Updated by Alessandro Pasotti about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF