내 통합이 충돌하는 objectify로 테스트하는 이유를 찾을 수 없습니다. 하나씩 실행하거나 디버깅 할 때 문제가 없습니다.개체 화가있는 Junit의 치명적인 오류
이것이 객체 화 코드입니다.
protected void before() throws Throwable {
original = ObjectifyService.factory();
ObjectifyFactory factory = newObjectifyFactory();
for (Class<?> type : register) {
factory.register(type);
}
ObjectifyService.setFactory(factory);
closeable = ObjectifyService.begin();
}
protected void after() {
ObjectifyService.setFactory(original);
closeable.close();
}
일부 테스트 후 러너 스톱과 나는이 메시지를받습니다.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000003, pid=15104, tid=9848
#
# JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000003
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as: Compiled method (nm) 7403 625 n java.lang.Class::isInstance (native) total in heap [0x0000000002b4bf10,0x0000000002b4c2b8] = 936 relocation [0x0000000002b4c030,0x0000000002b4c088] = 88 main code [0x0000000002b4c0a0,0x0000000002b4c2b8] = 536 Compiled method (c2) 7404 752 java.lang.invoke.LambdaForm$NamedFunction::invoke_L_L (28 bytes) total in heap [0x0000000002c38490,0x0000000002c38778] = 744 relocation [enter image description here][1][0x0000000002c385b0,0x0000000002c385d0] = 32 main code [0x0000000002c385e0,0x0000000002c38660] = 128 stub code [0x0000000002c38660,0x0000000002c38698] = 56 oops [0x0000000002c38698,0x0000000002c386a0] = 8 scopes data [0x0000000002c386a0,0x0000000002c386e8] = 72 scopes pcs [0x0000000002c386e8,0x0000000002c38748] = 96 dependencies [0x0000000002c38748,0x0000000002c38750] = 8 handler table [0x0000000002c38750,0x0000000002c38768] = 24 nul chk table [0x0000000002c38768,0x0000000002c38778] = 16
'newObjectifyFactory()'에 대한 코드를 추가 할 수 있습니까? 왜 ? 당신이 새로운 공장을 만들고 여기에 원래 –
에 공장을 재설정에 대한 추론 무엇을하는 것은 코드 : \t 보호 ObjectifyFactory newObjectifyFactory() { \t \t 반환 새로운 ObjectifyFactory(); \t} \t 그러나 이것은 예입니다 나는 연구원에서 문제를 해결하려고 노력했습니다 . 전에 O를 사용하기 전에 bjectifyService.register(); '및'ObjectifyService.begin(); '을 참조하십시오. 충분하지만 오류는 같습니다. –