<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 08/30/2013 01:54 PM, Dahlia Trimble
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAAQTD4VHFbZMEh4U_09TPu5G84geqBAewo_uvMV=g4zaM+dG7g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>I don't think the mesh is decompressed during the upload
            but it is decompressed when first rezzed in the scene, in
            order to generate a physics collision proxy.<br>
            <br>
          </div>
          Mike, I'm surprised you got it to work with the .Net
          decompression libraries. When I first did the mesh physics
          collider code, the compression the viewer used was not
          compatable with the .Net gzip decompressor. Are you using
          something other than that library?<br>
        </div>
      </div>
    </blockquote>
    <br>
    You need to skip the first 2 bytes of the stream..<br>
    <br>
    From the code:<br>
    <br>
    <meta http-equiv="CONTENT-TYPE" content="text/html;
      charset=ISO-8859-1">
    <font face="Monospace">
      <span style="color:#444444;">                </span><span
        style="color:#009695;">using</span><span style="color:#444444;"> </span><span
        style="color:#444444;">(</span><span style="color:#444444;">MemoryStream inMs </span><span
        style="color:#444444;">=</span><span style="color:#444444;"> </span><span
        style="color:#009695;">new</span><span style="color:#444444;"> MemoryStream</span><span
        style="color:#444444;">(</span><span style="color:#444444;">data</span><span
        style="color:#444444;">,</span><span style="color:#444444;"> offset</span><span
        style="color:#444444;">,</span><span style="color:#444444;"> size</span><span
        style="color:#444444;">))</span><br>
      <span style="color:#444444;">                </span><span
        style="color:#444444;">{</span><br>
      <span style="color:#444444;">                    </span><span
        style="font-style:italic;color:#999988;">/*</span><br>
      <span style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">*</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">Skipping</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">past</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">the</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">first</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">two</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">bytes</span><span
        style="font-style:italic;color:#999988;">,</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">which</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">are</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">part</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">of</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">the</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">zlib</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">specification</span><span
        style="font-style:italic;color:#999988;"> </span><br>
      <span style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">*</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">(</span><span
        style="font-style:italic;color:#999988;">RFC</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">1950</span><span
        style="font-style:italic;color:#999988;">)</span><span
        style="font-style:italic;color:#999988;">,</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">not</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">the</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">deflate</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">specification</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">(</span><span
        style="font-style:italic;color:#999988;">RFC</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">1951</span><span
        style="font-style:italic;color:#999988;">)</span><span
        style="font-style:italic;color:#999988;">.</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">Those</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">bytes</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">contain</span><span
        style="font-style:italic;color:#999988;"> </span><br>
      <span style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">*</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">information</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">about</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">the</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">compression</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">method</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">and</span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">flags</span><span
        style="font-style:italic;color:#999988;">.</span><br>
      <span style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;"> </span><span
        style="font-style:italic;color:#999988;">*/</span><br>
      <span style="color:#444444;">                    </span><span
        style="color:#009695;">int</span><span style="color:#444444;"> streamType </span><span
        style="color:#444444;">=</span><span style="color:#444444;"> inMs</span><span
        style="color:#444444;">.</span><span style="color:#444444;">ReadByte</span><span
        style="color:#444444;">()</span><span style="color:#444444;">;</span><br>
      <span style="color:#444444;">                    </span><span
        style="color:#009695;">int</span><span style="color:#444444;"> streamFlags </span><span
        style="color:#444444;">=</span><span style="color:#444444;"> inMs</span><span
        style="color:#444444;">.</span><span style="color:#444444;">ReadByte</span><span
        style="color:#444444;">()</span><span style="color:#444444;">;</span></font><br>
    <br>
    <meta http-equiv="CONTENT-TYPE" content="text/html;
      charset=ISO-8859-1">
    <font face="Monospace">
      <span style="color:#444444;">                    </span><span
        style="color:#009695;">using</span><span style="color:#444444;"> </span><span
        style="color:#444444;">(</span><span style="color:#444444;">MemoryStream outMs </span><span
        style="color:#444444;">=</span><span style="color:#444444;"> </span><span
        style="color:#009695;">new</span><span style="color:#444444;"> MemoryStream</span><span
        style="color:#444444;">())</span><br>
      <span style="color:#444444;">                    </span><span
        style="color:#444444;">{</span><br>
      <span style="color:#444444;">                        </span><span
        style="color:#009695;">using</span><span style="color:#444444;"> </span><span
        style="color:#444444;">(</span><span style="color:#444444;">DeflateStream zOut </span><span
        style="color:#444444;">=</span><span style="color:#444444;"> </span><span
        style="color:#009695;">new</span><span style="color:#444444;"> DeflateStream</span><span
        style="color:#444444;">(</span><span style="color:#444444;">inMs</span><span
        style="color:#444444;">,</span><span style="color:#444444;"> CompressionMode</span><span
        style="color:#444444;">.</span><span style="color:#444444;">Decompress</span><span
        style="color:#444444;">))</span><br>
      <span style="color:#444444;">                        </span><span
        style="color:#444444;">{</span><br>
      <span style="color:#444444;">                            zOut</span><span
        style="color:#444444;">.</span><span style="color:#444444;">CopyTo</span><span
        style="color:#444444;">(</span><span style="color:#444444;">outMs</span><span
        style="color:#444444;">)</span><span style="color:#444444;">;</span><br>
      <span style="color:#444444;">                            </span><span
        style="color:#009695;">byte</span><span style="color:#444444;">[]</span><span
        style="color:#444444;"> decompressedBuf </span><span
        style="color:#444444;">=</span><span style="color:#444444;"> outMs</span><span
        style="color:#444444;">.</span><span style="color:#444444;">ToArray</span><span
        style="color:#444444;">()</span><span style="color:#444444;">;</span><br>
      <span style="color:#444444;">                            </span><span
        style="color:#009695;">return</span><span style="color:#444444;"> OSDParser</span><span
        style="color:#444444;">.</span><span style="color:#444444;">DeserializeLLSDBinary</span><span
        style="color:#444444;">(</span><span style="color:#444444;">decompressedBuf</span><span
        style="color:#444444;">)</span><span style="color:#444444;"> </span><span
        style="color:#009695;">as</span><span style="color:#444444;"> OSDArray</span><span
        style="color:#444444;">;</span><br>
      <span style="color:#444444;">                        </span><span
        style="color:#444444;">}</span><br>
      <span style="color:#444444;">                    </span><span
        style="color:#444444;">}</span><br>
      <span style="color:#444444;"></span></font>
    <meta name="GENERATOR" content="Mono Text Editor">
    <br>
    <blockquote
cite="mid:CAAQTD4VHFbZMEh4U_09TPu5G84geqBAewo_uvMV=g4zaM+dG7g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <br>
        </div>
        Also, with regards to the viewer hanging during upload, has
        anyone determined whether the problem is in the viewer, or in
        the simulator? The simulator really shouldn't care about size
        until the mesh is actually rezzed in a region, otherwise it's
        just a large blob that will be stored in the asset system. 
        Perhaps trying to upload that same mesh to one of the Linden
        grids might provide some insight.<br>
      </div>
    </blockquote>
    <br>
    Yeah being able to characterize exactly when the hang happens (what
    phase of the upload) would help.  There is a specific set of steps
    taken from calculate to the upload that actually have some
    intermediate server interactions.  Knowing where the failure occurs
    from a UI perspective would help track it down.<br>
    <br>
    Mike<br>
    <br>
    <blockquote
cite="mid:CAAQTD4VHFbZMEh4U_09TPu5G84geqBAewo_uvMV=g4zaM+dG7g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Fri, Aug 30, 2013 at 6:56 AM, Mike
          Chase <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:mike.chase@alternatemetaverse.com"
              target="_blank">mike.chase@alternatemetaverse.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div class="im">
                <div>On 08/30/2013 08:58 AM, Robert Martin wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">one thing that might help things here
                    is have some way of having the simulator
                    "bounce"/return zero when it is doing the calculate
                    cost stage of a mesh upload.<br>
                  </div>
                </blockquote>
                <br>
              </div>
              That's not  really going to help I don't think.  I don't
              believe the OpenSim implementation does anything or even
              looks for the mesh data when the cost stage is executed.  
              <br>
              <br>
              Mesh upload happens in 2 stages.  When you push the
              calculate button the client crunches data and sends a
              snapshot of it along with the NewAgentInventory request to
              the server.    The server returns the upload cap along
              with any optional cost calculations it has done.  The
              client then re-contacts the server at the new cap and
              transmits the data (again) for the actual upload.   <br>
              <br>
              There are two likely places for bottlenecks and depending
              on what core opensim does an additional place where a
              failure is possible.<br>
              <br>
              1) The initial calculations done by the client.  If this
              is the case its going to be seen prior to the upload
              button enabling.  <br>
              2) The actual data transmission.  Probably not a problem
              because it's using HTTP for the transfer in both cases. 
              Also if you are seeing the upload button enable then that
              transmission has already happened once. Which would
              indicate its probably not the issue.<br>
              <br>
              There is an additional scenarios I hit when I did the
              implementation for InWorldz.   The <a
                moz-do-not-send="true" href="http://zlib.net"
                target="_blank">zlib.net</a> decompression code
              occasionally throws indicating an invalid code stream. 
              IDK if the upstream code actually cracks open the mesh in
              any way but if so its entirely possible thats what is
              failing and the exception is being eaten.    In the
              InWorldz case I replaced the zlib calls with the
              compression/decompression code in .NET and resolved the
              issue that way.  Its something additional to check.<br>
              <br>
              So more than likely from the description the issue is with
              asset creation or something that's done after the
              transmission takes place.  <br>
              <br>
              Hope this helps a bit.<span class="HOEnZb"><font
                  color="#888888"><br>
                  <br>
                  Mike</font></span>
              <div>
                <div class="h5"><br>
                  <blockquote type="cite">
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">On Thu, Aug 29, 2013 at
                        6:48 PM, Justin Clark-Casey <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:jjustincc@googlemail.com"
                            target="_blank">jjustincc@googlemail.com</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex"> I'm not sure this
                          will be possible as I believe mesh is uploaded
                          via a single HTTP post, which isn't easy to
                          monitor server-side.  It's also possible that
                          the mesh you're trying to upload is
                          unfortunately simply too large and that we
                          should have (optional) server-side enforced
                          limits.  But this is speculation on my part.<br>
                          <br>
                          Is this a purely local upload or one to a
                          server not on the same system?  If the server
                          is on a different system, possibly you could
                          install a monitoring tool to check your rate
                          of data upload.  Naturally, one would expect a
                          server on a local LAN to be very quick, but a
                          remote one might be different and even on the
                          local scenario, things like slow wifi might
                          come into play.<br>
                          <br>
                          Perhaps you could install a monitoring tool on
                          your system
                          <div>
                            <div><br>
                              On 24/08/13 17:22, Ai Austin wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex"> I wonder
                                if its possible to get any debugging
                                related to mesh uploads and their
                                progress (or otherwise).<br>
                                <br>
                                I think I am timing out even when I set
                                the     AckTimeout = 600   as suggested
                                by Justin and want to try to figure out<br>
                                the stage at which the problems occur.<br>
                                <br>
                                I am uploading some Collada meshes that
                                are 20MB up to 100MB in size.. and got
                                them in once.. but cannot reliably
                                repeat<br>
                                that especially f I try to vary the
                                upload options to scale the incoming
                                mesh, or if I add any physics details.<br>
                                <br>
