Did you deploy all the dll-s can be found in the same package? Mixing the dll-s from different packages (distribution sources) may lead to memory corruption issues.<div><br></div><div>Best regards,</div><div><br></div><div>
Tamas</div><div> <br><br><div class="gmail_quote">2011/10/4 GMail <span dir="ltr">&lt;<a href="mailto:itacasoft@gmail.com">itacasoft@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="IT" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Tried with </span><span lang="EN-US">MSVC2010 (Win32), got this exception:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal">00018093        13859.58398438        [7756] ##### Exception occurred #####      <u></u><u></u></p><p class="MsoNormal">00018094        13859.58398438        [7756] Tentativo di lettura o scrittura della memoria protetta. Spesso questa condizione indica che altre parti della memoria sono danneggiate.             <u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">00018095        13859.58789063        [7756] mapscript_csharp        <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">00018096        13859.58984375        [7756]    in OSGeo.MapServer.mapscriptPINVOKE.mapObj_getProjection(HandleRef jarg1)          <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">00018097        13859.58984375        [7756]    in OSGeo.MapServer.mapObj.getProjection()       <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:10.0pt">Da:</span></b><span style="font-size:10.0pt"> Tamas Szekeres [mailto:<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a>] <br>
</span></p><div class="im"><b>Inviato:</b> martedì 4 ottobre 2011 20:17<br><b>A:</b> GMail<br></div><b>Cc:</b> Daniel Morissette; <a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><div>
<div></div><div class="h5"><br><b>Oggetto:</b> Re: R: [mapserver-dev] Re: Problem with projectionObj<u></u><u></u></div></div><p></p></div><div><div></div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
How did you obtain the binaries? I&#39;d be curious to know whether the binaries from <a href="http://www.gisinternals.com/sdk/" target="_blank">http://www.gisinternals.com/sdk/</a> would work or not? <u></u><u></u></p><div>
<p class="MsoNormal">You might want to try using the MSVC2010 versions x86 or x64 depending on your OS platform/architecture.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">
Best regards,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Tamas<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">
<u></u> <u></u></p><div><p class="MsoNormal">2011/10/4 GMail &lt;<a href="mailto:itacasoft@gmail.com" target="_blank">itacasoft@gmail.com</a>&gt;<u></u><u></u></p><p class="MsoNormal">Yes, I think this is a permission issue, as most of IIS related problems ...<br>
I also made another try:<br><br>I ported the previous code to a simple, simple console application. Well,<br>while the <a href="http://ASP.NET" target="_blank">ASP.NET</a> version fails both with IIS and with the VS2010 web<br>
debugger, the console program works smoothly, producing all 10 image maps<br>and even filling the MS_ERRORFILE file with lots of stuff. Tried also with a<br>remote Windows 2008 Server, even there the web version does not work.<br>
Here is the code:<br><br><br>///BEGIN<br><br>using System;<br>using System.Collections.Generic;<br>using System.Linq;<br>using System.Text;<br>using OSGeo.MapServer;<br>using System.IO;<br><br>namespace GenerateMap<br>{<br>
   class Program<br>   {<br>       const string MERCATORE_PROJ4 = &quot;+proj=merc +a=6378137 +b=6378137<u></u><u></u></p><div><p class="MsoNormal">+lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null<u></u><u></u></p>
</div><p class="MsoNormal">+wktext  +no_defs&quot;;<br>       const string WGS84_PROJ4 = &quot;+proj=longlat +ellps=WGS84 +datum=WGS84<br>+no_defs&quot;;<br><br><br>       static void DrawAMap(int index)<u></u><u></u></p>
<div><p class="MsoNormal">       {<br>           bool exists;<br>           string filename =<u></u><u></u></p></div><p class="MsoNormal">@&quot;C:\usr\lavoro\progetti\SilverlightMapServer\GisData\Demo\Terni\terni.map&quot;;<br>
<br>           mapObj map = null;<br><br>           try<br>           {<br>               map = new mapObj(filename);<br>           }<br>           catch (Exception ex)<br>           {<br>               string msg = ex.Message;<br>
               Console.WriteLine(msg);<br>           }<br><br><br>           int w = 800;<br>           map.width = w;<br><br><br>           int h = 600;<br>           map.height = h;<br><br><br>           rectObj bbox = new rectObj(12.6198865008904, 42.5498576637217,<br>
12.6710248924462, 42.5784118606357, 0);<br><br><br>           map.setProjection(MERCATORE_PROJ4);<br><br>           projectionObj projMercatore = new<br>projectionObj(MERCATORE_PROJ4);<br>           projectionObj projWGS84 = new projectionObj(WGS84_PROJ4);<br>
<br>           try<br>           {<br>               ///HERE first time OK, second time hangs<br>               bbox.project(projWGS84, projMercatore);<br>           }<br>           catch (Exception ex)<br>           {<br>
               string msg = ex.Message;<br>               Console.WriteLine(msg);<br>           }<br><br>           //map.extent = bbox;<br>           map.setExtent(bbox.minx, bbox.miny, bbox.maxx, bbox.maxy);<u></u><u></u></p>
<div><p class="MsoNormal"><br>           imageObj image = map.draw();<br><br>           MemoryStream memstrm = new MemoryStream(image.getBytes());<u></u><u></u></p></div><p class="MsoNormal">           memstrm.Position = 0;<br>
<br>           FileStream outStream = File.OpenWrite(&quot;mapimage&quot; +<br>index.ToString() + &quot;.png&quot;);<br>           memstrm.WriteTo(outStream);<br>           outStream.Flush();<br>           outStream.Close();<br>
<br>           bbox.Dispose();<br>           projWGS84.Dispose();<br>           projMercatore.Dispose();<br>           image.Dispose();<br>           map.Dispose();<br>       }<br><br><br><br><br>       static void Main(string[] args)<br>
       {<br>           for (int i = 0; i &lt; 10; i++)<br>           {<br>               DrawAMap(i);<br>           }<br><br>       }<br>   }<br>}<br><br>///END<br><br><br>It seems there is a big problem with MapScript 6.0.1 (from MS4W) + <a href="http://ASP.NET" target="_blank">ASP.NET</a> +<br>
