You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using tesseract as a dll. When reading in a traineddata file that has options at the start we found that tesseract crashes.
Doing some investigation we found that the issue occurs in Params.cpp->ReadParamsFromFp. If the option is not found then the code calls exit(1).
This might be fine when running tesseract as a standalone but when using it as a dll this causes an unpreventable crash.
Expected Behavior:
I would expect that unrecognised options should be ignored (outputting a message if appropriate) and tesseract continues on regardless. At the worst, an exception thrown that can be caught so that the main app can deal with the problem gracefully
Suggested Fix:
Ignore the option and continue
The text was updated successfully, but these errors were encountered:
Wrong or old parameters in traineddata files should not terminate
the program, so make that a warning instead of a fatal error.
This fixes issue tesseract-ocr#1520.
Signed-off-by: Stefan Weil <[email protected]>
Environment
Current Behavior:
We are using tesseract as a dll. When reading in a traineddata file that has options at the start we found that tesseract crashes.
Doing some investigation we found that the issue occurs in Params.cpp->ReadParamsFromFp. If the option is not found then the code calls exit(1).
This might be fine when running tesseract as a standalone but when using it as a dll this causes an unpreventable crash.
Expected Behavior:
I would expect that unrecognised options should be ignored (outputting a message if appropriate) and tesseract continues on regardless. At the worst, an exception thrown that can be caught so that the main app can deal with the problem gracefully
Suggested Fix:
Ignore the option and continue
The text was updated successfully, but these errors were encountered: