首页 \ 问答 \ 执行任何IO / Streams时,C ++ JNI崩溃/挂起(C++ JNI crashes/hangs when doing any IO/Streams)

执行任何IO / Streams时,C ++ JNI崩溃/挂起(C++ JNI crashes/hangs when doing any IO/Streams)

在尝试编译要在JAVA端使用的C ++代码时,我似乎遇到了一个大问题。 当我尝试做任何IO / Stream / Manipulation相关的事情时,JVM似乎崩溃了。

有时,就像我运行应用程序时每10次一样,JNI 100%使用所有IO内容。 然后其余时间JVM崩溃或挂起。

我正在使用: Windows 10 x64,JAVA jdk1.8.0_102,Netbeans 8.1,g ++,附加选项:-D__int64 = int64_t

当我这样做时,JNI工作正常:

JNIEXPORT jstring JNICALL Java_Main_nativePrint
  (JNIEnv *env, jobject)
{
    return env->NewStringUTF("HELLO");
}

JNIEXPORT jstring JNICALL Java_Main_nativePrint
  (JNIEnv *env, jobject)
{
    double var = std::sqrt(100);
    return env->NewStringUTF("HELLO");
}

当我尝试合并诸如printfstd::stringstreamsprintfcoutputs ,JVM崩溃了。 甚至实例化std::stringstream似乎让我崩溃了。 我假设其他类型的操作函数也让我崩溃:

Java_Main_nativePrint(JNIEnv *env, jobject instance)
{
    int variable = 100;
    char str[15];

    //CRASHES ON HERE
    sprintf(str, "%d", variable);
    //CRASHES ON HERE IF ABOVE COMMENTED OUT OR USING ANOTHER CHAR ARRAY.
    puts(str); //CRASHES ON HERE

    return env->NewStringUTF(str);
}

JNIEXPORT jstring JNICALL Java_Main_nativePrint
  (JNIEnv *env, jobject)
{
    double res = std::sqrt(100);

    //CRASHES HERE ON INSTANTATION OF stringstream
    std::stringstream ss;
    //ss << std::sqrt(100);
    //const char* str = ss.str().c_str();

    return env->NewStringUTF("HELLO");
}

我似乎对这个人有类似的问题:

带有c ++的JNI不断崩溃cout,printf和方法调用

这是我的转储:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180117a37, pid=6064, tid=0x0000000000002e40
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [cygwin1.dll+0xd7a37]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x0000000002e70800):  JavaThread "main" [_thread_in_native, id=11840, stack(0x0000000002d70000,0x0000000002e70000)]

siginfo: ExceptionCode=0xc0000005, writing address 0x0000000000000000

Registers:
RAX=0x0000000000000000, RBX=0x0000000002e6f328, RCX=0x00000003fec8bfe0, RDX=0x00000003fec5ee60
RSP=0x0000000002e6f100, RBP=0x0000000000000018, RSI=0x0000000002e6f258, RDI=0x0000000002f7835d
R8 =0x0000000002e6f298, R9 =0x0000000002d67610, R10=0x0000000002e70000, R11=0x00000003fec5ee08
R12=0x0000000000000000, R13=0x000000001bf903f0, R14=0x0000000002e6f420, R15=0x0000000002e70800
RIP=0x0000000180117a37, EFLAGS=0x0000000000010202

Top of Stack: (sp=0x0000000002e6f100)
0x0000000002e6f100:   00000001800f0390 0000000180117a4b
0x0000000002e6f110:   0000000002d6eee0 0000000002d6eee8
0x0000000002e6f120:   0000000002e70800 000000005b94a34e
0x0000000002e6f130:   0000000002e6f328 00000003fec62d16
0x0000000002e6f140:   000000005bd50088 0000005000000000
0x0000000002e6f150:   0000000000000015 0000000000000000
0x0000000002e6f160:   0000000002e6f1f0 0000000002e6f258
0x0000000002e6f170:   0000000002f7835d 00000003fec58d59
0x0000000002e6f180:   0000000000000000 0000000000000100
0x0000000002e6f190:   0000000000000002 0000000002d6ebf0
0x0000000002e6f1a0:   0000000002e70800 000000001bf903f0
0x0000000002e6f1b0:   0000000020200021 0000000002f7835d
0x0000000002e6f1c0:   0000000002e6f250 00000005c9f710e4
0x0000000002e6f1d0:   0000000000000010 0000000000000008
0x0000000002e6f1e0:   0000000002e70800 0000000002f93b63
0x0000000002e6f1f0:   000000001bf903f0 0000000002e70800 

