Bug 149924 - pamtojpeg2k and others just don't work
Summary: pamtojpeg2k and others just don't work
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: netpbm
Version: 3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-28 20:42 UTC by Michael Sander
Modified: 2013-07-02 23:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-11 06:58:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Sander 2005-02-28 20:42:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1

Description of problem:
There are several problems and I have been in touch with the developer
Bryan Henderson < bryanh > trying to debug them.
Basically, the jasper library that is used in netpbm is too old and
incompatible with 64 bit machines. 

I'll go some of the solved some problems more specifically:
1) pamtojpeg2k with a '-compression' level set will crash the program.
2) when compiling NetPBM on AMD64 you need to add the -fPIC CFLAG
3) Even if 1 and 2 work, if you have a 64 bit machine the jasper
library will just kill everything.
4) If you build and link your own jasper you have to remember to link
the jpeg libraries. Add -ljpeg to the linker options.

Working with Bryan, we have resolved all of the above bugs. The fixes,
I am told, will be included in the next netpbm release. So hold on to
your panties. 

I'm currently working on the following....
Assuming you have built and linked your own jasper library...
1) Running pamtojpeg2k seems to work but crashes at the end
complaining about a file descriptor
2) Running jpeg2ktopam complains that it ran out of memory


Version-Release number of selected component (if applicable):
netpbm-10.26

How reproducible:
Always

Steps to Reproduce:
For problem 1 listed in summary
For 1) RUN: pamtojpeg2k -compression {insert a float here}
For 2) BUILD: netbpm on an AMD64 without the -fPIC CFLAG
For 3) Fix 1 and 2 and then try running pamtojpeg2k 
For 4) Build your own jasper library and link it then try to make netpbm
    

Additional info:

Comment 1 Michael Sander 2005-02-28 20:46:46 UTC
NOTE: These are 64-bit specific issues. I have an AMD64 and can
confirm their existance. I cannot confirm if it occurs on other 64 bit
systems.

Comment 2 Jindrich Novy 2005-03-11 06:58:21 UTC
I did another prerelease of netpbm-10.26.4, what is just built to solve this issue.

Thanks,
Jindrich

Comment 3 Michael Sander 2005-03-12 00:01:02 UTC
I have fixed the following two issues. 

1) "Running pamtojpeg2k ... file descriptor" was caused by a call to close the
file descriptor stdout. It probably varies from system to system, but in general
you cannot close stdout.

2) The running out of memory problem was caused by an uninitialized variable. It
basically looked like this:
   int a;
   malloc(a*sizeof(int));
   init(&a);
When it should have been:
   int a;
   init(&a);
   malloc(a*sizeof(int));
Not a major problem, but now its fixed.

Comment 4 Jindrich Novy 2005-03-14 08:19:05 UTC
I see the only chage in the pamtojpeg2k between netpbm-10.26 and netpbm-10.26.4
is the changed declaration of compressionRatio:

double compressionRatio -> float compressionRatio

Could you please send here a patch if it's not fixed upstream already?


Note You need to log in before you can comment on or make changes to this bug.