Any ETA on a memory leak fix?

618 views
Skip to first unread message

PeterF

unread,
Mar 4, 2009, 4:46:54 AM3/4/09
to tesseract-ocr
Hello everybody,

tesseract (and tessnet2) is exactly the thing I have been looking.
After some training, it does a great job on recognizing text. Very
good!

But now I have noticed the memory leaks after each call of
tessnet2.DoOCR()
In another post Ray said he would incorporate 3.0 fixes into the 2.0
version, but the last update on SVN was on 30 Dec. and the memory leak
still exists. The memory leak is actually a huge show stopper for me.


I'd like to know if there is any ETA on a fix for the memory leak
problem? Or even better, any ETA for the 3.0 version of tesseract?

This is really bugging me, and I would hate to start looking for
another OCR library (commercial OCR libraries gave me much much worse
results than tesseract!)

PeterF

unread,
Mar 6, 2009, 11:08:12 AM3/6/09
to tesseract-ocr
I had the great idea to run tessnet2 in a seperate AppDomain and then
unload and reload tessnet2 after each xxx DoOCR() calls. But the
problem is, as soon as I invoke tessnet2.Init(), the tessnet2.dll and
msvcm80.dll get loaded into the main AppDomain!

I have written a topic about it on the msdn forums, with a sample
application to demonstrate the problem:
http://social.msdn.microsoft.com/Forums/en-US/clr/thread/e32b6f45-5808-448d-bc14-dbd974662bd1

I really hope there is a solution to this problem.

Remi Thomas

unread,
Mar 7, 2009, 1:54:36 AM3/7/09
to tesseract-ocr
Hi,

The only solution is to start a new process. I use it like this and it
works great, Windows do all the cleanup.

Remi

On Mar 6, 5:08 pm, PeterF <petrf...@googlemail.com> wrote:
> I had the great idea to run tessnet2 in a seperate AppDomain and then
> unload and reload tessnet2 after each xxx DoOCR() calls. But the
> problem is, as soon as I invoke tessnet2.Init(), the tessnet2.dll and
> msvcm80.dll get loaded into the main AppDomain!
>
> I have written a topic about it on the msdn forums, with a sample
> application to demonstrate the problem:http://social.msdn.microsoft.com/Forums/en-US/clr/thread/e32b6f45-580...

PeterF

unread,
Mar 7, 2009, 7:28:32 AM3/7/09
to tesseract-ocr
HI Thomas,

thanks for your reply. I'm still fairly new to C#, or programming in
general. Could you ellaborate a bit more on how you do this? If my
main application starts a new process for tessnet2, how does my
application communicate with that process? I guess this involves
remoting or IPC? Is that correct?


Thank you.

Remi Thomas

unread,
Mar 7, 2009, 11:59:14 AM3/7/09
to tesseract-ocr
.NET offer serilization tools
http://www.codeproject.com/KB/cs/NetSerialization.aspx

You serialize the settings, lanch the ocr process that open the
settings and save the results.
Serialization is not as fast as IPC, but OCR is a so huge process you
can use this because it's very simple to use.

Remi

PeterF

unread,
Mar 8, 2009, 9:00:39 AM3/8/09
to tesseract-ocr
Thanks alot for the hint! In the meantime, I implemented an IPC
interface. Works great.

On Mar 7, 5:59 pm, Remi Thomas <remi.tho...@gmail.com> wrote:
> .NET offer serilization toolshttp://www.codeproject.com/KB/cs/NetSerialization.aspx
Reply all
Reply to author
Forward
0 new messages