Instructions: (pc=0x0000000180117a37)
0x0000000180117a17:   04 f3 90 eb e3 48 c7 c0 08 00 00 00 49 0f c1 82
0x0000000180117a27:   50 e4 ff ff 4c 8d 1d 19 00 00 00 4c 87 5c 24 08
0x0000000180117a37:   4c 89 18 41 ff 82 44 e4 ff ff 41 ff 8a 4c e4 ff
0x0000000180117a47:   ff 58 ff e0 65 4c 8b 14 25 08 00 00 00 41 bb 01 


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x0000000002e6f328 is pointing into the stack for thread: 0x0000000002e70800
RCX=0x00000003fec8bfe0 is an unknown value
RDX=0x00000003fec5ee60 is an unknown value
RSP=0x0000000002e6f100 is pointing into the stack for thread: 0x0000000002e70800
RBP=0x0000000000000018 is an unknown value
RSI=0x0000000002e6f258 is pointing into the stack for thread: 0x0000000002e70800
RDI=0x0000000002f7835d is at code_begin+2301 in an Interpreter codelet
invoke return entry points  [0x0000000002f77a60, 0x0000000002f78440]  2528 bytes
R8 =0x0000000002e6f298 is pointing into the stack for thread: 0x0000000002e70800
R9 =0x0000000002d67610 is an unknown value
R10=0x0000000002e70000 is pointing into the stack for thread: 0x0000000002e70800
R11=0x00000003fec5ee08 is an unknown value
R12=0x0000000000000000 is an unknown value
R13={method} {0x000000001bf903f8} 'nativePrint' '()Ljava/lang/String;' in 'Main'
R14=0x0000000002e6f420 is pointing into the stack for thread: 0x0000000002e70800
R15=0x0000000002e70800 is a thread


Stack: [0x0000000002d70000,0x0000000002e70000],  sp=0x0000000002e6f100,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [cygwin1.dll+0xd7a37]
C  [cygwin1.dll+0xb038f]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  Main.nativePrint()Ljava/lang/String;+0
j  Main.main([Ljava/lang/String;)V+18
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000001dea8800 JavaThread "Service Thread" daemon [_thread_blocked, id=3408, stack(0x000000001e280000,0x000000001e380000)]
  0x000000001c538800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=5372, stack(0x000000001dd80000,0x000000001de80000)]
  0x000000001c535800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=5400, stack(0x000000001dc80000,0x000000001dd80000)]
  0x000000001c531000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=5124, stack(0x000000001db80000,0x000000001dc80000)]
  0x000000001c52f000 JavaThread "Attach Listener" daemon [_thread_blocked, id=2432, stack(0x000000001da80000,0x000000001db80000)]
  0x000000001c52e000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=336, stack(0x000000001d980000,0x000000001da80000)]
  0x0000000002f6a800 JavaThread "Finalizer" daemon [_thread_blocked, id=11892, stack(0x000000001d7a0000,0x000000001d8a0000)]
  0x0000000002f61000 JavaThread "Reference Handler" daemon [_thread_blocked, id=11932, stack(0x000000001d6a0000,0x000000001d7a0000)]
=>0x0000000002e70800 JavaThread "main" [_thread_in_native, id=11840, stack(0x0000000002d70000,0x0000000002e70000)]

Other Threads:
  0x000000001c4f8000 VMThread [stack: 0x000000001d5a0000,0x000000001d6a0000] [id=13280]
  0x000000001ded3000 WatcherThread [stack: 0x000000001e380000,0x000000001e480000] [id=11656]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 76288K, used 2621K [0x000000076b500000, 0x0000000770a00000, 0x00000007c0000000)
  eden space 65536K, 4% used [0x000000076b500000,0x000000076b78f5e8,0x000000076f500000)
  from space 10752K, 0% used [0x000000076ff80000,0x000000076ff80000,0x0000000770a00000)
  to   space 10752K, 0% used [0x000000076f500000,0x000000076f500000,0x000000076ff80000)
 ParOldGen       total 175104K, used 0K [0x00000006c1e00000, 0x00000006cc900000, 0x000000076b500000)
  object space 175104K, 0% used [0x00000006c1e00000,0x00000006c1e00000,0x00000006cc900000)
 Metaspace       used 2586K, capacity 4486K, committed 4864K, reserved 1056768K
  class space    used 282K, capacity 386K, committed 512K, reserved 1048576K

Card table byte_map: [0x0000000012330000,0x0000000012b30000] byte_map_base: 0x000000000ed21000

Marking Bits: (ParMarkBitMap*) 0x000000005bf8a6c0
 Begin Bits: [0x0000000013480000, 0x0000000017408000)
 End Bits:   [0x0000000017408000, 0x000000001b390000)

Polling page: 0x0000000002c00000

CodeCache: size=245760Kb used=1102Kb max_used=1105Kb free=244657Kb
 bounds [0x0000000002f70000, 0x00000000031e0000, 0x0000000011f70000]
 total_blobs=254 nmethods=23 adapters=145
 compilation: enabled

Compilation events (10 events):
Event: 0.060 Thread 0x000000001c538800   18  s    3       java.lang.StringBuffer::append (13 bytes)
Event: 0.060 Thread 0x000000001c535800   20       4       java.lang.String::charAt (29 bytes)
Event: 0.060 Thread 0x000000001c538800 nmethod 18 0x0000000003080210 code [0x00000000030803c0, 0x0000000003080af8]
Event: 0.060 Thread 0x000000001c538800   21       3       java.lang.AbstractStringBuilder::append (50 bytes)
Event: 0.061 Thread 0x000000001c538800 nmethod 21 0x0000000003080ed0 code [0x00000000030810a0, 0x00000000030817f8]
Event: 0.061 Thread 0x000000001c538800   22       3       java.lang.String::indexOf (7 bytes)
Event: 0.061 Thread 0x000000001c535800 nmethod 20 0x00000000030847d0 code [0x0000000003084920, 0x00000000030849f8]
Event: 0.061 Thread 0x000000001c538800 nmethod 22 0x00000000030843d0 code [0x0000000003084540, 0x0000000003084748]
Event: 0.064 Thread 0x000000001c538800   23       3       java.util.Arrays::copyOfRange (63 bytes)
Event: 0.064 Thread 0x000000001c538800 nmethod 23 0x0000000003082950 code [0x0000000003082b60, 0x0000000003083698]

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (2 events):
Event: 0.025 Thread 0x0000000002e70800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x000000076b507c78) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u102\7268\hotspot\s�4�B��?
Event: 0.025 Thread 0x0000000002e70800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x000000076b507f60) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u102\7268\hotspot\src\share\vm\prims\

Events (10 events):
Event: 0.063 loading class java/security/UnresolvedPermission
Event: 0.063 loading class java/security/UnresolvedPermission done
Event: 0.064 loading class java/security/BasicPermissionCollection
Event: 0.064 loading class java/security/BasicPermissionCollection done
Event: 0.064 loading class sun/launcher/LauncherHelper$FXHelper
Event: 0.064 loading class sun/launcher/LauncherHelper$FXHelper done
Event: 0.064 loading class java/lang/Class$MethodArray
Event: 0.064 loading class java/lang/Class$MethodArray done
Event: 0.064 loading class java/lang/Void
Event: 0.064 loading class java/lang/Void done


