Bug report #21028

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

Added by Janneke van Dijk almost 6 years ago. Updated over 5 years 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 over 5 years 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 over 5 years 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 over 5 years 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 over 5 years 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 almost 6 years 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 over 5 years ago

  • Assignee set to Alessandro Pasotti

#3 Updated by Giovanni Manghi over 5 years 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 over 5 years ago

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

#5 Updated by Giovanni Manghi over 5 years ago

#6 Updated by Alessandro Pasotti over 5 years 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 over 5 years ago

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

#8 Updated by Alessandro Pasotti over 5 years ago

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

#9 Updated by Alessandro Pasotti over 5 years ago

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

Also available in: Atom PDF