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

File Handle to SQLITE Database not closed #5

Closed
ionescu007 opened this issue Apr 8, 2015 · 6 comments
Closed

File Handle to SQLITE Database not closed #5

ionescu007 opened this issue Apr 8, 2015 · 6 comments
Labels

Comments

@ionescu007
Copy link

Hi,

Even after closing the database (IDB), the IDA process still has the handle open to Diaphora's .sqlite database. Even when switching databases, any old exported database remains open. This is probably a missing close() call somewhere in the Python script.

This means, for example, that you cannot re-diff to the same .sqlite file (even after Diaphora asks "do you want to overwrite"?) because Diaphora will already have it open. You need to fully exit IDA and re-open it.

@joxeankoret joxeankoret added the bug label Apr 8, 2015
@joxeankoret
Copy link
Owner

Should be fixed with commit 7a9a6aa

@joxeankoret
Copy link
Owner

I'm able to reproduce it and the fix doesn't work :/ I will need some time to understand it...

joxeankoret pushed a commit that referenced this issue Apr 8, 2015
BUG: In Windows, for some reason, the SQLite database cannot be removed even when I'm sure that no cursor is leaked, all the databases are detached, the database object closed, etc... With this 'fix', I just drop the tables and continue normally instead of removing the database file.
BUG: A cursor was being leaked after diffing databases (but after fixing that the database cannot be removed anyway).
Also, be sure to always detach the database, close all the cursors and close the database. Kind of a paranoid code.
@joxeankoret
Copy link
Owner

Bug fixed with e6f4321

@joxeankoret
Copy link
Owner

This issue seems to be the real culprit of this other bug that is turning me crazy: #150

@joxeankoret
Copy link
Owner

So, is not the real culprit, but both bugs are related. Summary: Attached databases aren't properly detached.

@joxeankoret
Copy link
Owner

Should be fixed with a4472f9

joxeankoret added a commit that referenced this issue Jun 21, 2023
BUG: Hopefully final fix for issue #5.
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