Dynamic libraries:
0x00007ff77e020000 - 0x00007ff77e057000     C:\Program Files\Java\jdk1.8.0_102\bin\java.exe
0x00007ffb13b20000 - 0x00007ffb13ce1000     C:\Windows\SYSTEM32\ntdll.dll
0x00007ffb13110000 - 0x00007ffb131bd000     C:\Windows\system32\KERNEL32.DLL
0x00007ffb10220000 - 0x00007ffb10408000     C:\Windows\system32\KERNELBASE.dll
0x00007ffb13910000 - 0x00007ffb139b7000     C:\Windows\system32\ADVAPI32.dll
0x00007ffb13870000 - 0x00007ffb1390d000     C:\Windows\system32\msvcrt.dll
0x00007ffb12d30000 - 0x00007ffb12d8b000     C:\Windows\system32\sechost.dll
0x00007ffb12f80000 - 0x00007ffb1309c000     C:\Windows\system32\RPCRT4.dll
0x00007ffb13390000 - 0x00007ffb134e6000     C:\Windows\system32\USER32.dll
0x00007ffb12df0000 - 0x00007ffb12f76000     C:\Windows\system32\GDI32.dll
0x00007ffb0bbb0000 - 0x00007ffb0be24000     C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.589_none_a2ddb3caa539acce\COMCTL32.dll
0x00007ffb10ff0000 - 0x00007ffb1126d000     C:\Windows\system32\combase.dll
0x00007ffb10600000 - 0x00007ffb1066a000     C:\Windows\system32\bcryptPrimitives.dll
0x00007ffb13ad0000 - 0x00007ffb13b0b000     C:\Windows\system32\IMM32.DLL
0x000000005b690000 - 0x000000005b761000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\msvcr100.dll
0x000000005b770000 - 0x000000005c00a000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\server\jvm.dll
0x00007ffb13b10000 - 0x00007ffb13b18000     C:\Windows\system32\PSAPI.DLL
0x00007ffb0bee0000 - 0x00007ffb0beea000     C:\Windows\SYSTEM32\VERSION.dll
0x00007ffb0cf30000 - 0x00007ffb0cf39000     C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffb0e7e0000 - 0x00007ffb0e803000     C:\Windows\SYSTEM32\WINMM.dll
0x00007ffb134f0000 - 0x00007ffb1355b000     C:\Windows\system32\WS2_32.dll
0x0000000002c40000 - 0x0000000002c6c000     C:\Windows\SYSTEM32\WINMMBASE.dll
0x00007ffb101d0000 - 0x00007ffb10213000     C:\Windows\system32\cfgmgr32.dll
0x000000005cd10000 - 0x000000005cd1f000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\verify.dll
0x000000005cad0000 - 0x000000005caf9000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\java.dll
0x000000005ccf0000 - 0x000000005cd06000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\zip.dll
0x00007ffb116c0000 - 0x00007ffb12c1c000     C:\Windows\system32\SHELL32.dll
0x00007ffb10840000 - 0x00007ffb10e85000     C:\Windows\system32\windows.storage.dll
0x00007ffb13330000 - 0x00007ffb13382000     C:\Windows\system32\shlwapi.dll
0x00007ffb10170000 - 0x00007ffb1017f000     C:\Windows\system32\kernel.appcore.dll
0x00007ffb10430000 - 0x00007ffb104e5000     C:\Windows\system32\shcore.dll
0x00007ffb10180000 - 0x00007ffb101cb000     C:\Windows\system32\powrprof.dll
0x00007ffb10140000 - 0x00007ffb10154000     C:\Windows\system32\profapi.dll
0x00000005c9f70000 - 0x00000005c9f88000     C:\Users\Moe\Desktop\Projects\IntelligentCloud\IntelligentCloudLibrary\build\libs\main\shared\main.dll
0x00000003ff750000 - 0x00000003ff76a000     C:\cygwin64\bin\cyggcc_s-seh-1.dll
0x00000003febd0000 - 0x00000003fed22000     C:\cygwin64\bin\cygstdc++-6.dll
0x0000000180040000 - 0x0000000180610000     C:\cygwin64\bin\cygwin1.dll
0x00007ffb0cb00000 - 0x00007ffb0cc8c000     C:\Windows\SYSTEM32\dbghelp.dll

VM Arguments:
jvm_args: -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant 
java_command: Main
java_class_path (initial): C:\Users\Moe\Desktop\Projects\IntelligentCloud\IntelligentCloudApp\build\classes\main;C:\Users\Moe\Desktop\Projects\IntelligentCloud\IntelligentCloudApp\build\resources\main
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102
PATH=C:\cygwin64\bin;C:\\PROGRA~1\\rti_connext_dds-5.2.3\;C:\\PROGRA~1\\rti_connext_dds-5.2.3\\bin;C:\Program Files\ArrayFire\v3\lib;C:\Program Files\Java\jdk1.8.0_102\bin
USERNAME=Moe
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 10.0 , 64 bit Build 10586 (10.0.10586.589)

CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 94 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, tsc, tscinvbit, bmi1, bmi2, adx

Memory: 4k page, physical 16647436k(9117744k free), swap 19137804k(9821056k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.102-b14) for windows-amd64 JRE (1.8.0_102-b14), built on Jun 22 2016 13:15:21 by "java_re" with MS VC++ 10.0 (VS2010)

time: Mon Sep 26 13:31:32 2016
elapsed time: 0 seconds (0d 0h 0m 0s)

