<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kenneth Skovhede, GEOGRAF A/S escribi&oacute;:
<blockquote cite="mid:493E211D.5010500@geograf.dk" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
I'm guessing here, but the "ToFile" is actually using the stream, and
disposing it (eg. reading it).<br>
If you do not read the contents of the stream, the server will keep the
stream open, and<br>
the data in memory.<br>
  <br>
You can try to use the Dispose() or similar call instead.<br>
  <pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
  </pre>
  <br>
  <br>
alucas skrev:
  <blockquote cite="mid:20906387.post@talk.nabble.com" type="cite">
    <pre wrap="">My version is MGOS 2.0.2

I'm not sure if I understand your second question Zac. When I call GetTile
method, the server also store this tiles in the TileCache directory. My
problem is when I only call GetTile method without store the returned tiles
in some directory. I don't know what is the reason, but if in every call to
GetTile I store the returned tile, the server service seems does not
crashes...

My first priority is to know what is going on... I don't know why several
calls to GetTile return the exception.

Thanks.


zspitzer wrote:
  </pre>
    <blockquote type="cite">
      <pre wrap="">which version are you running? that always helps to mention it:)

you could just copy the tile cache?


C:\Program Files\MapGuideOpenSource2.0\Server\Repositories\TileCache

On Tue, Dec 9, 2008 at 4:14 AM, alucas <a moz-do-not-send="true"
 class="moz-txt-link-rfc2396E" href="mailto:alucas@srtec.com">&lt;alucas@srtec.com&gt;</a> wrote:
    </pre>
      <blockquote type="cite">
        <pre wrap="">Hello Kenneth,

If after call GetTile I write the tile in a temporary directory, then the
service does not goes down. Strange behaviour...

Now my code looks something like this:

for (int s = scaleCount -1; s &gt;=0; s--)
{
 // nTilesX and nTilesY calculation
 // ...

 for (int r = 0; r &lt;= nTilesX; r++)
 {
    for (int c = 0; c &lt;= nTilesY; c++)
    {
           MgByteReader br = ts.GetTile(mapResId, layerGroup, c, r, s);
           MgByteSink bs = new MgByteSink(br);
           bs.ToFile(@"c:\Temp\s"+ s.ToString() +"_r"+r.ToString()+"_c"+
c.ToString()+".jpg");

     }
 }
}

If I comment the lines for write the tiles, then I get the exception
again.

Any Idea?



Kenneth Skovhede, GEOGRAF A/S wrote:
      </pre>
        <blockquote type="cite">
          <pre wrap="">I can't tell you exactly what goes wrong, but work for a tile generator
has been done elsewhere.

The FMTilingEngine prepares tiles, and automatically restarts the
MapGuide service when it encounters the problem:
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.websoftdev.com/download.cfm">http://www.websoftdev.com/download.cfm</a>

Zac has developed a browser based tile seeder:
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://zacster.blogspot.com/2008/07/mapguide-tile-cache-seeder.html">http://zacster.blogspot.com/2008/07/mapguide-tile-cache-seeder.html</a>

I am building a tile seeder for use with Maestro (not complete, and not
released, LGPL):
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://svn.osgeo.org/mapguide/trunk/Tools/Maestro/MgCooker/">http://svn.osgeo.org/mapguide/trunk/Tools/Maestro/MgCooker/</a>

Perhaps the FMTilingEngine will solve your troubles.
If not, you can consider building on one of the other solutions.

Regards, Kenneth Skovhede, GEOGRAF A/S



alucas skrev:
        </pre>
          <blockquote type="cite">
            <pre wrap="">Hello all,

I'm trying to develop a tile pre-generation desktop application. To do
this,
I'm using mapguidedotnetapi.dll reference. My program creates a
connection
to the server and through the tileservice try to call gettile method
for
every tile. My problem is that gettile method fails and returns an
xmlstream
exception, then I need to restart the server service because I get a
connection exception.

This is the exception:

<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.nabble.com/file/p20872280/exception.jpg">http://www.nabble.com/file/p20872280/exception.jpg</a>

The exception happens not in the first gettile call, it happens when I
called several times this method. My program is something like this:

...
for each scalecount
  for each column
    for each row
      tileService.GetTile(mapResId, layerGroupName, c, r, s)