IIS 7.0. Anybody has the same environment? Experiencing problems?<u></u><u></u></p><div><p class="MsoNormal"><br><br><br>-----Messaggio originale-----<br>Da: <a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a><br>
[mailto:<a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a>] Per conto di Daniel<br>Morissette<u></u><u></u></p></div><p class="MsoNormal">Inviato: martedì 4 ottobre 2011 17:42<br>
A: <a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>Oggetto: Re: R: [mapserver-dev] Re: Problem with projectionObj<u></u><u></u></p><div><div><p class="MsoNormal"><br>On 11-10-04 11:37 AM, GMail wrote:<br>
&gt; Thanks for your answer.<br>&gt; The first explanation is not possible, because the same code works for IIS<br>&gt; 6.0, while it does not on IIS 7.0.<br>&gt; The second is something I do not understand: using MapScript and <a href="http://ASP.NET" target="_blank">ASP.NET</a> I<br>
&gt; do not have a process &quot;mapserv&quot; that can crash ... but I understand that<br>if<br>&gt; the IIS handler process crashes or hangs in some way, it may block the<br>&gt; output buffer, and this is likely. But this does not explain why this<br>
&gt; happens only on IIS 7.0 and not on IIS 6.0. How can I have more log<br>&gt; information?<br>&gt;<br><br>Maybe a permission issue? Sorry, I&#39;m no IIS expert, just guessing...<br><br>Maybe try using MS_ERRORFILE &quot;windowsdebug&quot; with tools such as DebugView<br>
and see if that makes any difference?<br><br><a href="http://mapserver.org/optimization/debugging.html#step-1-set-the-ms-errorfile%0D-variable" target="_blank">http://mapserver.org/optimization/debugging.html#step-1-set-the-ms-errorfile<br>
-variable</a><br><br><br>--<br>Daniel Morissette<br><a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>Provider of Professional MapServer Support since 2000<br><br>_______________________________________________<br>
mapserver-dev mailing list<br><a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
<br>_______________________________________________<br>mapserver-dev mailing list<br><a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><u></u><u></u></p>
</div></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></blockquote></div><br></div>