From: Mark de W. <m.d...@da...> - 2018-10-19 07:51:11
|
Hi, In our application we draw a graph using an extcairo device. While testing on a 32 bit system I ran in an issue. When zooming in on a graph the cairo context got the status CAIRO_STATUS_INVALID_MATRIX. Reproducing the issue pointed to the function plP_wcpcx. The function returned a PLINT_MIN due to a the double result being too large. (It is implementation defined whether C returns the largest or the smallest value in this case.) This caused an 'a' of 0, which was where cairo got its CAIRO_STATUS_INVALID_MATRIX status. This issue was caused by circles drawn outside the clipping area of the plot. The issue occurs both with plplot 5.10.0 as shipped with Debian Strech and the current git master. I created a small patch which seems to fix the issue for me. It simply does not draw the arcs that are fully outside the clipping area. I'm not entirely sure whether this is the right solution, but it fixes the issue for me. The patch contains a debug printf for testing purposes. I modified example 3 to reproduce the issue. The x value becomes PLINT_MIN on a 32 bit system. The output of x03 on the console with the plarc patch applied is: xscl[0] 2144687274, xscl[1] 2145210464 xscl[0] -2147483648, xscl[1] -2147483648 Is this patch the right approach? Regards, Mark de Wever |