bug with IM causing several of my scripts to fail
Posted: 2012-03-07T17:52:09-07:00
I was contacted by a user who reported that my script, defisheye, was not working. I have verified that it was working in IM 6.7.2-10 but not in IM 6.7.3-10 or later. It turns out that several other scripts, all involving complicated fx expressions are also failing (but not others). There is no error message, just a bad resulting image. I have openmp disabled to be sure that was not the issue.
I spent most of the day trying to find something all the failing scripts have in common or to try to narrow down the problem without success, so I spent more time trying to narrow down the releases between which the problem has started.
I assume it has something to do with -fx. But the only change I see in the changelog occurred at 6.7.1.1, so I suspect that is not the issue.
2011-08-01 6.7.1-1 Cristy <quetzlzacatenango@image...>
...
Support -fx acosh(), asinh(), and atanh().
Input image:
Here is a proper result from running my script under IM 6.7.2-10:
defisheye -o 120 -i 180 -t linear -f circular bigben2.jpg bigben2_tmp_6.7.2-10_noopenmp_nopango.png
Here is a failing result from running my script under IM 6.7.3-10 and 6.7.5.10:
defisheye -o 120 -i 180 -t linear -f circular bigben2.jpg bigben2_tmp_6.7.3-10_vpblack_noopenmp_nopango.png
If I disable -virtual-pixel or set it to edge by editing the script, then I get:
This tells me only the center pixel is being computed correctly in the latter releases, which is probably due to the ternary condition used in the fx expression that traps a zero divide and sets the result to 0. My guess is that it might have to do with some change to the computation of atan or atan2. But this is just a guess at this point.
I do not have any releases between these two. If the IM developers have in between versions, let me know where and I can try to pin it down further.
If not, is there any debug statement that I can include to get any information that might help?
My script can be downloaded for testing with the above images and commands from my web site link below.
I spent most of the day trying to find something all the failing scripts have in common or to try to narrow down the problem without success, so I spent more time trying to narrow down the releases between which the problem has started.
I assume it has something to do with -fx. But the only change I see in the changelog occurred at 6.7.1.1, so I suspect that is not the issue.
2011-08-01 6.7.1-1 Cristy <quetzlzacatenango@image...>
...
Support -fx acosh(), asinh(), and atanh().
Input image:
Here is a proper result from running my script under IM 6.7.2-10:
defisheye -o 120 -i 180 -t linear -f circular bigben2.jpg bigben2_tmp_6.7.2-10_noopenmp_nopango.png
Here is a failing result from running my script under IM 6.7.3-10 and 6.7.5.10:
defisheye -o 120 -i 180 -t linear -f circular bigben2.jpg bigben2_tmp_6.7.3-10_vpblack_noopenmp_nopango.png
If I disable -virtual-pixel or set it to edge by editing the script, then I get:
This tells me only the center pixel is being computed correctly in the latter releases, which is probably due to the ternary condition used in the fx expression that traps a zero divide and sets the result to 0. My guess is that it might have to do with some change to the computation of atan or atan2. But this is just a guess at this point.
I do not have any releases between these two. If the IM developers have in between versions, let me know where and I can try to pin it down further.
If not, is there any debug statement that I can include to get any information that might help?
My script can be downloaded for testing with the above images and commands from my web site link below.