_______________________________________________<br>
                                Opensim-dev mailing list<br>
                                <a moz-do-not-send="true"
                                  href="mailto:Opensim-dev@lists.berlios.de"
                                  target="_blank">Opensim-dev@lists.berlios.de</a><br>
                                <a moz-do-not-send="true"
                                  href="https://lists.berlios.de/mailman/listinfo/opensim-dev"
                                  target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
                                <br>
                              </blockquote>
                              <br>
                              <br>
                            </div>
                          </div>
                          <span><font color="#888888"> -- <br>
                              Justin Clark-Casey (justincc)<br>
                              OSVW Consulting<br>
                              <a moz-do-not-send="true"
                                href="http://justincc.org"
                                target="_blank">http://justincc.org</a><br>
                              <a moz-do-not-send="true"
                                href="http://twitter.com/justincc"
                                target="_blank">http://twitter.com/justincc</a></font></span>
                          <div>
                            <div><br>
_______________________________________________<br>
                              Opensim-dev mailing list<br>
                              <a moz-do-not-send="true"
                                href="mailto:Opensim-dev@lists.berlios.de"
                                target="_blank">Opensim-dev@lists.berlios.de</a><br>
                              <a moz-do-not-send="true"
                                href="https://lists.berlios.de/mailman/listinfo/opensim-dev"
                                target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <br>
                      -- <br>
                      Robert L Martin </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
Opensim-dev mailing list
<a moz-do-not-send="true" href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a>
<a moz-do-not-send="true" href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a></pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Opensim-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br>
            <a moz-do-not-send="true"
              href="https://lists.berlios.de/mailman/listinfo/opensim-dev"
              target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Opensim-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a>
<a class="moz-txt-link-freetext" href="https://lists.berlios.de/mailman/listinfo/opensim-dev">https://lists.berlios.de/mailman/listinfo/opensim-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>