I seem to have a big problem when trying to compile C++ code to use on the JAVA side. When I try to do anything IO/Stream/Manipulation related, the JVM seems to crash.

Sometimes, like once every 10 times when I run the application, the JNI works 100% with all the IO stuff. Then the rest of the times the JVM crashes or hangs.

I'm using: Windows 10 x64, JAVA jdk1.8.0_102, Netbeans 8.1, g++, additional options: -D__int64=int64_t

When I do these, the JNI works fine:

JNIEXPORT jstring JNICALL Java_Main_nativePrint
  (JNIEnv *env, jobject)
{
    return env->NewStringUTF("HELLO");
}

JNIEXPORT jstring JNICALL Java_Main_nativePrint
  (JNIEnv *env, jobject)
{
    double var = std::sqrt(100);
    return env->NewStringUTF("HELLO");
}

When I try incorporating anything such as printf, std::stringstream, sprintf, cout, or puts, the JVM crashes. Even instantiating the std::stringstream seems to crash me. I assume other sorts of manipulation function also crashes me:

Java_Main_nativePrint(JNIEnv *env, jobject instance)
{
    int variable = 100;
    char str[15];

    //CRASHES ON HERE
    sprintf(str, "%d", variable);
    //CRASHES ON HERE IF ABOVE COMMENTED OUT OR USING ANOTHER CHAR ARRAY.
    puts(str); //CRASHES ON HERE

    return env->NewStringUTF(str);
}

JNIEXPORT jstring JNICALL Java_Main_nativePrint
  (JNIEnv *env, jobject)
{
    double res = std::sqrt(100);

    //CRASHES HERE ON INSTANTATION OF stringstream
    std::stringstream ss;
    //ss << std::sqrt(100);
    //const char* str = ss.str().c_str();

    return env->NewStringUTF("HELLO");
}

I seem to be having a similar problem to this person:

JNI with c++ keeps crashing on cout, printf and method calls

Here's my dump:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180117a37, pid=6064, tid=0x0000000000002e40
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [cygwin1.dll+0xd7a37]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x0000000002e70800):  JavaThread "main" [_thread_in_native, id=11840, stack(0x0000000002d70000,0x0000000002e70000)]

siginfo: ExceptionCode=0xc0000005, writing address 0x0000000000000000

Registers:
RAX=0x0000000000000000, RBX=0x0000000002e6f328, RCX=0x00000003fec8bfe0, RDX=0x00000003fec5ee60
RSP=0x0000000002e6f100, RBP=0x0000000000000018, RSI=0x0000000002e6f258, RDI=0x0000000002f7835d
R8 =0x0000000002e6f298, R9 =0x0000000002d67610, R10=0x0000000002e70000, R11=0x00000003fec5ee08
R12=0x0000000000000000, R13=0x000000001bf903f0, R14=0x0000000002e6f420, R15=0x0000000002e70800
RIP=0x0000000180117a37, EFLAGS=0x0000000000010202

Top of Stack: (sp=0x0000000002e6f100)
0x0000000002e6f100:   00000001800f0390 0000000180117a4b
0x0000000002e6f110:   0000000002d6eee0 0000000002d6eee8
0x0000000002e6f120:   0000000002e70800 000000005b94a34e
0x0000000002e6f130:   0000000002e6f328 00000003fec62d16
0x0000000002e6f140:   000000005bd50088 0000005000000000
0x0000000002e6f150:   0000000000000015 0000000000000000
0x0000000002e6f160:   0000000002e6f1f0 0000000002e6f258
0x0000000002e6f170:   0000000002f7835d 00000003fec58d59
0x0000000002e6f180:   0000000000000000 0000000000000100
0x0000000002e6f190:   0000000000000002 0000000002d6ebf0
0x0000000002e6f1a0:   0000000002e70800 000000001bf903f0
0x0000000002e6f1b0:   0000000020200021 0000000002f7835d
0x0000000002e6f1c0:   0000000002e6f250 00000005c9f710e4
0x0000000002e6f1d0:   0000000000000010 0000000000000008
0x0000000002e6f1e0:   0000000002e70800 0000000002f93b63
0x0000000002e6f1f0:   000000001bf903f0 0000000002e70800 