...

Solutions I tried:

- Modify serverconfig.ini to enable poolconnections for my data.
- Use thread.sleep between iterations
- Use a separate thread to do this work
- Generate tiles only for a scale factor.

This solutions does not work for me.

Any idea?

Sorry for my english...

Thanks in advance



          </pre>
          </blockquote>
          <pre wrap="">_______________________________________________
mapguide-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


        </pre>
        </blockquote>
        <pre wrap="">--
View this message in context:
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.nabble.com/gettile-method-problems-tp20872280p20899422.html">http://www.nabble.com/gettile-method-problems-tp20872280p20899422.html</a>
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>

      </pre>
      </blockquote>
      <pre wrap="">
-- 
Zac Spitzer -
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://zacster.blogspot.com">http://zacster.blogspot.com</a>
+61 405 847 168
_______________________________________________
mapguide-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    </pre>
    </blockquote>
    <pre wrap=""><!---->
  </pre>
  </blockquote>
</blockquote>
Hi Kenneth,<br>
<br>
Calling reader.Dispose() after in every call to GetTile(...) works!. I
don't know for what reason, because dipose() only marks the object for
the GC.<br>
<br>
Thanks.<br>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Language" content="es">
<meta http-equiv="Content-Type" content="text/html; ">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tbody>
    <tr>
      <td width="28%"><b> <font style="font-size: 13pt;"
 color="#f6490a" face="Calibri">Antonio Lucas Rodr&iacute;guez</font></b><font
 style="font-size: 16pt;" color="#656565" face="Calibri"><br>
      </font><font style="font-size: 12pt;" color="#656565"
 face="Calibri"> Software Developer Manager</font><font
 style="font-size: 16pt;" color="#656565" face="Calibri"><br>
      </font><font style="font-size: 11pt;" color="#656565"
 face="Calibri"> <a href="mailto:alucas@svl.es"><font color="#656565">alucas@svl.es</font></a></font></td>
      <td width="39%">&nbsp;</td>
      <td width="32%">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3" height="129" valign="bottom"> <img
 src="cid:part1.08090002.03050009@svl.es" border="0" height="91"
 width="418">
      <hr color="#fa5105"> </td>
    </tr>
    <tr>
      <td colspan="3"><font style="font-size: 12pt;" face="Calibri"> <font
 color="#808080">Av. Aus&iacute;as March, 79 - 1&ordm; - 46013 Valencia ESPA&Ntilde;A &middot;
Telf : 902 500 110 &middot; Fax: 902 500 113 &middot; </font> <a
 href="http://www.svl.es"><font color="#808080">www.svl.es</font></a></font><font
 color="#808080"><br>
      </font><font style="font-size: 11pt;" face="Calibri"> <font
 color="#808080">Sede central: </font><b> <a
 href="http://maps.google.es/maps?f=q&amp;hl=es&amp;geocode=&amp;q=ausias+march+79,+valencia&amp;sll=40.396764,-3.713379&amp;sspn=11.756646,20.43457&amp;ie=UTF8&amp;ll=39.448315,-0.36934&amp;spn=0.002912,0.004989&amp;t=h&amp;z=18">
      <font color="#808080">Valencia</font></a></b><font color="#808080"><br>
Delegaciones: <u><b> <a
 href="http://maps.google.es/maps?f=q&amp;hl=es&amp;geocode=&amp;q=canalejas+13,+alicante&amp;sll=40.396764,-3.713379&amp;sspn=11.756646,20.43457&amp;ie=UTF8&amp;ll=38.343339,-0.487899&amp;spn=0.002958,0.004989&amp;t=h&amp;z=18">
      <font color="#808080">Alicante</font></a></b></u>, <u><b> <a
 href="http://maps.google.es/maps?f=q&amp;hl=es&amp;geocode=&amp;q=Salvador+Vicente+4,+malaga&amp;sll=38.343339,-0.487899&amp;sspn=0.002958,0.004989&amp;ie=UTF8&amp;ll=36.600822,-4.53208&amp;spn=0.003028,0.004989&amp;t=h&amp;z=18">
      <font color="#808080">M&aacute;laga</font></a></b></u> y <u><b>Madrid</b></u></font></font></td>
    </tr>
  </tbody>
</table>
</div>
</body>
</html>