James,<br><br>While it&#39;s not safe to use the same mapscript object by multiple threads simultaneously, it should work when those threads operate on separate mapObj instances.<br>This would pretty much similar to an <a href="http://ASP.NET">ASP.NET</a> application utilizing the mapscript library which I&#39;ve already used many times this way.<br>
<br>By all means it would be helpful if you could provide a sample project for this in order to reproduce this behaviour.<br><br>Have you already tested with the recent versions of the packages available from <a href="http://vbkto.dyndns.org/sdk/">http://vbkto.dyndns.org/sdk/</a> ?<br>
<br><br>Best regards,<br><br>Tamas<br><br><br><br><div class="gmail_quote">2010/9/24 James Perrins <span dir="ltr">&lt;<a href="mailto:james.perrins@gmail.com">james.perrins@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
mapscript_csharp - 32 bit version 1.0.3679.25032 dated 10/1/2010<br>
All supporting DLLs from Tamas&#39; nightly build site (was last stable<br>
version when I grabbed it in January)<br>
.NET 3.5<br>
<br>
Actually using this in desktop winform app.  All has been working<br>
fine, until I just tried to move the map rendering into a background<br>
thread to stop locking up the UI.<br>
<br>
No matter what I try - this seems to cause my app to crash out of the<br>
background thread (with no error)<br>
Crash always occurs at the point where I first try and do something<br>
with the OSGeo.MapServer.mapObj<br>
Initially it was when I tried to draw the map (having passed in a map object)<br>
So I then tried reading the map file again from the disk (so nothing<br>
was passed in) - in this case it fails when trying to create the map<br>
object from the map file.<br>
I tried extracting the code to a separate DLL (with only text strings<br>
passed in and out) - this still failed<br>
I then tried to run it as a separate AppDomain - which also failed.<br>
<br>
The only way I have it working to to actually call a separate exe<br>
using a temp .map file with my map state and having the exe write the<br>
image file back to disk for my main app to pick up.<br>
This does work - but seems rather a hack.<br>
<br>
Am I doing something wrong here / misunderstanding something ?  It<br>
seems almost as if I can only have one map object per application - or<br>
they are trampling on each other in some way I don&#39;t understand.<br>
<br>
Any ideas ?<br>
<br>
Thanks<br>
James<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br>