[mapguide-users] Java MapGuideApi crash calling native code

Jackie Ng jumpinjackie at gmail.com
Wed May 25 08:43:02 PDT 2022


Regarding the source for the "native API". I assume you are referring to
MapGuideJavaApi.dll that the java code is calling through JNI.

The source for that dll is generated at build time by our internal copy of
swig under MgDev/Oem/SwigEx. That is why you can't find this file when
browsing the source repo. If you do a full build of the Web Tier, it will
call SWIG to generate a file called MgApi_wrap.cpp in:

   - MgDev\Web\src\JavaApi - For the JNI wrapper called by MapGuideApi.jar
   - MgDev\Web\src\JavaApiEx -  For the JNI wrapper called
   by MapGuideApiEx.jar

Hope that helps.

- Jackie

You wrote:

Hi All,
we interface MapGuide via java wrapper (MapGuideApi.jar) that uses JNI calls to
execute the native functions.

Since we moved from
    MapGuide 2.5.2
    Java 7
to
    MapGuide 3.1.2
    Java 8
we are experiencing crashes of our application.
Looking into the generated dump we saw that the crashes are due to an
EXCEPTION_ACCESS_VIOLATION raised during calls requested by the Finalizer
thread on Mg* classes.
The Finalizer thread calls the finalize() function that calls the native
function and that function does the access violation operation.
Does anybody experienced these kind of problems?
Also, we were not able to find the source of the native API into the source
repository, is it available so that we can check what is going on?

Thanks in advance,
Roberto



-- 
*Please Note: I no longer create new posts or post replies to any OSGeo
mailing list through nabble. As a result, you most likely won't see this
message appear on nabble's view of any OSGeo mailing list and may only see
this message through mailing list archives or depending on your mailing
list subscription settings, through daily message digests or automated
notifications from the mailing lists.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20220526/a70966ce/attachment.htm>


More information about the mapguide-users mailing list