Instructions: (pc=0x0000000180117a37)
0x0000000180117a17:   04 f3 90 eb e3 48 c7 c0 08 00 00 00 49 0f c1 82
0x0000000180117a27:   50 e4 ff ff 4c 8d 1d 19 00 00 00 4c 87 5c 24 08
0x0000000180117a37:   4c 89 18 41 ff 82 44 e4 ff ff 41 ff 8a 4c e4 ff
0x0000000180117a47:   ff 58 ff e0 65 4c 8b 14 25 08 00 00 00 41 bb 01 


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x0000000002e6f328 is pointing into the stack for thread: 0x0000000002e70800
RCX=0x00000003fec8bfe0 is an unknown value
RDX=0x00000003fec5ee60 is an unknown value
RSP=0x0000000002e6f100 is pointing into the stack for thread: 0x0000000002e70800
RBP=0x0000000000000018 is an unknown value
RSI=0x0000000002e6f258 is pointing into the stack for thread: 0x0000000002e70800
RDI=0x0000000002f7835d is at code_begin+2301 in an Interpreter codelet
invoke return entry points  [0x0000000002f77a60, 0x0000000002f78440]  2528 bytes
R8 =0x0000000002e6f298 is pointing into the stack for thread: 0x0000000002e70800
R9 =0x0000000002d67610 is an unknown value
R10=0x0000000002e70000 is pointing into the stack for thread: 0x0000000002e70800
R11=0x00000003fec5ee08 is an unknown value
R12=0x0000000000000000 is an unknown value
R13={method} {0x000000001bf903f8} 'nativePrint' '()Ljava/lang/String;' in 'Main'
R14=0x0000000002e6f420 is pointing into the stack for thread: 0x0000000002e70800
R15=0x0000000002e70800 is a thread


Stack: [0x0000000002d70000,0x0000000002e70000],  sp=0x0000000002e6f100,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [cygwin1.dll+0xd7a37]
C  [cygwin1.dll+0xb038f]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  Main.nativePrint()Ljava/lang/String;+0
j  Main.main([Ljava/lang/String;)V+18
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000001dea8800 JavaThread "Service Thread" daemon [_thread_blocked, id=3408, stack(0x000000001e280000,0x000000001e380000)]
  0x000000001c538800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=5372, stack(0x000000001dd80000,0x000000001de80000)]
  0x000000001c535800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=5400, stack(0x000000001dc80000,0x000000001dd80000)]
  0x000000001c531000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=5124, stack(0x000000001db80000,0x000000001dc80000)]
  0x000000001c52f000 JavaThread "Attach Listener" daemon [_thread_blocked, id=2432, stack(0x000000001da80000,0x000000001db80000)]
  0x000000001c52e000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=336, stack(0x000000001d980000,0x000000001da80000)]
  0x0000000002f6a800 JavaThread "Finalizer" daemon [_thread_blocked, id=11892, stack(0x000000001d7a0000,0x000000001d8a0000)]
  0x0000000002f61000 JavaThread "Reference Handler" daemon [_thread_blocked, id=11932, stack(0x000000001d6a0000,0x000000001d7a0000)]
=>0x0000000002e70800 JavaThread "main" [_thread_in_native, id=11840, stack(0x0000000002d70000,0x0000000002e70000)]

Other Threads:
  0x000000001c4f8000 VMThread [stack: 0x000000001d5a0000,0x000000001d6a0000] [id=13280]
  0x000000001ded3000 WatcherThread [stack: 0x000000001e380000,0x000000001e480000] [id=11656]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 76288K, used 2621K [0x000000076b500000, 0x0000000770a00000, 0x00000007c0000000)
  eden space 65536K, 4% used [0x000000076b500000,0x000000076b78f5e8,0x000000076f500000)
  from space 10752K, 0% used [0x000000076ff80000,0x000000076ff80000,0x0000000770a00000)
  to   space 10752K, 0% used [0x000000076f500000,0x000000076f500000,0x000000076ff80000)
 ParOldGen       total 175104K, used 0K [0x00000006c1e00000, 0x00000006cc900000, 0x000000076b500000)
  object space 175104K, 0% used [0x00000006c1e00000,0x00000006c1e00000,0x00000006cc900000)
 Metaspace       used 2586K, capacity 4486K, committed 4864K, reserved 1056768K
  class space    used 282K, capacity 386K, committed 512K, reserved 1048576K

Card table byte_map: [0x0000000012330000,0x0000000012b30000] byte_map_base: 0x000000000ed21000

Marking Bits: (ParMarkBitMap*) 0x000000005bf8a6c0
 Begin Bits: [0x0000000013480000, 0x0000000017408000)
 End Bits:   [0x0000000017408000, 0x000000001b390000)

Polling page: 0x0000000002c00000

CodeCache: size=245760Kb used=1102Kb max_used=1105Kb free=244657Kb
 bounds [0x0000000002f70000, 0x00000000031e0000, 0x0000000011f70000]
 total_blobs=254 nmethods=23 adapters=145
 compilation: enabled

Compilation events (10 events):
Event: 0.060 Thread 0x000000001c538800   18  s    3       java.lang.StringBuffer::append (13 bytes)
Event: 0.060 Thread 0x000000001c535800   20       4       java.lang.String::charAt (29 bytes)
Event: 0.060 Thread 0x000000001c538800 nmethod 18 0x0000000003080210 code [0x00000000030803c0, 0x0000000003080af8]
Event: 0.060 Thread 0x000000001c538800   21       3       java.lang.AbstractStringBuilder::append (50 bytes)
Event: 0.061 Thread 0x000000001c538800 nmethod 21 0x0000000003080ed0 code [0x00000000030810a0, 0x00000000030817f8]
Event: 0.061 Thread 0x000000001c538800   22       3       java.lang.String::indexOf (7 bytes)
Event: 0.061 Thread 0x000000001c535800 nmethod 20 0x00000000030847d0 code [0x0000000003084920, 0x00000000030849f8]
Event: 0.061 Thread 0x000000001c538800 nmethod 22 0x00000000030843d0 code [0x0000000003084540, 0x0000000003084748]
Event: 0.064 Thread 0x000000001c538800   23       3       java.util.Arrays::copyOfRange (63 bytes)
Event: 0.064 Thread 0x000000001c538800 nmethod 23 0x0000000003082950 code [0x0000000003082b60, 0x0000000003083698]

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (2 events):
Event: 0.025 Thread 0x0000000002e70800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x000000076b507c78) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u102\7268\hotspot\s�4�B��?
Event: 0.025 Thread 0x0000000002e70800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x000000076b507f60) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u102\7268\hotspot\src\share\vm\prims\

Events (10 events):
Event: 0.063 loading class java/security/UnresolvedPermission
Event: 0.063 loading class java/security/UnresolvedPermission done
Event: 0.064 loading class java/security/BasicPermissionCollection
Event: 0.064 loading class java/security/BasicPermissionCollection done
Event: 0.064 loading class sun/launcher/LauncherHelper$FXHelper
Event: 0.064 loading class sun/launcher/LauncherHelper$FXHelper done
Event: 0.064 loading class java/lang/Class$MethodArray
Event: 0.064 loading class java/lang/Class$MethodArray done
Event: 0.064 loading class java/lang/Void
Event: 0.064 loading class java/lang/Void done


Dynamic libraries:
0x00007ff77e020000 - 0x00007ff77e057000     C:\Program Files\Java\jdk1.8.0_102\bin\java.exe
0x00007ffb13b20000 - 0x00007ffb13ce1000     C:\Windows\SYSTEM32\ntdll.dll
0x00007ffb13110000 - 0x00007ffb131bd000     C:\Windows\system32\KERNEL32.DLL
0x00007ffb10220000 - 0x00007ffb10408000     C:\Windows\system32\KERNELBASE.dll
0x00007ffb13910000 - 0x00007ffb139b7000     C:\Windows\system32\ADVAPI32.dll
0x00007ffb13870000 - 0x00007ffb1390d000     C:\Windows\system32\msvcrt.dll
0x00007ffb12d30000 - 0x00007ffb12d8b000     C:\Windows\system32\sechost.dll
0x00007ffb12f80000 - 0x00007ffb1309c000     C:\Windows\system32\RPCRT4.dll
0x00007ffb13390000 - 0x00007ffb134e6000     C:\Windows\system32\USER32.dll
0x00007ffb12df0000 - 0x00007ffb12f76000     C:\Windows\system32\GDI32.dll
0x00007ffb0bbb0000 - 0x00007ffb0be24000     C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.589_none_a2ddb3caa539acce\COMCTL32.dll
0x00007ffb10ff0000 - 0x00007ffb1126d000     C:\Windows\system32\combase.dll
0x00007ffb10600000 - 0x00007ffb1066a000     C:\Windows\system32\bcryptPrimitives.dll
0x00007ffb13ad0000 - 0x00007ffb13b0b000     C:\Windows\system32\IMM32.DLL
0x000000005b690000 - 0x000000005b761000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\msvcr100.dll
0x000000005b770000 - 0x000000005c00a000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\server\jvm.dll
0x00007ffb13b10000 - 0x00007ffb13b18000     C:\Windows\system32\PSAPI.DLL
0x00007ffb0bee0000 - 0x00007ffb0beea000     C:\Windows\SYSTEM32\VERSION.dll
0x00007ffb0cf30000 - 0x00007ffb0cf39000     C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffb0e7e0000 - 0x00007ffb0e803000     C:\Windows\SYSTEM32\WINMM.dll
0x00007ffb134f0000 - 0x00007ffb1355b000     C:\Windows\system32\WS2_32.dll
0x0000000002c40000 - 0x0000000002c6c000     C:\Windows\SYSTEM32\WINMMBASE.dll
0x00007ffb101d0000 - 0x00007ffb10213000     C:\Windows\system32\cfgmgr32.dll
0x000000005cd10000 - 0x000000005cd1f000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\verify.dll
0x000000005cad0000 - 0x000000005caf9000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\java.dll
0x000000005ccf0000 - 0x000000005cd06000     C:\Program Files\Java\jdk1.8.0_102\jre\bin\zip.dll
0x00007ffb116c0000 - 0x00007ffb12c1c000     C:\Windows\system32\SHELL32.dll
0x00007ffb10840000 - 0x00007ffb10e85000     C:\Windows\system32\windows.storage.dll
0x00007ffb13330000 - 0x00007ffb13382000     C:\Windows\system32\shlwapi.dll
0x00007ffb10170000 - 0x00007ffb1017f000     C:\Windows\system32\kernel.appcore.dll
0x00007ffb10430000 - 0x00007ffb104e5000     C:\Windows\system32\shcore.dll
0x00007ffb10180000 - 0x00007ffb101cb000     C:\Windows\system32\powrprof.dll
0x00007ffb10140000 - 0x00007ffb10154000     C:\Windows\system32\profapi.dll
0x00000005c9f70000 - 0x00000005c9f88000     C:\Users\Moe\Desktop\Projects\IntelligentCloud\IntelligentCloudLibrary\build\libs\main\shared\main.dll
0x00000003ff750000 - 0x00000003ff76a000     C:\cygwin64\bin\cyggcc_s-seh-1.dll
0x00000003febd0000 - 0x00000003fed22000     C:\cygwin64\bin\cygstdc++-6.dll
0x0000000180040000 - 0x0000000180610000     C:\cygwin64\bin\cygwin1.dll
0x00007ffb0cb00000 - 0x00007ffb0cc8c000     C:\Windows\SYSTEM32\dbghelp.dll

VM Arguments:
jvm_args: -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant 
java_command: Main
java_class_path (initial): C:\Users\Moe\Desktop\Projects\IntelligentCloud\IntelligentCloudApp\build\classes\main;C:\Users\Moe\Desktop\Projects\IntelligentCloud\IntelligentCloudApp\build\resources\main
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102
PATH=C:\cygwin64\bin;C:\\PROGRA~1\\rti_connext_dds-5.2.3\;C:\\PROGRA~1\\rti_connext_dds-5.2.3\\bin;C:\Program Files\ArrayFire\v3\lib;C:\Program Files\Java\jdk1.8.0_102\bin
USERNAME=Moe
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 10.0 , 64 bit Build 10586 (10.0.10586.589)

CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 94 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, tsc, tscinvbit, bmi1, bmi2, adx

Memory: 4k page, physical 16647436k(9117744k free), swap 19137804k(9821056k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.102-b14) for windows-amd64 JRE (1.8.0_102-b14), built on Jun 22 2016 13:15:21 by "java_re" with MS VC++ 10.0 (VS2010)

time: Mon Sep 26 13:31:32 2016
elapsed time: 0 seconds (0d 0h 0m 0s)

原文:https://stackoverflow.com/questions/39709501
更新时间:2023-12-10 19:12

最满意答案

至少在我的情况下,似乎使用IDENTITY_H的编码实际上阻止了iText嵌入整个字体。 我将编码改为CP1250,一切都按预期工作。


It appears, at least in my case, that using encoding of IDENTITY_H actually prevented iText from embedding the entire font. I changed encoding to CP1250 and everything worked as expected.

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)