-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
memory leaks of mftraining, cntraining #516
Comments
On commit 8af3629, it seems most of these memory leaks are corrected. Thanks! ---------- Block 66889 at 0x02839ED0: 24 bytes ---------- ---------- Block 66890 at 0x02839F28: 8 bytes ---------- ---------- Block 66839 at 0x0283A3C8: 1 bytes ---------- |
Please tag as 3.05. |
It seems like non-contributors cannot tag labels or milestones. |
@stweil You have fixed many memory leaks. Does it cover these? |
@junmocklee, do you still see any memory leaks? |
@stweil On commit 0a93ad2, the bug mentioned above seems to have been fixed, but new memory leak is reported. ---------- Block 1 at 0x0000000000308480: 128 bytes ---------- This memory leak is reported by mftraining, but unicharset_extractor and cntraining also report memory leaks in the same function. My environment changed. |
@stweil, was the latest issue reported here solved? |
I don't know. @junmocklee, could you please post the command line used for one of the commands which show the memory leak, so I can reproduce it here? Or is it already fixed. |
valgring on linux shows for cntraining and mftraining:
|
That Valgrind output looks good. |
So can we close the issue? |
Yes. I'll close it now. |
Hello,
I guess there are some memory leaks in training tools.
I only added "#include <vld.h>" and started debugging with command arguments on VS2013.
Here is my tif/box file pair.
https://drive.google.com/file/d/0B2tu51tmJ0FvaFNnWDFNLS1lUUU/view?usp=sharing
https://drive.google.com/file/d/0B2tu51tmJ0FvdkZaWWRQVDNuMkE/view?usp=sharing
No memory leak is reported in tesseract.exe and unicharset_extractor.exe
Memory leaks are reported at
mftraining
classify\cluster.cpp (2493): mftraining.exe!MultipleCharSamples()
training\commontraining.cpp (770): mftraining.exe!SetUpForFloat2Int()
cutil\bitvec.cpp (92): mftraining.exe!NewBitVector()
classify\cluster.cpp (1898): mftraining.exe!ComputeChiSquared()
training\mftraining.cpp (157): mftraining.exe!ClusterOneConfig()
cntraining
training\commontraining.cpp (421): cntraining.exe!ReadTrainingSamples()
classify\cluster.cpp (949): cntraining.exe!ComputePrototypes()
classify\cluster.cpp (2493): cntraining.exe!MultipleCharSamples()
training\commontraining.cpp (852): cntraining.exe!AddToNormProtosList()
classify\cluster.cpp (2335): cntraining.exe!NewChiStruct()
classify\cluster.cpp (1903): cntraining.exe!ComputeChiSquared()
classify\cluster.cpp (1610): cntraining.exe!NewSimpleProto()
classify\cluster.cpp (1546): cntraining.exe!NewEllipticalProto()
...and others. (same functions at different lines)
In my case, 15 memory leaks in mftraining and 21 memory leaks in cntraining are detected.
My environment
OS: Windows 7
IDE: Visual Studio 2013
tesseract sources: 3.05 branch commit 5750e72
Could anyone correct that?
The text was updated successfully, but these errors were encountered: