-
Notifications
You must be signed in to change notification settings - Fork 394
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
Application crashing while disposing Pix.Create object #739
Comments
Note that the pix returned from pixCreate() is a pointer to a pix struct. If that doesn't solve your problem, I can't help you, because I do not "speak" C#, and don't know anything about leptonica getting converted into a C# library. I can assure you that the problem is NOT in leptonica: it is either in the conversion to C# or in your code using it. |
Thank you @DanBloomberg, your assumption was right. I'm able to control the application crashing as per your comments. Now, I got the problem in getting the proper confidence values from pixOrientDetect(). I have two sample files with 90° and 180° rotated, I used pixOrientDetect() to get the up and left confidence so that rotate the file correctly.
How to use pixOrientDetect(pixs, out pupconf, out pleftconf, 0, 0) in such a way to get the proper confidence values. I appreciate a quick response. Thanks in advance. Files are attached for the reference. |
I'm surprised it got anything right for File1. The orientation function uses ascenders and descenders from the xheight region of the text line, which you find in Roman text, not kanji. As for File2, that's handwritten and is not expected to work properly for any type face. |
Thank you for the reply. Here is the another file which is failing to rotate. It doesn't have any handwritten but failing to get expected confidence values. This file resolution is 300, I used pixScale() to scale it down and ran pixOrientDetect() on it. Output is not expected one. |
Again, this application only works for roman text characters that have ascenders and descenders. So it doesn't even work for numbers and ALL CAPS. See comments in the file flipdetect.c |
Hi @DanBloomberg ,
I'm using 1.81.1 with VS2022 on Windows 11 for rotating the file according to the text.
While disposing the Pix.Create object, my application has crashed. On checking the logs, I found the below exception.
"An attempt was made to perform a read or write operation on protected memory. It is possible that other memory is corrupted"
Note: This crash is observed mostly in files with Japanese text.
Below is the attached sample file for which this issue is observed.
File.zip
I appreciate a quick response. Thanks in advance.
The text was updated successfully, but these errors were encountered: