MapScript C# (MapServer 4.10): mapscriptPINVOKE problem on 64-bit platform.
Hong
ljfong at SDF.LONESTAR.ORG
Wed Jan 24 16:49:03 PST 2007
Hi,
I was trying to run mapserver compiled on a 64-bit Intel dual xeon processor
machine running Windows Server 2003 R2 64-bit edition. On map object creation,
the subroutine threw an exception "The type initializer for 'mapscriptPINVOKE'
threw an exception.". The stack trace was:
at mapscriptPINVOKE.new_mapObj(String jarg1)
at mapObj..ctor(String filename)
I wrote a small test C++ application on the 64-bit machine that tried to
create a map object by compiling and linking it to mapscript.lib and
mapscript_i.lib. The application ended up with the error:
Debug Assertion Failed!
Program: D:\TGI\Developer\MapServerTest\debug\MapServerTest.exe
File: dbgheap.c
Line: 1252
Expression: _CrtIsValidHeapPointer(pUserData)
So it looked like I was having problem with the CRT library on the 64-bit
machine. Looking at libmap.dll revealed that it depended on
c:\windows\syswow64\MSVCRT.DLL (is this the correct CRT to load?)
The compiler was MS Visual Studio 2005.
The C++ test program itself:
// MapServerTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include "map.h"
int _tmain(int argc, _TCHAR* argv[])
{
std::cout << "Hello World" << std::endl;
mapObj* p_mapObj = msNewMapObj();
return 0;
}
At this point I'm stumped on where to proceed next and can use any
help/suggestion.
Hong
More information about the MapServer-users
mailing list