[mapserver-users] Re: Mapscript c# VS 2010 framework 4 and memory leaks
James Perrins
james.perrins at gmail.com
Wed Apr 21 15:19:40 PDT 2010
Hi Tamas,
Thanks for that - and for all your efforts maintaining these.
I'm a bit up against it needing the 32 bit version for VS 2010 for
some demos. I grabbed the source, and complied it in VS 2010 (just
changing the makefile so that it recognised 10.x as a valid platform)
Things seemed to compile - but when I call something like
mapObj(MyMapFile) I get an error about
"Attempt by security transparent method
'OSGeo.MapServer.mapObj..ctor(System.String)' to call native code
through method 'OSGeo.MapServer.mapscriptPINVOKE.new_mapObj(System.String)'
failed. Methods must be security critical or security safe-critical
to call native code."
Is this because there is more stringent security with Framework 4, or
has my compilation not been as successful as I hoped.
Do you know of a quick fix to get me over this until you get a chance
to build the new libraries (e.g. making it full trust or something)?
Many Thanks
James
On Wed, Apr 21, 2010 at 8:47 PM, Tamas Szekeres <szekerest at gmail.com> wrote:
> Hi James,
>
> I'm planning to exend http://vbkto.dyndns.org:1280/sdk with VS2010
> builders, however it may require 1-2 weeks for me to compile all the
> dependencies with VS2010 for Win32 and Win64.
>
> Best regards,
>
> Tamas
>
>
>
> 2010/4/21 James Perrins <james.perrins at gmail.com>:
>> Hi,
>>
>> I've been struggling with memory errors doing fairly simple things
>> (e.g. mapObj not populating properly - I could normally render a map
>> image - but not work with the layers for example).
>>
>> This was in VS 2010 targeting .NET framework 4 - all appeared to work
>> OK - in fact all did work OK within visual studio - but started to
>> fall apart when run directly from a compiled exe.
>>
>> I tried a range of DLLs (including last stable version from
>> http://vbkto.dyndns.org:1280/sdk/index.html) and used dependency
>> walker to check all was in place.
>>
>> As a test I moved everything back to VS 2008 / 3.5 and it all worked -
>> so I can only assume that maybe I need to get a version of teh
>> MapScript c# dll built for framework 4 - does this make sense?
>>
>> I would dearly love to stay with 3.5 - but unfortunately we need a new
>> component from 4.0
>>
>> Can anyone point me at a dll compiled for .NET 4 - or reassure me taht
>> is should be relatively simple for me to tackle from the source!
>>
>> Many Thanks
>> James
>>
>
--
Dr James Perrins
exeGesIS SDM Ltd
Great House Barn
New Street, Talgarth
Powys LD3 0AH.
Direct Line: 01646 686650
Tel: 01874 711145
Fax: 01874 711156
Email: JamesP at esdm.co.uk
This E-mail and any files transmitted with it are private and intended
solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient, the E-mail and any
files have been transmitted to you in error and any copying,
distribution or other use of the information contained in them is
strictly prohibited.
Nothing in this E-mail message amounts to a contractual or other legal
commitment on the part of exeGesIS SDM Ltd unless confirmed by a
signed communication.
exeGesIS SDM Ltd will make every effort to keep its network free of
viruses. However, the recipient of this message will need to scan this
message, and any attachments, for viruses, as exeGesIS SDM Ltd can
take no responsibility for any computer virus that might be
transferred by this e-mail.
More information about the MapServer-users
mailing list