Skip to main content

Timeline for TextRecognize has a memory leak?

Current License: CC BY-SA 4.0

21 events
when toggle format what by license comment
Aug 29, 2022 at 4:07 history edited John CC BY-SA 4.0
In case anyone cares, I have a good workaround for me.
Aug 29, 2022 at 4:05 vote accept John
Aug 28, 2022 at 6:04 comment added Валерий Заподовников Wolfram still has no ability to hijack (or dll inject) into NT kernel of windows. I did experience blue screens, but that is not usually caused by lack of memory, since kernel can just kill some more modern apps and older apps close / free() automatically due to no memory. The usual problem for blue screens for me is nvidia driver. :)
Aug 27, 2022 at 21:14 comment added John @ВалерийЗаподовников, Mathematica has crashed my OS numerous times with this memory leak. I recommend Googling blue screen of death. Consider yourself fortunate if you have never experienced it! Happens more often than it "should."
Aug 26, 2022 at 22:39 comment added Валерий Заподовников "It does this by overwriting OS memory (windows start going black, graphics drivers start crashing etc.)" That is impossible, kernel will just stop any application trying to do so, what is called segfault. No, what happens is that malloc will fail and then return NULL, which would mean no memory and in some cases will cause the Nvidia driver to crash, but not the Kernel, since Kernel has all kind of hacks to not stop working. Chrome just crashes one tab, not all browser.
Aug 26, 2022 at 19:00 history edited John CC BY-SA 4.0
Added upate 2.
Aug 25, 2022 at 15:37 comment added Alexey Popkov Related: "How to TextRecognize a screenshot of code?"
Aug 25, 2022 at 15:23 answer added Alexey Popkov timeline score: 3
Aug 25, 2022 at 14:47 comment added John @AlexeyPopkov, those are both answers to an implied question. "Is there a way to work around this problem?" I've updated my question. Care to write those out as an answer?
Aug 25, 2022 at 14:45 history edited John CC BY-SA 4.0
Alex's comments pointed out that I'm willing to accept a pretty broad range of answers here.
Aug 25, 2022 at 14:33 history edited Alexey Popkov
edited tags
Aug 25, 2022 at 14:28 comment added Alexey Popkov But if for some reason you are forced to use TextRecognize, as a workaround you could call it in a slave kernel and control the memory usage via MemoryAvailable[], killing the slave kernel when it clearly took up too much memory.
Aug 25, 2022 at 14:21 comment added Alexey Popkov AFAIK TextRecognize uses a rather outdated version of Tesseract under the hood. It is not suitable for serious applications. I would recommend using a more up-to-date version, perhaps a Python implementation via ExternalFunction. Quick search gives this: pypi.org/project/pytesseract.
Aug 25, 2022 at 14:01 comment added John @JasonB. I have already done that, and as of now, I've not been able to get them to admit this is a problem. I was hoping maybe there were some workarounds available.
Aug 25, 2022 at 13:59 comment added Jason B. @John - you should report this to Wolfram Research, in the end they are the ones who can fix this.
Aug 25, 2022 at 12:29 history edited John CC BY-SA 4.0
added 206 characters in body
Aug 25, 2022 at 12:24 comment added John @DavidG.Stork you misunderstand the problem. The issue is not time to execute the command. The issue is that the command consumes unlimited memory, when it's pretty clear that similar commands do not. There's a clear memory leak in TextRecognize. That's the issue.
Aug 25, 2022 at 12:20 history edited John CC BY-SA 4.0
It's not that tetxrecognize is slow, it's that it consumes memory endlessly.
Aug 25, 2022 at 2:31 comment added David G. Stork You're trying to recognize text in a random image???? No wonder this impossible task is taking forever!
Aug 25, 2022 at 2:24 history edited David G. Stork CC BY-SA 4.0
edited title
Aug 25, 2022 at 2:12 history asked John CC BY-SA 4.0