[mapserver-users] Memoryproblem

Hallgren, Johan johan.hallgren at logica.com
Wed Aug 13 02:23:05 EDT 2008


Hello Tamas

I'm glad that you supports me here:)

We are getting closer to the problem:)

Your code (getbytes.exe) runs fine on my own pc, but when I move the code to the server the problem starts.

I made a new project with your cs-file and named it getbytemap, but it's actually the same code as the getbytes.exe. The output below doesn't actually write the error but the "GetBytes:" is the first part och the exception message. I can guess that the memory already is corrupt. When I do the same with the debugger you can see the watch output below.

One difference I have in mind compared to other environments I have used is that this server have more power. In the task manager there is eight CPUs.

The problem is deterministic with the getbyte-code.

Console output
+++++++++++++++++++++++++++++++++++
C:\temp>getbytemap.exe D:\apps\GMSAgent\MapFiles\gims.map c:\temp\t.png
Drawing map: 'GIMS' using imageObj.getBytes
GetBytes:

C:\temp>getbytemap.exe D:\apps\GMSAgent\MapFiles\gims.map c:\temp\t.png
Drawing map: 'GIMS' using imageObj.getBytes
Drawing map: 'GIMS' using imageObj.write
GetBytes:

C:\temp>getbytemap.exe D:\apps\GMSAgent\MapFiles\gims.map c:\temp\t.png
Drawing map: 'GIMS' using imageObj.getBytes
GetBytes:

C:\temp>getbytemap.exe D:\apps\GMSAgent\MapFiles\gims.map c:\temp\t.png
Drawing map: 'GIMS' using imageObj.getBytes
GetBytes:

C:\temp>getbytemap.exe D:\apps\GMSAgent\MapFiles\gims.map c:\temp\t.png
Drawing map: 'GIMS' using imageObj.getBytes
GetBytes:
+++++++++++++++++++++++++++++++++++

Watch output
+++++++++++++++++++++++++++++++++++
ex.Message      "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."        string
+++++++++++++++++++++++++++++++++++

/Johan

___________________________________


Johan Hallgren


Logica
Pelle Bergs backe 3
Box 1938, 791 19 Falun
Tel (och mobil): 023-547 46 (int: +46-2354746)
johan.hallgren at logica.com
http://www.logica.se

-----Original Message-----
From: Tamas Szekeres [mailto:szekerest at gmail.com]
Sent: den 12 augusti 2008 16:48
To: Hallgren, Johan
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Memoryproblem

Johan,

I haven't run into this problem yet. Do you able to run the getbytes console application in the /csharp directory?
Is this issue deterministic or random? Do you have an example to reproduce it?

Best regards,

Tamas


2008/8/12 Hallgren, Johan <johan.hallgren at logica.com>:
> Hello
>
>
>
> I have a major problem when using imgMapObj.getBytes().
>
> The memory will be corrupt. The problem doesn't occur when using the
> save function.  I have not seen the problem on other servers so the
> problem seams to be related to a specific server (Windows Server 2003 standard edition).
>
> Error msg
>
> ++++++++++++++++++++++
>
> Attempted to read or write protected memory. This is often an
> indication that other memory is corrupt.
>
>    at OSGeo.MapServer.mapscriptPINVOKE.imageObj_getBytes(HandleRef
> jarg1, SWIGByteArrayDelegate jarg2)
>    at OSGeo.MapServer.imageObj.getBytes(SWIGByteArrayDelegate callback)
>    at OSGeo.MapServer.imageObj.getBytes()
>    at WMData.GIS.GMSAgent_WP.Libs.MapEngine.Get_Image(XmlDocument
> xmlDoc, Boolean bRetImage) in
> C:\Project\applications\GMS\GMSAgent_WP\Libs\MapEngine.cs:line 298
> ++++++++++++++++++++++
>
> I use mapserver in c# and I have version 5.2.0.
>
>
>
> /Johan
>
> Johan Hallgren
>
> Logica
> Pelle Bergs backe 3
> Box 1938, 791 19 Falun
> Tel (och mobil): 023-547 46 (int: +46-2354746)
> johan.hallgren at logica.com http://www.logica.se
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



More information about the mapserver-users mailing list