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

No indexing happens, getting "Error: out of memory" #49

Closed
karlicoss opened this issue Dec 17, 2023 · 11 comments
Closed

No indexing happens, getting "Error: out of memory" #49

karlicoss opened this issue Dec 17, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@karlicoss
Copy link

Hi! I tried the plugin in my vault with a bunch of png files -- it didn't show that any indexing was going on.
I tried opening developer console and turning the plugin off/on -- can see this error in the console.

Uncaught (in promise) Error: out of memory
    at f.handleError (plugin:obsidian-ocr:17490:19)
    at new f (plugin:obsidian-ocr:17192:18)
    at DBManager.eval (plugin:obsidian-ocr:33791:24)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-ocr:51:24)

I put the breakpoing, and the database path is /path/to/valut/.obsidian-ocr.sqlite -- nothing suspicious. The partition has gigabytes of free space, so I don't see why it would be out of memory.

This happens around these lines

        ObsidianOCRPlugin.logger.info(`Creating new database ${this.DB_PATH}`);
        DBManager.DB = new DBManager.SQL.Database();

I tried creating an empty database in terminal, and then reloading the plugin again -- it detect that the db already exists but the same thing happens here

        ObsidianOCRPlugin.logger.info(`Opening already existent database ${this.DB_PATH}`);
        DBManager.DB = new DBManager.SQL.Database(yield (0, import_promises3.readFile)(DBManager.DB_PATH));

Any ideas what could be going on?

I'm using Obsidian 1.4.16 installed from a debian package (so no Flatpak etc), Ubuntu 22.04.
Thanks!

@yarub123
Copy link

I'm getting the exact same error. I wonder if it's possibly the new update... Or it could be that the files it has to index are large files (I'm assuming pdf) 🤷

@MohrJonas
Copy link
Owner

Thank you for your issue.
This is the first time I've heard of this issue, so I'm not certain what's going on here.
Just thinking about it, I suspect it could either be the database or the conversion process from a PDF to an image. Do you have a lot of PDFs in your vault? Have you tried creating a new vault and trying the extension there?
Best regards and Merry Christmas.

@MohrJonas MohrJonas added the bug Something isn't working label Dec 26, 2023
@karlicoss
Copy link
Author

Happy Christmas to you as well @MohrJonas !

My bug report was on a completely new vault with just a few png files, so no pdfs there.

@MohrJonas
Copy link
Owner

Hmm interesting. Then no conversation of files should take place, so I assume it might be the database. Have you tried changing the log level in the settings to the finest and seeing if anything useful appears in the console?

@OldhamMade
Copy link

Hey, new user here, just wanted to say thanks for the work on this project!

FYI, I'm getting the same error:

Uncaught (in promise) Error: out of memory
    at f.handleError (plugin:obsidian-ocr:17490:19)
    at new f (plugin:obsidian-ocr:17192:18)
    at DBManager.eval (plugin:obsidian-ocr:33791:24)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-ocr:51:24)

This is on a completely new install of Obsidian. These are the versions I'm working with:

  • MacOS 13.5.1
  • Obsidian 1.5.3
  • tesseract 5.3.3
  • tesseract-lang 4.1.0
  • imagemagick 7.1.1

Everything is installed via homebrew. Paths added to /private/etc/paths as directed.

I'd love to get this working; this is the final feature I need to be able to migrate completely from Evernote.

@OldhamMade
Copy link

Also, something else to mention, I'm not seeing any settings pane for this plugin. I'm assuming this is because the EoM error happens early enough to block that.

@MohrJonas
Copy link
Owner

Hi @OldhamMade thank you for your feedback. You not even seeing the settings panel in an invaluable piece or information.
I will try to reproduce the error later today, but it might potentially be related to:
sql-js/sql.js#561

@MohrJonas
Copy link
Owner

MohrJonas commented Dec 30, 2023

Just quickly looking at the code, database initialization does indeed happen before registering the settings panel, so that might be our culprit

@yarub123
Copy link

yarub123 commented Jan 8, 2024

@

Also, something else to mention, I'm not seeing any settings pane for this plugin. I'm assuming this is because the EoM error happens early enough to block that.

Same here, Idk why I forgot to mention that.

@MohrJonas
Copy link
Owner

Should be fixed in a737ff8

@MohrJonas
Copy link
Owner

As well as release 2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants