<div dir="ltr">Hi,<div><br></div><div style>were you able to discover something? I don't see anything in gd, but I did study it very hard.</div><div style><br></div><div style>Ondrej</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, May 20, 2013 at 4:08 PM, Niels Thykier <span dir="ltr"><<a href="mailto:niels@thykier.net" target="_blank">niels@thykier.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Control: tags -1 confirmed help<br>
<br>
On 2013-05-20 15:06, Colin Watson wrote:<br>
> Package: mscgen<br>
> Version: 0.20-2<br>
> Severity: serious<br>
> User: <a href="mailto:ubuntu-devel@lists.ubuntu.com">ubuntu-devel@lists.ubuntu.com</a><br>
> Usertags: origin-ubuntu saucy<br>
><br>
> mscgen fails to build in unstable as follows:<br>
><br>
>   make  check-TESTS<br>
>   make[3]: Entering directory `/«PKGBUILDDIR»/build/test'<br>
>   testinput0.msc<br>
>   Error: gdoTextHeight: Could not read font (GDFONTPATH=)<br>
>   FAIL: renderercheck.sh<br>
>   ====================================================<br>
>   1 of 1 test failed<br>
>   Please report to <a href="mailto:Michael.McTernan.2001@cs.bris.ac.uk">Michael.McTernan.2001@cs.bris.ac.uk</a><br>
>   ====================================================<br>
>   make[3]: *** [check-TESTS] Error 1<br>
><br>
> If it helps, you can see a corresponding Ubuntu build log here:<br>
><br>
>   <a href="https://launchpadlibrarian.net/140264375/buildlog_ubuntu-saucy-i386.mscgen_0.20-2build2_FAILEDTOBUILD.txt.gz" target="_blank">https://launchpadlibrarian.net/140264375/buildlog_ubuntu-saucy-i386.mscgen_0.20-2build2_FAILEDTOBUILD.txt.gz</a><br>


><br>
> I don't quite know what's happening here, as running the tests by hand<br>
> seems to succeed.<br>
><br>
> Thanks,<br>
><br>
<br>
I can confirm the failure in a sid chroot, but the failure is<br>
non-deterministic.  I have seen 2 successful builds out of 5 or so.<br>
Furthermore the test that fails is also non-deterministic.  Your log has<br>
testinput0.msc, but I saw 17, 5 and one starting with 2 (forgot the<br>
exact number for that one).<br>
  The frequency of the failures appears to be fairly random at first<br>
glance (for testinput0.msc).  I have observed 0 to 496 successful runs<br>
between each failure.  The average number of successes between failures<br>
appears to be around 36 runs (based on 90 observations).  So anyone<br>
wanting to replicate this may want to setup a:<br>
   "while mscgen -Tpng <in-file> ; do : ; done"<br>
<br>
<br>
Dear pkg-gd developers, do you have any hints as to why gdImageStringFT<br>
would be non-deterministic[1]?  As far as I can tell, it receives the<br>
following arguments:<br>
<br>
  NULL,<br>
  rect (int array[8], init'ed to 8 zeroes),<br>
  pen (0 or 0xff - failures tend to be 0),<br>
  "helvetica",<br>
  11.0,<br>
  0,<br>
  0,<br>
  0,<br>
  "gHELLOWt"<br>
<br>
The pen value is (AFAICT) always a value returned by<br>
gdImageColorAllocate.  mscgen will always allocate ADRAW_COL_BLACK and<br>
ADRAW_COL_WHITE (in that order) prior to loading any other colors[2].<br>
<br>
~Niels<br>
<br>
[1] Call context:<br>
<a href="http://anonscm.debian.org/gitweb/?p=collab-maint/mscgen.git;a=blob;f=src/gd_out.c;h=64d82b27817dccae83c24ce6a450306be11fcfe4;hb=2ca7e6af2dad9f34d6d1466174b13e646d8ab630#l225" target="_blank">http://anonscm.debian.org/gitweb/?p=collab-maint/mscgen.git;a=blob;f=src/gd_out.c;h=64d82b27817dccae83c24ce6a450306be11fcfe4;hb=2ca7e6af2dad9f34d6d1466174b13e646d8ab630#l225</a><br>


<br>
[2]<br>
src/adraw.h:    ADRAW_COL_WHITE   = 0x00ffffff,<br>
src/adraw.h:    ADRAW_COL_BLACK   = 0x00000000,<br>
<br>
These are passed like:<br>
    gdImageColorAllocate(context->img,<br>
                         (col & 0xff0000) >> 16,<br>
                         (col & 0x00ff00) >>  8,<br>
                         (col & 0x0000ff) >>  0);<br>
<br>
(see the getColorRef function in same file linked to in [1])<br>
<br>
<br>
<br>
_______________________________________________<br>
pkg-GD-devel mailing list<br>
<a href="mailto:pkg-GD-devel@lists.alioth.debian.org">pkg-GD-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-gd-devel" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-gd-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Ondřej Surý <<a href="mailto:ondrej@sury.org" target="_blank">ondrej@sury.org</a>>
</div>