Recent

Author Topic: sqlite unexpected access violations  (Read 4357 times)

Чебурашка

  • Hero Member
  • *****
  • Posts: 586
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: sqlite unexpected access violations
« Reply #30 on: February 29, 2024, 07:43:24 pm »
For the whom this matters:

The answer to the issue opened in gitlab is "not a bug". It is normal that db components are not thread safe and the previously mentioned workaround (initialize/finalize-sqlite) is the solution to be used.

Thank you all for the support and the fpc levels for the answer.

I still don't understand why sqlite3dyn uses interlockedincrement to manipulate the refcount value, if the db components are not supposed to be thread-safe but it is not a problem, I am fine with the indication of using initialize/finalize.
« Last Edit: February 29, 2024, 07:45:02 pm by Чебурашка »
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: sqlite unexpected access violations
« Reply #31 on: February 29, 2024, 10:50:25 pm »
Thank you for the updates Чебурашка
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Чебурашка

  • Hero Member
  • *****
  • Posts: 586
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: sqlite unexpected access violations
« Reply #32 on: March 06, 2024, 03:33:47 pm »
Why the initialization process of the postgresql wrapper is made using critical sections, while the one of sqlite not?
At the end when are talking in both cases of loading a dll, connecting the exported methods, using a kind of refcount.

The two processes that have (basically) the same goal and the same way to achieve it, but they are made differently.

Is there a reason that I don't get? Thanks for any explanation.
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

 

TinyPortal © 2005-2018