<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi all,<br>
      <br>
      We had to temporarly fix this problem as we have to go in
      production. The problem is in
      osg::Text::computeAverageGlyphWidthAndHeight() line 602:<br>
      <br>
          for (i = 0; i < _coords->size(); i += 4)<br>
      <br>
      sometime it happens that _coords->size() is not multiple of 4
      leading to an out of range access to the _coords array. To avoid
      the crash I fixed this way:<br>
      <br>
          unsigned int sz = _coords->size() - (_coords->size() %
      4);<br>
      <br>
          for (i = 0; i < sz; i += 4)<br>
          {<br>
              ...<br>
          }    <br>
      <br>
      Of course this need to be fixed in some other way as it avoid the
      crash but probably do not give the correct result.<br>
      <br>
      Best Regards,<br>
      <br>
      Carlo Lanzotti<br>
      <br>
      Il 20/09/2017 18:35, Carlo Lanzotti ha scritto:<br>
    </div>
    <blockquote type="cite"
      cite="mid:A4104A6D-6DCE-4AF6-8980-AF79A6EEFBBD@dynadream.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      Hi Robert,
      <div><br>
      </div>
      <div>I’ve not tried other OS combinations yet but I made that
        simple test in the osgtext sample too and the crash happens.</div>
      <div><br>
      </div>
      <div>I’ll see if I can reproduce it on OSX.<br>
        <br>
        Thank you.</div>
      <div><br>
        <div id="AppleMailSignature">Carlo Lanzotti</div>
        <div><br>
          Il giorno 20 set 2017, alle ore 17:23, Robert Osfield <<a
            href="mailto:robert.osfield@gmail.com"
            moz-do-not-send="true">robert.osfield@gmail.com</a>> ha
          scritto:<br>
          <br>
        </div>
        <blockquote type="cite">
          <div>
            <div dir="ltr">Hi Carlo,<br>
              <div class="gmail_extra"><br>
                <div class="gmail_quote">On 20 September 2017 at 15:40,
                  Carlo Lanzotti - DynaDream <span dir="ltr"><<a
                      href="mailto:clanzotti@dynadream.com"
                      target="_blank" moz-do-not-send="true">clanzotti@dynadream.com</a>></span>
                  wrote:<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">OSG
                    Version: 3.4.1 64 bit, Visual Studio 2017, Windows
                    10,<br>
                  </blockquote>
                  <div><br>
                  </div>
                  <div>Have you tried any other OSG+OS combinations? Is
                    so they exhibit the problem?</div>
                  <div><br>
                  </div>
                  <div>FYI, there are so major internal changes to
                    osgText since 3.4.x so there is changes that OSG
                    master will address this issue.</div>
                  <div><br>
                  </div>
                  <div>Cheers,</div>
                  <div>Robert.<br>
                  </div>
                  <div><br>
                  </div>
                  <div> </div>
                  <div><br>
                  </div>
                  <div> </div>
                </div>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
        <blockquote type="cite">
          <div><span>_______________________________________________</span><br>
            <span>osg-users mailing list</span><br>
            <span><a href="mailto:osg-users@lists.openscenegraph.org"
                moz-do-not-send="true">osg-users@lists.openscenegraph.org</a></span><br>
            <span><a
href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org"
                moz-do-not-send="true">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a></span><br>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
    </blockquote>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Carlo Lanzotti

DynaDream - Dynamic Laboratory

<a class="moz-txt-link-freetext" href="http://www.dynadream.com">http://www.dynadream.com</a></pre>
  </body>
</html>