Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Program freezes when I insert and then update the LiteDB in version 5.0.18 and 5.0.19 #2464

Closed
KC7465128305 opened this issue Apr 2, 2024 · 2 comments
Labels

Comments

@KC7465128305
Copy link

Version
LiteDB 5.0.19/Windows 11/.NET 8.0

Describe the bug
Everything is fine when I used LiteDB 5.0.17. When I upgraded to 5.0.18 or 5.0.19 is when the bug occurred

Code to Reproduce
I have created and attached a small program to reproduce the issue. The program reads a Northwind SQLite database and created and write the database tables and columns into a LiteDB database called FileOne.db on the desktop. The bug occurred when an insert followed by an update to the LiteDB database.
I have also included a video showing everything is fine with LiteDB 5.0.17 but when I upgraded it to 5.0.19, the program freezes.

Expected behavior
A file called FileOne.db is created at the desktop and the program does not freeze.

Screenshots/Stacktrace
An example program and a video are attached.

Additional context
Add any other context about the problem here.
ImportDBUsingLiteDB.zip

Crash.when.change.from.5_0_17.to.5_0_19.mp4
@ltetak
Copy link
Contributor

ltetak commented Apr 9, 2024

@KC7465128305 #2447 this should fix your problem. You can workaround it by changing your code as well but it should not be required.

@KC7465128305
Copy link
Author

@KC7465128305 #2447 this should fix your problem. You can workaround it by changing your code as well but it should not be required.

After I switch from TaskScheduler.FromCurrentSynchronizationContext() to TaskScheduler.Default I can upgrade to version 5.0.19. Thanks for the pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants