Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187942 - app-text/gocr makes floating point exception on images with one color
Summary: app-text/gocr makes floating point exception on images with one color
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: TeX project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-06 19:42 UTC by Heath Caldwell (RETIRED)
Modified: 2009-04-29 22:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Example image that causes the problem. (bad.pnm,13.16 KB, image/pnm)
2007-08-06 19:43 UTC, Heath Caldwell (RETIRED)
Details
Patch that fixes the problem. (gocr-0.44-no-color-contrast-fix.patch,1.23 KB, patch)
2007-08-06 19:44 UTC, Heath Caldwell (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Heath Caldwell (RETIRED) gentoo-dev 2007-08-06 19:42:46 UTC
When I run gocr on an image that has pixels of all the same color, it dies with a floating point exception (division by zero).

Reproducible: Always

Steps to Reproduce:
1.  gocr -i /tmp/bad.pnm

Actual Results:  
# thresholdValue out of range 255..255, reset to 255
Floating point exception


Expected Results:  
Graceful exit.
Comment 1 Heath Caldwell (RETIRED) gentoo-dev 2007-08-06 19:43:53 UTC
Created attachment 127098 [details]
Example image that causes the problem.
Comment 2 Heath Caldwell (RETIRED) gentoo-dev 2007-08-06 19:44:59 UTC
Created attachment 127099 [details, diff]
Patch that fixes the problem.
Comment 3 Heath Caldwell (RETIRED) gentoo-dev 2007-08-07 16:54:31 UTC
Should this really be assigned to TeX herd?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-08-08 08:26:54 UTC
Read the metadata.xml
Comment 5 Alexis Ballier gentoo-dev 2007-08-30 20:11:47 UTC
nice, bug confirmed.
But, has this been sent upstream ? I'd prefer adding the patch as a backport rather than a fix as it changes the (bad) behavior of the program
Comment 6 Heath Caldwell (RETIRED) gentoo-dev 2007-08-30 20:44:49 UTC
Submitted bug upstream.  Sorry for being lazy and hoping that someone else would do it.
Comment 7 Heath Caldwell (RETIRED) gentoo-dev 2009-04-21 16:26:40 UTC
This has been fixed upstream in 0.47.
Comment 8 Alexis Ballier gentoo-dev 2009-04-29 22:53:11 UTC
(In reply to comment #7)
> This has been fixed upstream in 0.47.

bumped, thanks