IM 6.8.0.4 Q16 Mac OSX Snow Leopard
This works with direct PNG output:
convert zelda3.png 1tmpA1.mpc
convert 1tmpA1.mpc -color-matrix "6x3: \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
" 1tmpzelda3_gray.png
This fails with temp MPC, then convert to PNG output:
convert zelda3.png 1tmpA1.mpc
convert 1tmpA1.mpc -color-matrix "6x3: \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
" 1tmpA1.mpc
convert 1tmpA1.mpc 1tmpzelda3_gray.png
convert(1749) malloc: *** error for object 0x100c13308: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Abort trap
Am I misunderstanding something here?
possible MPC bug IM 6.8.0.4 Q16
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible MPC bug IM 6.8.0.4 Q16
P.S.
It works fine with MIFF:
convert zelda3.png 1tmpA1.miff
convert 1tmpA1.miff -color-matrix "6x3: \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
" 1tmpA1.miff
convert 1tmpA1.miff 1tmpzelda3_gray.png
But even normalizing the values to 0.3333, (convert color to average gray), fails with MPC
ff=0.333333
convert zelda3.png 1tmpA1.mpc
convert 1tmpA1.mpc -color-matrix "6x3: \
$ff $ff $ff 0 0 0 \
$ff $ff $ff 0 0 0 \
$ff $ff $ff 0 0 0 \
" 1tmpA1.mpc
convert 1tmpA1.mpc 1tmpzelda3_gray.png
It works fine with MIFF:
convert zelda3.png 1tmpA1.miff
convert 1tmpA1.miff -color-matrix "6x3: \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
1 1 1 0 0 0 \
" 1tmpA1.miff
convert 1tmpA1.miff 1tmpzelda3_gray.png
But even normalizing the values to 0.3333, (convert color to average gray), fails with MPC
ff=0.333333
convert zelda3.png 1tmpA1.mpc
convert 1tmpA1.mpc -color-matrix "6x3: \
$ff $ff $ff 0 0 0 \
$ff $ff $ff 0 0 0 \
$ff $ff $ff 0 0 0 \
" 1tmpA1.mpc
convert 1tmpA1.mpc 1tmpzelda3_gray.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible MPC bug IM 6.8.0.4 Q16
P.S. 2
A few of my scripts that I have tested are failing from this same error and they do not use -color-matrix.
It seems to be associated with saving a .MPC tempfile to itself after processing and then using
convert tmp.mpc outputfile
A few of my scripts that I have tested are failing from this same error and they do not use -color-matrix.
It seems to be associated with saving a .MPC tempfile to itself after processing and then using
convert tmp.mpc outputfile
Last edited by fmw42 on 2012-11-05T22:01:52-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible MPC bug IM 6.8.0.4 Q16
P.S. 3
It seems to work fine in IM 6.8.0.3 Q16 Mac OSX Snow Leopard. Seems to be introduced in IM 6.8.0.4.
It seems to work fine in IM 6.8.0.3 Q16 Mac OSX Snow Leopard. Seems to be introduced in IM 6.8.0.4.
Re: possible MPC bug IM 6.8.0.4 Q16
I can't reproduce this problem on Ubuntu 12-04 with IM-6.8.0-4 and libpng-1.5.13. I guess it is some sort of race condition with the MPC being overwritten as Fred suggests. To those who do observe the bug, does it happen if you use another output format instead of png?
[edit] I'm seeing the bug now, SVN revision 9887. Answering my own question -- it's only showing up when PNG is the output format, after trying a few others.
[edit 2] I tried reverting coders/png.c to an earlier version (6.8.0-2) but that did not help.
[edit] I'm seeing the bug now, SVN revision 9887. Answering my own question -- it's only showing up when PNG is the output format, after trying a few others.
[edit 2] I tried reverting coders/png.c to an earlier version (6.8.0-2) but that did not help.
Last edited by glennrp on 2012-11-07T10:29:09-07:00, edited 2 times in total.
Re: possible MPC bug IM 6.8.0.4 Q16
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.0-5 Beta available within a few days. Thanks.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible MPC bug IM 6.8.0.4 Q16
Glenn,I can't reproduce this problem on Ubuntu 12-04 with IM-6.8.0-4 and libpng-1.5.13. I guess it is some sort of race condition with the MPC being overwritten as Fred suggests. To those who do observe the bug, does it happen if you use another output format instead of png?
It only fails when the output is png. The input format does not matter. If the input format is png, jpg, gif, but the output is png, it fails. It works fine if the input is png and the output is jpg, gif or tiff.
I am using libpng 1.4.11. I had to back down from libpng 1.5.x so that I could keep testing (already compiled) older versions of IM without having to recompile each one.
Fred
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible MPC bug IM 6.8.0.4 Q16
The problem appears to be fixed in IM 6.8.0.5 Q16 beta ( HDRI ).