C
cppaddict
I'm running a Java application that uses a native C++ library I've
written. The Java application hits one of the native methods pretty
frequently (about 100 ms or so), and while it usually works fine,
sometimes the program crashes with an error message about the heap.
The method which seems to be causing the problem is very simple, and
does no manual manipulation of the heap. But it does use an iterator.
Could this be the issue?
Other things to note about the error. The "Function=" part references
a function that is NEVER used in my app. The method referenced by the
current Java thread referenced is used, however.
I've renamed the methods below for clarity. Everything else is cut
and pasted from the error output.
Thanks for any help,
cpp
------------------ERROR MESSAGE FOLLOWS---------------------------
The Java method
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred
at PC=0x2C9
0A47
Function=Java_MyClass_methodWhichIsNeverUsedInMyApp+0xA757
Library=C:\myLibrary.dll
Current Java thread:
at MyClass.methodWhichUsesIterator(Native Method)
.......
Heap at VM Abort:
Heap
def new generation total 576K, used 350K [0x10010000, 0x100b0000,
0x104f0000)
eden space 512K, 56% used [0x10010000, 0x10057be0, 0x10090000)
from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000)
to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation total 1408K, used 36K [0x104f0000, 0x10650000,
0x14010000)
the space 1408K, 2% used [0x104f0000, 0x104f91b0, 0x104f9200,
0x10650000)
compacting perm gen total 4096K, used 1186K [0x14010000, 0x14410000,
0x1801000
0)
the space 4096K, 28% used [0x14010000, 0x14138bf0, 0x14138c00,
0x14410000)
written. The Java application hits one of the native methods pretty
frequently (about 100 ms or so), and while it usually works fine,
sometimes the program crashes with an error message about the heap.
The method which seems to be causing the problem is very simple, and
does no manual manipulation of the heap. But it does use an iterator.
Could this be the issue?
Other things to note about the error. The "Function=" part references
a function that is NEVER used in my app. The method referenced by the
current Java thread referenced is used, however.
I've renamed the methods below for clarity. Everything else is cut
and pasted from the error output.
Thanks for any help,
cpp
------------------ERROR MESSAGE FOLLOWS---------------------------
The Java method
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred
at PC=0x2C9
0A47
Function=Java_MyClass_methodWhichIsNeverUsedInMyApp+0xA757
Library=C:\myLibrary.dll
Current Java thread:
at MyClass.methodWhichUsesIterator(Native Method)
.......
Heap at VM Abort:
Heap
def new generation total 576K, used 350K [0x10010000, 0x100b0000,
0x104f0000)
eden space 512K, 56% used [0x10010000, 0x10057be0, 0x10090000)
from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000)
to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation total 1408K, used 36K [0x104f0000, 0x10650000,
0x14010000)
the space 1408K, 2% used [0x104f0000, 0x104f91b0, 0x104f9200,
0x10650000)
compacting perm gen total 4096K, used 1186K [0x14010000, 0x14410000,
0x1801000
0)
the space 4096K, 28% used [0x14010000, 0x14138bf0, 0x14138c00,
0x14410000)