View Single Post
Old 09-04-2020, 01:34 PM   #329
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,385
Karma: 5007213
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
FYI, I think that my DB update issue may well have been caused by my threading issue.

When I saw the threading issue occur the second time, I didn't stop and restart Calibre. Changes made to the library after that don't appear to have been saved.

That suggests to me that Calibre didn't keep the DB connection? Will the change in 13259a4 help with that?

More strangely, I started digging to the code to see what was going on and noticed this from my error log--note the line numbers:
Code:
...
Traceback (most recent call last):
  File "site-packages\calibre\db\backend.py", line 132, in __setitem__
...
Traceback (most recent call last):
...
  File "site-packages\calibre\db\backend.py", line 133, in __setitem__
apsw.ThreadingViolationError: You are trying to use the same object concurrently in two threads or re-entrantly within the same thread which is not allowed.
Were there somehow two different threads(or processes) running different versions of backend.py??

I had Calibre 4.22(32bit) and 4.99.12(64bit) installed and was running from CLI `calibre-debug -g`.

That call was on line 133 in 4.99.12 and line 132 a few versions earlier. Although according to the tag, it was line 131 in v4.22...

Kovid, if you still think that this all boils down to me doing something illegally re-entrant in plugin, can you give me an example of how I could do that? Because I don't know how it could even happen.

Thanks.
JimmXinu is offline