-
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
Handle null raw_choice - fixes #235 #246
Conversation
ccmain/control.cpp
Outdated
@@ -795,6 +795,8 @@ static int SelectBestWords(double rating_ratio, | |||
bool debug, | |||
PointerVector<WERD_RES>* new_words, | |||
PointerVector<WERD_RES>* best_words) { | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for empty lines?
I've cleaned up the cosmetic issues. Any insight into what the root cause is? I'm not sure that this is more than a bandaid. |
I am not sure if it is an good idea to return valid output (0.0) when tesseract did not produced certainty... |
@theraysmith Will this PR help with the word getting dropped - #681 |
It's not related at all to #681. |
Can somebody (@Shreeshrii ?) check if this is relevant for 4.0 (if it helps)? |
I will request @stweil to review. Thanks. |
Link to issue: #235. |
I added the issue to the planning list and will have a look next week. |
@tfmorris : do you have test case for this PR? |
@zdenop Sorry for the delayed reply. I do not have a unit test for the PR. It's 2 1/2 year old, but from looking at the historical context, I'm guessing that I was able to reproduce the failure in #235 and manually tested using that test case. Since the test case in #235 was tested and no longer crashes, I don't think this PR is needed. |
The segfault is gone, but the other part of the issue still exist with the 'tessdada' repo (but not with best / fast) |
In any case, patches that don't solve the root of the issue are problematic IMO. |
I'm not sure this is the best fix for the issue, but it does provide a workaround while someone works out what the root cause is and where it should really be fixed.