chromiumembedded / java-cef

Java Chromium Embedded Framework (JCEF). A simple framework for embedding Chromium-based browsers in other applications using the Java programming language.
https://bitbucket.org/chromiumembedded/java-cef
Other
655 stars 147 forks source link

Windows: JVM crashes, when closing detailed.MainFrame Window #226

Closed magreenblatt closed 4 years ago

magreenblatt commented 8 years ago

Original report by michael10 (Bitbucket: michael10, GitHub: michael10).


Installing win32 JCEF Version = 3.2704.0 on Windows 10 Starting MainFrame test: run.bat win32 Release detailed Console logging:

#!cmd
d:\depot\git-repository\java-cef2\src\tools>run.bat win32 Release detailed
Offscreen rendering disabled
Using:
JCEF Version = 3.2704.0
CEF Version = 3.2704.1427
Chromium Version = 51.0.2704.84
CefApp: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path .\jcef_build\native\Release
Added scheme search://
Added scheme client://
CefApp: INITIALIZED
CefApp: SHUTTING_DOWN
  shutdown on Thread[AWT-EventQueue-0,6,main]

Start and close the test multiple times. JVM crashes. run.bat_win32_ Release_detailed.jpg

I get no hs_err_pid log, so I create dump with "jstack". See added logfile.

Following error from VS: Exception Error 0x17DA4B23 (libcef.dll) in java.exe: 0xC0000005: Access violation reading location 0x00000000 on Position 0x00000000

We have also this problems when we integrate JCEF into our framework.

magreenblatt commented 8 years ago

Original comment by Wang Zl (Bitbucket: luciferwzl, GitHub: luciferwzl).


windows64x jdk8_64x

No OSR mode. JVM crashes

case 1: Run a MainFrame Window. Do loop: switch window's Max and Min stauts.

case 2: Run two MainFrame Windows

magreenblatt commented 8 years ago

Original comment by Wang Zl (Bitbucket: luciferwzl, GitHub: luciferwzl).


case 1: err log #

A fatal error has been detected by the Java Runtime Environment:

#

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff824b4e3da, pid=10212, tid=7712

#

JRE version: Java(TM) SE Runtime Environment (8.0_91-b14) (build 1.8.0_91-b14)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.91-b14 mixed mode windows-amd64 compressed oops)

Problematic frame:

C [jcef.dll+0x1e3da]

#

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

#

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

Current thread (0x00000000152ca000): VMThread [stack: 0x0000000016fb0000,0x00000000170b0000] [id=7712]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000000000b0

Registers: RAX=0x0000000000000000, RBX=0x0000000022b62dc0, RCX=0x00000000152ca1f8, RDX=0x00000000196f7e30 RSP=0x00000000170aef50, RBP=0x0000000015155400, RSI=0x0000000022b2f930, RDI=0x0000000022b2f9a0 R8 =0x0000000000000001, R9 =0x0000000000000000, R10=0x00000000170aef98, R11=0x0000000000000064 R12=0x000000000054f920, R13=0x0000000000000040, R14=0x000000000054f980, R15=0x0000000000000001 RIP=0x00007ff824b4e3da, EFLAGS=0x0000000000010202

Top of Stack: (sp=0x00000000170aef50) 0x00000000170aef50: 0000000022b62dc0 (bb) 00007ff80cdb7832 (bb) 0x00000000170aef60: 000000000054f980 (bb) 00007ff84e4b0bf9 (bb) 0x00000000170aef70: fffffffffffffffe (bb) 000000000054f920 (bb) 0x00000000170aef80: 0000000000000001 (bb) 00007ff824b4e48e (bb) 0x00000000170aef90: 000000000054f901 (bb) 00000000152ca1f8 (bb) 0x00000000170aefa0: 0000000022b62dc0 (bb) 000000000054f920 (bb) 0x00000000170aefb0: 0000000022ae8110 (bb) 00007ff824b50ee9 (bb) 0x00000000170aefc0: 0000000022b62dc0 (bb) 00007ff824bfc1d8 (bb) 0x00000000170aefd0: 0000000000000000 (bb) 00007ff84e4b0abd (bb) 0x00000000170aefe0: 0000000022b679f8 (bb) 00007ff824b79272 (bb) 0x00000000170aeff0: 0000000022b679c0 (bb) 00007ff824bfc1d8 (bb) 0x00000000170af000: 0000000000000001 (bb) 0000000023ed1460 (bb) 0x00000000170af010: 0000000022ae80e0 (bb) 00007ff824b7de52 (bb) 0x00000000170af020: 000000000054f980 (bb) 00007ff824bfc1d8 (bb) 0x00000000170af030: 0000000000000001 (bb) 0000000023ed1460 (bb) 0x00000000170af040: 0000000015155400 (bb) 00007ff80cc93320 (bb)

Instructions: (pc=0x00007ff824b4e3da) 0x00007ff824b4e3ba: 48 8d 4c 24 48 e8 ec 7d 00 00 90 85 c0 75 23 48 0x00007ff824b4e3ca: 8b 4c 24 48 48 85 c9 74 19 48 8b 01 48 8b 57 a0 0x00007ff824b4e3da: ff 90 b0 00 00 00 90 48 8d 4c 24 40 e8 15 72 00 0x00007ff824b4e3ea: 00 90 48 8d 4f c8 e8 3b 2b 04 00 90 4c 8b 47 b8

Register to memory mapping:

RAX=0x0000000000000000 is an unknown value RBX=0x0000000022b62dc0 is an unknown value RCX=0x00000000152ca1f8 is an unknown value RDX=0x00000000196f7e30 is a global jni handle RSP=0x00000000170aef50 is an unknown value RBP=0x0000000015155400 is an unknown value RSI=0x0000000022b2f930 is an unknown value RDI=0x0000000022b2f9a0 is an unknown value R8 =0x0000000000000001 is an unknown value R9 =0x0000000000000000 is an unknown value R10=0x00000000170aef98 is an unknown value R11=0x0000000000000064 is an unknown value R12=0x000000000054f920 is an unknown value R13=0x0000000000000040 is an unknown value R14=0x000000000054f980 is an unknown value R15=0x0000000000000001 is an unknown value

Stack: [0x0000000016fb0000,0x00000000170b0000], sp=0x00000000170aef50, free space=1019k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [jcef.dll+0x1e3da] C [jcef.dll+0x1e48e] C [jcef.dll+0x20ee9] C [jcef.dll+0x49272] C [jcef.dll+0x4de52] C [libcef.dll+0x14f3320] C [libcef.dll+0x1540962] C [libcef.dll+0x1540d44] C [libcef.dll+0x154826e] C [libcef.dll+0x14f2326] C [libcef.dll+0x14fa7b8] C [jcef.dll+0x38618] C [jcef.dll+0x3556d] C [jcef.dll+0x35a80] C [jcef.dll+0x85964] C [jcef.dll+0x6d8a7] C [jcef.dll+0x6db4d] C [jcef.dll+0x6d038] C [jcef.dll+0x61beb] C [jcef.dll+0x623ea] C [jcef.dll+0x62506] C [ntdll.dll+0x152c8] C [ntdll.dll+0x5b2ea] C [ntdll.dll+0x5b17a] C [KERNEL32.DLL+0x24d8a] C [msvcr100.dll+0x20ccd] V [jvm.dll+0x211395] V [jvm.dll+0x24a0e7] V [jvm.dll+0x249386] V [jvm.dll+0x249821] V [jvm.dll+0x249a3e] V [jvm.dll+0x29a99a] C [msvcr100.dll+0x21d9f] C [msvcr100.dll+0x21e3b] C [KERNEL32.DLL+0x18102] C [ntdll.dll+0x5c5b4]

VM_Operation (0x00000000022cf110): Exit, mode: safepoint, requested by thread 0x00000000027ad800

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

Java Threads: ( => current thread ) 0x000000001e5d6800 JavaThread "Thread-11" daemon [_thread_in_native, id=10216, stack(0x0000000023480000,0x0000000023580000)] 0x000000001e5d8000 JavaThread "Thread-9" daemon [_thread_in_native, id=11744, stack(0x0000000022980000,0x0000000022a80000)] 0x0000000018910800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=12816, stack(0x0000000021840000,0x0000000021940000)] 0x0000000018915800 JavaThread "AWT-Shutdown" [_thread_blocked, id=10020, stack(0x0000000021740000,0x0000000021840000)] 0x0000000018914000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5728, stack(0x000000001a8a0000,0x000000001a9a0000)] 0x0000000018912800 JavaThread "EMF Reference Cleaner" daemon [_thread_blocked, id=12664, stack(0x000000001a5a0000,0x000000001a6a0000)] 0x00000000172f1000 JavaThread "Service Thread" daemon [_thread_blocked, id=8036, stack(0x0000000018070000,0x0000000018170000)] 0x0000000017268800 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=6220, stack(0x0000000017f70000,0x0000000018070000)] 0x0000000017265000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=10024, stack(0x0000000017e70000,0x0000000017f70000)] 0x0000000017264000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=12312, stack(0x0000000017d70000,0x0000000017e70000)] 0x000000001725b000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=12988, stack(0x0000000017c70000,0x0000000017d70000)] 0x0000000017250800 JavaThread "JDWP Command Reader" daemon [_thread_blocked, id=7808, stack(0x0000000017b70000,0x0000000017c70000)] 0x0000000017249000 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=7060, stack(0x0000000017a70000,0x0000000017b70000)] 0x000000001723e800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=7840, stack(0x0000000017970000,0x0000000017a70000)] 0x0000000017236000 JavaThread "Attach Listener" daemon [_thread_blocked, id=4872, stack(0x0000000017810000,0x0000000017910000)] 0x0000000017235800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=12744, stack(0x0000000017710000,0x0000000017810000)] 0x00000000171d0800 JavaThread "Finalizer" daemon [_thread_blocked, id=9164, stack(0x00000000175b0000,0x00000000176b0000)] 0x0000000002749000 JavaThread "Reference Handler" daemon [_thread_blocked, id=6632, stack(0x00000000170b0000,0x00000000171b0000)] 0x00000000027ad800 JavaThread "main" [_thread_blocked, id=12232, stack(0x00000000021d0000,0x00000000022d0000)]

Other Threads: =>0x00000000152ca000 VMThread [stack: 0x0000000016fb0000,0x00000000170b0000] [id=7712]

VM state:at safepoint (shutting down)

VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) [0x00000000027ac840] Threads_lock - owner thread: 0x00000000152ca000

Heap: PSYoungGen total 93184K, used 40046K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 82432K, 48% used [0x00000000eab00000,0x00000000ed21bb10,0x00000000efb80000) from space 10752K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f4000000) to space 10752K, 0% used [0x00000000f2b00000,0x00000000f2b00000,0x00000000f3580000) ParOldGen total 231424K, used 19216K [0x00000000c0000000, 0x00000000ce200000, 0x00000000eab00000) object space 231424K, 8% used [0x00000000c0000000,0x00000000c12c43a0,0x00000000ce200000) Metaspace used 39826K, capacity 42249K, committed 42496K, reserved 1087488K class space used 4615K, capacity 5356K, committed 5376K, reserved 1048576K

Card table byte_map: [0x0000000011b70000,0x0000000011d80000] byte_map_base: 0x0000000011570000

Marking Bits: (ParMarkBitMap*) 0x00000000716b2f70 Begin Bits: [0x00000000126e0000, 0x00000000136e0000) End Bits: [0x00000000136e0000, 0x00000000146e0000)

Polling page: 0x0000000000a50000

CodeCache: size=245760Kb used=11727Kb max_used=11832Kb free=234032Kb bounds [0x00000000027b0000, 0x0000000003350000, 0x00000000117b0000] total_blobs=4245 nmethods=3130 adapters=1033 compilation: enabled

Compilation events (10 events): Event: 27.463 Thread 0x0000000017268800 nmethod 3200 0x000000000294b210 code [0x000000000294b3c0, 0x000000000294b858] Event: 27.463 Thread 0x0000000017268800 3201 ! 3 org.eclipse.osgi.container.Module::$SWITCH_TABLE$org$eclipse$osgi$container$ModuleContainerAdaptor$ModuleEvent (157 bytes) Event: 27.465 Thread 0x0000000017268800 nmethod 3201 0x00000000028cb210 code [0x00000000028cb400, 0x00000000028cc128] Event: 27.465 Thread 0x0000000017268800 3203 1 org.eclipse.osgi.storage.Storage::getModuleDatabase (5 bytes) Event: 27.465 Thread 0x0000000017268800 nmethod 3203 0x00000000029bef10 code [0x00000000029bf060, 0x00000000029bf170] Event: 27.471 Thread 0x0000000017268800 3205 3 java.lang.reflect.Method::setMethodAccessor (21 bytes) Event: 27.472 Thread 0x0000000017268800 nmethod 3205 0x00000000028bd690 code [0x00000000028bd800, 0x00000000028bdbc8] Event: 27.472 Thread 0x0000000017268800 3204 1 java.lang.reflect.Method::getMethodAccessor (5 bytes) Event: 27.472 Thread 0x0000000017268800 nmethod 3204 0x00000000028d7510 code [0x00000000028d7660, 0x00000000028d7770] Event: 27.476 Thread 0x000000001725b000 nmethod 3192 0x00000000028e37d0 code [0x00000000028e39a0, 0x00000000028e4878]

GC Heap History (8 events): Event: 1.179 GC heap before {Heap before GC invocations=1 (full 0): PSYoungGen total 76288K, used 57728K [0x00000000eab00000, 0x00000000f0000000, 0x0000000100000000) eden space 65536K, 88% used [0x00000000eab00000,0x00000000ee3602b0,0x00000000eeb00000) from space 10752K, 0% used [0x00000000ef580000,0x00000000ef580000,0x00000000f0000000) to space 10752K, 0% used [0x00000000eeb00000,0x00000000eeb00000,0x00000000ef580000) ParOldGen total 175104K, used 0K [0x00000000c0000000, 0x00000000cab00000, 0x00000000eab00000) object space 175104K, 0% used [0x00000000c0000000,0x00000000c0000000,0x00000000cab00000) Metaspace used 19478K, capacity 21226K, committed 21248K, reserved 1067008K class space used 2258K, capacity 2804K, committed 2816K, reserved 1048576K Event: 1.193 GC heap after Heap after GC invocations=1 (full 0): PSYoungGen total 76288K, used 10748K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 65536K, 0% used [0x00000000eab00000,0x00000000eab00000,0x00000000eeb00000) from space 10752K, 99% used [0x00000000eeb00000,0x00000000ef57f2e8,0x00000000ef580000) to space 10752K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f4000000) ParOldGen total 175104K, used 5778K [0x00000000c0000000, 0x00000000cab00000, 0x00000000eab00000) object space 175104K, 3% used [0x00000000c0000000,0x00000000c05a4b28,0x00000000cab00000) Metaspace used 19478K, capacity 21226K, committed 21248K, reserved 1067008K class space used 2258K, capacity 2804K, committed 2816K, reserved 1048576K } Event: 1.193 GC heap before {Heap before GC invocations=2 (full 1): PSYoungGen total 76288K, used 10748K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 65536K, 0% used [0x00000000eab00000,0x00000000eab00000,0x00000000eeb00000) from space 10752K, 99% used [0x00000000eeb00000,0x00000000ef57f2e8,0x00000000ef580000) to space 10752K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f4000000) ParOldGen total 175104K, used 5778K [0x00000000c0000000, 0x00000000cab00000, 0x00000000eab00000) object space 175104K, 3% used [0x00000000c0000000,0x00000000c05a4b28,0x00000000cab00000) Metaspace used 19478K, capacity 21226K, committed 21248K, reserved 1067008K class space used 2258K, capacity 2804K, committed 2816K, reserved 1048576K Event: 1.228 GC heap after Heap after GC invocations=2 (full 1): PSYoungGen total 76288K, used 0K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 65536K, 0% used [0x00000000eab00000,0x00000000eab00000,0x00000000eeb00000) from space 10752K, 0% used [0x00000000eeb00000,0x00000000eeb00000,0x00000000ef580000) to space 10752K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f4000000) ParOldGen total 175104K, used 15981K [0x00000000c0000000, 0x00000000cab00000, 0x00000000eab00000) object space 175104K, 9% used [0x00000000c0000000,0x00000000c0f9b7a8,0x00000000cab00000) Metaspace used 19478K, capacity 21226K, committed 21248K, reserved 1067008K class space used 2258K, capacity 2804K, committed 2816K, reserved 1048576K } Event: 2.152 GC heap before {Heap before GC invocations=3 (full 1): PSYoungGen total 76288K, used 41154K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 65536K, 62% used [0x00000000eab00000,0x00000000ed330838,0x00000000eeb00000) from space 10752K, 0% used [0x00000000eeb00000,0x00000000eeb00000,0x00000000ef580000) to space 10752K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f4000000) ParOldGen total 175104K, used 15981K [0x00000000c0000000, 0x00000000cab00000, 0x00000000eab00000) object space 175104K, 9% used [0x00000000c0000000,0x00000000c0f9b7a8,0x00000000cab00000) Metaspace used 32808K, capacity 35242K, committed 35416K, reserved 1079296K class space used 3999K, capacity 4780K, committed 4864K, reserved 1048576K Event: 2.161 GC heap after Heap after GC invocations=3 (full 1): PSYoungGen total 93184K, used 10747K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 82432K, 0% used [0x00000000eab00000,0x00000000eab00000,0x00000000efb80000) from space 10752K, 99% used [0x00000000f3580000,0x00000000f3ffecc0,0x00000000f4000000) to space 10752K, 0% used [0x00000000f2b00000,0x00000000f2b00000,0x00000000f3580000) ParOldGen total 175104K, used 17241K [0x00000000c0000000, 0x00000000cab00000, 0x00000000eab00000) object space 175104K, 9% used [0x00000000c0000000,0x00000000c10d6678,0x00000000cab00000) Metaspace used 32808K, capacity 35242K, committed 35416K, reserved 1079296K class space used 3999K, capacity 4780K, committed 4864K, reserved 1048576K } Event: 2.161 GC heap before {Heap before GC invocations=4 (full 2): PSYoungGen total 93184K, used 10747K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 82432K, 0% used [0x00000000eab00000,0x00000000eab00000,0x00000000efb80000) from space 10752K, 99% used [0x00000000f3580000,0x00000000f3ffecc0,0x00000000f4000000) to space 10752K, 0% used [0x00000000f2b00000,0x00000000f2b00000,0x00000000f3580000) ParOldGen total 175104K, used 17241K [0x00000000c0000000, 0x00000000cab00000, 0x00000000eab00000) object space 175104K, 9% used [0x00000000c0000000,0x00000000c10d6678,0x00000000cab00000) Metaspace used 32808K, capacity 35242K, committed 35416K, reserved 1079296K class space used 3999K, capacity 4780K, committed 4864K, reserved 1048576K Event: 2.214 GC heap after Heap after GC invocations=4 (full 2): PSYoungGen total 93184K, used 0K [0x00000000eab00000, 0x00000000f4000000, 0x0000000100000000) eden space 82432K, 0% used [0x00000000eab00000,0x00000000eab00000,0x00000000efb80000) from space 10752K, 0% used [0x00000000f3580000,0x00000000f3580000,0x00000000f4000000) to space 10752K, 0% used [0x00000000f2b00000,0x00000000f2b00000,0x00000000f3580000) ParOldGen total 231424K, used 19216K [0x00000000c0000000, 0x00000000ce200000, 0x00000000eab00000) object space 231424K, 8% used [0x00000000c0000000,0x00000000c12c43a0,0x00000000ce200000) Metaspace used 32808K, capacity 35242K, committed 35416K, reserved 1079296K class space used 3999K, capacity 4780K, committed 4864K, reserved 1048576K }

Deoptimization events (10 events): Event: 27.339 Thread 0x00000000027ad800 Uncommon trap: reason=unhandled action=none pc=0x0000000002eb0210 method=org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(Ljava/lang/String;Ljava/util/List;)Ljava/lang/Class; @ 127 Event: 27.405 Thread 0x000000001e5d1800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000003138c64 method=java.util.HashMap.removeNode(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/util/HashMap$Node; @ 143 Event: 27.405 Thread 0x000000001e5d1800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002cfc268 method=java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryAcquireShared(I)I @ 60 Event: 27.405 Thread 0x000000001e5d1800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002ebd0dc method=java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(I)Z @ 17 Event: 27.411 Thread 0x000000001e5d1800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003244a14 method=java.security.AccessControlContext.optimize()Ljava/security/AccessControlContext; @ 20 Event: 27.416 Thread 0x000000001e5d1800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002d0b0c0 method=java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryAcquireShared(I)I @ 60 Event: 27.416 Thread 0x000000001e5d1800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002ed6cb0 method=java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(I)Z @ 9 Event: 27.455 Thread 0x000000001e5d1800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000322dde0 method=java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(I)Z @ 28 Event: 27.456 Thread 0x000000001e5d1800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003230244 method=java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(I)Z @ 28 Event: 27.468 Thread 0x000000001e5d1800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003138c20 method=java.util.HashMap.removeNode(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/util/HashMap$Node; @ 68

Internal exceptions (10 events): Event: 27.387 Thread 0x00000000027ad800 Exception <a 'java/io/FileNotFoundException'> (0x00000000ecd07308) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 27.387 Thread 0x00000000027ad800 Exception <a 'java/io/FileNotFoundException'> (0x00000000ecd08cc8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 27.387 Thread 0x00000000027ad800 Exception <a 'java/io/FileNotFoundException'> (0x00000000ecd0a5f0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 27.387 Thread 0x00000000027ad800 Exception <a 'java/io/FileNotFoundException'> (0x00000000ecd0bf70) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 27.387 Thread 0x00000000027ad800 Exception <a 'java/io/FileNotFoundException'> (0x00000000ecd0d9a0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 27.387 Thread 0x00000000027ad800 Exception <a 'java/io/FileNotFoundException'> (0x00000000ecd0f148) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 27.411 Thread 0x000000001e5d1800 Implicit null exception at 0x0000000003243be2 to 0x00000000032449fd Event: 27.439 Thread 0x000000001890f800 Exception <a 'java/lang/InterruptedException'> (0x00000000ec79d230) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\runtime\objectMonitor.cpp, line 1684] Event: 27.453 Thread 0x0000000018b5c800 Exception <a 'java/lang/InterruptedException'> (0x00000000ececb3a0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\runtime\objectMonitor.cpp, line 1684] Event: 27.456 Thread 0x0000000018d3f800 Exception <a 'java/lang/InterruptedException'> (0x00000000ed0ce7c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u91\6644\hotspot\src\share\vm\runtime\objectMonitor.cpp, line 1684]

Events (10 events): Event: 27.458 Thread 0x000000001e5d4800 Thread added: 0x000000001e5d4800 Event: 27.458 Thread 0x000000001e5d9000 Thread exited: 0x000000001e5d9000 Event: 27.465 Thread 0x0000000018915000 Thread exited: 0x0000000018915000 Event: 27.468 Thread 0x000000001e5d7800 Thread exited: 0x000000001e5d7800 Event: 27.468 Thread 0x000000001e5d1800 Uncommon trap: trap_request=0xffffffc6 fr.pc=0x0000000003138c20 Event: 27.468 Thread 0x000000001e5d1800 DEOPT PACKING pc=0x0000000003138c20 sp=0x000000002c15f020 Event: 27.468 Thread 0x000000001e5d1800 DEOPT UNPACKING pc=0x00000000027f582a sp=0x000000002c15ef48 mode 2 Event: 27.471 Thread 0x000000001e5d1800 Thread exited: 0x000000001e5d1800 Event: 27.560 Thread 0x000000001e5d4800 Thread exited: 0x000000001e5d4800 Event: 27.560 Executing VM operation: Exit

Dynamic libraries: 0x00007ff79b440000 - 0x00007ff79b477000 C:\Program Files\Java\jre1.8.0_91\bin\javaw.exe 0x00007ff84e490000 - 0x00007ff84e651000 C:\WINDOWS\SYSTEM32\ntdll.dll 0x00007ff84de10000 - 0x00007ff84debd000 C:\WINDOWS\system32\KERNEL32.DLL 0x00007ff84ac60000 - 0x00007ff84ae48000 C:\WINDOWS\system32\KERNELBASE.dll 0x00007ff84dd60000 - 0x00007ff84de07000 C:\WINDOWS\system32\ADVAPI32.dll 0x00007ff84d780000 - 0x00007ff84d81d000 C:\WINDOWS\system32\msvcrt.dll 0x00007ff84e430000 - 0x00007ff84e48b000 C:\WINDOWS\system32\sechost.dll 0x00007ff84d5f0000 - 0x00007ff84d70c000 C:\WINDOWS\system32\RPCRT4.dll 0x00007ff84d490000 - 0x00007ff84d5e6000 C:\WINDOWS\system32\USER32.dll 0x00007ff84bb30000 - 0x00007ff84bcb6000 C:\WINDOWS\system32\GDI32.dll 0x00007ff845fc0000 - 0x00007ff846234000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.0_none_8c15ae12515e1c22\COMCTL32.dll 0x00007ff84b8a0000 - 0x00007ff84bb1d000 C:\WINDOWS\system32\combase.dll 0x00007ff84b770000 - 0x00007ff84b7da000 C:\WINDOWS\system32\bcryptPrimitives.dll 0x00007ff84dd20000 - 0x00007ff84dd5b000 C:\WINDOWS\system32\IMM32.DLL 0x000000006fe30000 - 0x000000006ff02000 C:\Program Files\Java\jre1.8.0_91\bin\msvcr100.dll 0x0000000070ea0000 - 0x0000000071733000 C:\Program Files\Java\jre1.8.0_91\bin\server\jvm.dll 0x00007ff84dbe0000 - 0x00007ff84dbe8000 C:\WINDOWS\system32\PSAPI.DLL 0x00007ff83c190000 - 0x00007ff83c199000 C:\WINDOWS\SYSTEM32\WSOCK32.dll 0x00007ff848fe0000 - 0x00007ff849003000 C:\WINDOWS\SYSTEM32\WINMM.dll 0x00007ff846390000 - 0x00007ff84639a000 C:\WINDOWS\SYSTEM32\VERSION.dll 0x00007ff84d710000 - 0x00007ff84d77b000 C:\WINDOWS\system32\WS2_32.dll 0x00007ff848060000 - 0x00007ff84808c000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll 0x00007ff84b530000 - 0x00007ff84b573000 C:\WINDOWS\system32\cfgmgr32.dll 0x0000000071db0000 - 0x0000000071dbf000 C:\Program Files\Java\jre1.8.0_91\bin\verify.dll 0x0000000071d80000 - 0x0000000071da9000 C:\Program Files\Java\jre1.8.0_91\bin\java.dll 0x000000006fdf0000 - 0x000000006fe25000 C:\Program Files\Java\jre1.8.0_91\bin\jdwp.dll 0x0000000071d30000 - 0x0000000071d38000 C:\Program Files\Java\jre1.8.0_91\bin\npt.dll 0x0000000071d60000 - 0x0000000071d76000 C:\Program Files\Java\jre1.8.0_91\bin\zip.dll 0x00007ff84bcc0000 - 0x00007ff84d21c000 C:\WINDOWS\system32\SHELL32.dll 0x00007ff84ae50000 - 0x00007ff84b494000 C:\WINDOWS\system32\windows.storage.dll 0x00007ff84dbf0000 - 0x00007ff84dc42000 C:\WINDOWS\system32\shlwapi.dll 0x00007ff84aad0000 - 0x00007ff84aadf000 C:\WINDOWS\system32\kernel.appcore.dll 0x00007ff84aba0000 - 0x00007ff84ac55000 C:\WINDOWS\system32\shcore.dll 0x00007ff84aaf0000 - 0x00007ff84ab3b000 C:\WINDOWS\system32\powrprof.dll 0x00007ff84aab0000 - 0x00007ff84aac4000 C:\WINDOWS\system32\profapi.dll 0x000000006fde0000 - 0x000000006fde9000 C:\Program Files\Java\jre1.8.0_91\bin\dt_socket.dll 0x00007ff836db0000 - 0x00007ff836dc6000 C:\WINDOWS\system32\napinsp.dll 0x00007ff836dd0000 - 0x00007ff836dea000 C:\WINDOWS\system32\pnrpnsp.dll 0x00007ff848a10000 - 0x00007ff848a28000 C:\WINDOWS\system32\NLAapi.dll 0x00007ff84a380000 - 0x00007ff84a3dc000 C:\WINDOWS\System32\mswsock.dll 0x00007ff8494d0000 - 0x00007ff84957a000 C:\WINDOWS\SYSTEM32\DNSAPI.dll 0x00007ff84bb20000 - 0x00007ff84bb28000 C:\WINDOWS\system32\NSI.dll 0x00007ff838180000 - 0x00007ff83818d000 C:\WINDOWS\System32\winrnr.dll 0x0000000072510000 - 0x0000000072536000 C:\Program Files\Bonjour\mdnsNSP.dll 0x00007ff847f30000 - 0x00007ff847f68000 C:\WINDOWS\SYSTEM32\Iphlpapi.DLL 0x00007ff841560000 - 0x00007ff8415c7000 C:\WINDOWS\System32\fwpuclnt.dll 0x00007ff84a9e0000 - 0x00007ff84aa09000 C:\WINDOWS\SYSTEM32\bcrypt.dll 0x00007ff83e870000 - 0x00007ff83e87a000 C:\Windows\System32\rasadhlp.dll 0x00007ff84a430000 - 0x00007ff84a447000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll 0x00007ff84a0c0000 - 0x00007ff84a0f4000 C:\WINDOWS\system32\rsaenh.dll 0x00007ff84a210000 - 0x00007ff84a22f000 C:\WINDOWS\SYSTEM32\USERENV.dll 0x00007ff84a550000 - 0x00007ff84a55b000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll 0x0000000071d40000 - 0x0000000071d5a000 C:\Program Files\Java\jre1.8.0_91\bin\net.dll 0x00007ff841130000 - 0x00007ff841146000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL 0x00007ff841110000 - 0x00007ff84112a000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL 0x0000000071aa0000 - 0x0000000071ab1000 C:\Program Files\Java\jre1.8.0_91\bin\nio.dll 0x0000000072000000 - 0x0000000072012000 D:\workspace\eclipse\MODE45\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417\eclipse_1611.dll 0x000000006fdd0000 - 0x000000006fdd7000 C:\Program Files\Java\jre1.8.0_91\bin\jawt.dll 0x000000006fc30000 - 0x000000006fdc8000 C:\Program Files\Java\jre1.8.0_91\bin\awt.dll 0x00007ff84dc50000 - 0x00007ff84dd11000 C:\WINDOWS\system32\OLEAUT32.dll 0x00007ff8492a0000 - 0x00007ff849319000 C:\WINDOWS\system32\apphelp.dll 0x00007ff80b7a0000 - 0x00007ff80fb35000 D:\workspace\project\ec\PlugDemo\TTTTT\Release\libcef.dll 0x00007ff84d970000 - 0x00007ff84da7b000 C:\WINDOWS\system32\COMDLG32.dll 0x00007ff846710000 - 0x00007ff846728000 C:\WINDOWS\SYSTEM32\USP10.dll 0x00007ff847f70000 - 0x00007ff848038000 C:\WINDOWS\SYSTEM32\WINHTTP.dll 0x00007ff839b70000 - 0x00007ff839d27000 C:\WINDOWS\SYSTEM32\urlmon.dll 0x00007ff84b4a0000 - 0x00007ff84b526000 C:\WINDOWS\system32\FirewallAPI.dll 0x00007ff8463a0000 - 0x00007ff846424000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV 0x00007ff84b580000 - 0x00007ff84b597000 C:\WINDOWS\system32\NETAPI32.dll 0x00007ff84d820000 - 0x00007ff84d963000 C:\WINDOWS\system32\ole32.dll 0x00007ff843fe0000 - 0x00007ff844364000 C:\WINDOWS\SYSTEM32\iertutil.dll 0x00007ff84b5a0000 - 0x00007ff84b768000 C:\WINDOWS\system32\CRYPT32.dll 0x00007ff84aae0000 - 0x00007ff84aaf0000 C:\WINDOWS\system32\MSASN1.dll 0x00007ff847240000 - 0x00007ff8472aa000 C:\WINDOWS\SYSTEM32\OLEACC.dll 0x00007ff848040000 - 0x00007ff84804c000 C:\WINDOWS\SYSTEM32\Secur32.dll 0x00007ff849060000 - 0x00007ff84906c000 C:\WINDOWS\SYSTEM32\DAVHLPR.DLL 0x00007ff8489b0000 - 0x00007ff8489c3000 C:\WINDOWS\SYSTEM32\WTSAPI32.dll 0x00007ff84a730000 - 0x00007ff84a75d000 C:\WINDOWS\SYSTEM32\SSPICLI.DLL 0x00007ff849860000 - 0x00007ff849892000 C:\WINDOWS\SYSTEM32\fwbase.dll 0x00007ff824b30000 - 0x00007ff824c0c000 D:\workspace\project\ec\PlugDemo\TTTTT\Release\jcef.dll 0x00007ff849430000 - 0x00007ff8494c6000 C:\WINDOWS\system32\uxtheme.dll 0x00007ff84da80000 - 0x00007ff84dbda000 C:\WINDOWS\system32\MSCTF.dll 0x00007ff846e60000 - 0x00007ff846e82000 C:\WINDOWS\system32\dwmapi.dll 0x000000001ae10000 - 0x000000001aeb8000 D:\workspace\project\ec\PlugDemo.metadata.plugins\org.eclipse.pde.core\TTTTT.application\org.eclipse.osgi\26\0.cp\swt-win32-4530.dll 0x00007ff83b030000 - 0x00007ff83b2d9000 C:\WINDOWS\SYSTEM32\WININET.dll 0x0000000019f40000 - 0x0000000019f5e000 D:\workspace\project\ec\PlugDemo.metadata.plugins\org.eclipse.pde.core\TTTTT.application\org.eclipse.osgi\26\0.cp\swt-gdip-win32-4530.dll 0x00007ff846870000 - 0x00007ff846a18000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.10586.20_none_db007f1392e69ef4\gdiplus.dll 0x00007ff841d50000 - 0x00007ff841f01000 C:\WINDOWS\SYSTEM32\WindowsCodecs.dll 0x000000006fbd0000 - 0x000000006fc17000 C:\Program Files\Java\jre1.8.0_91\bin\fontmanager.dll 0x00007ff8382c0000 - 0x00007ff838520000 C:\WINDOWS\SYSTEM32\dwrite.dll 0x00007ff84dec0000 - 0x00007ff84e2e9000 C:\WINDOWS\system32\SETUPAPI.dll 0x00007ff8495a0000 - 0x00007ff8495c7000 C:\WINDOWS\SYSTEM32\DEVOBJ.dll 0x00007ff84ab40000 - 0x00007ff84ab95000 C:\WINDOWS\system32\WINTRUST.dll 0x00007ff847430000 - 0x00007ff8474b8000 C:\WINDOWS\system32\audioses.dll 0x00007ff841f10000 - 0x00007ff841f80000 C:\WINDOWS\system32\MMDevAPI.DLL 0x00007ff846cd0000 - 0x00007ff846e06000 C:\WINDOWS\SYSTEM32\wintypes.dll 0x00007ff848100000 - 0x00007ff848286000 C:\WINDOWS\system32\PROPSYS.dll 0x00007ff84e2f0000 - 0x00007ff84e397000 C:\WINDOWS\system32\clbcatq.dll 0x00000000637c0000 - 0x00000000637cd000 D:\workspace\eclipse\MODE45\gluegen-rt.dll 0x000000006a440000 - 0x000000006a44d000 D:\workspace\eclipse\MODE45\nativewindow_awt.dll 0x000000006c100000 - 0x000000006c10f000 D:\workspace\eclipse\MODE45\nativewindow_win32.dll 0x00007ff836030000 - 0x00007ff836159000 C:\WINDOWS\SYSTEM32\OpenGL32.dll 0x00007ff8357b0000 - 0x00007ff8358aa000 C:\WINDOWS\SYSTEM32\DDRAW.dll 0x00007ff83d910000 - 0x00007ff83d93e000 C:\WINDOWS\SYSTEM32\GLU32.dll 0x00007ff845f00000 - 0x00007ff845f08000 C:\WINDOWS\SYSTEM32\DCIMAN32.dll 0x0000000064500000 - 0x00000000645a2000 D:\workspace\eclipse\MODE45\jogl_desktop.dll 0x00007ff81ea90000 - 0x00007ff81ecd2000 D:\workspace\project\ec\PlugDemo\TTTTT\Release\libGLESv2.dll 0x00007ff81ece0000 - 0x00007ff81eef0000 C:\WINDOWS\SYSTEM32\d3d9.dll 0x00007ff8431b0000 - 0x00007ff8431cc000 D:\workspace\project\ec\PlugDemo\TTTTT\Release\libEGL.dll 0x0000000064340000 - 0x000000006438e000 D:\workspace\eclipse\MODE45\jogl_mobile.dll 0x00007ff81d7b0000 - 0x00007ff81e270000 C:\WINDOWS\SYSTEM32\ig75icd64.dll 0x00007ff8433b0000 - 0x00007ff843da2000 C:\WINDOWS\SYSTEM32\igdusc64.dll 0x00007ff849070000 - 0x00007ff849077000 C:\WINDOWS\SYSTEM32\msimg32.dll 0x00007ff8467d0000 - 0x00007ff846861000 C:\WINDOWS\SYSTEM32\mscms.dll 0x00007ff836a90000 - 0x00007ff836c1c000 C:\WINDOWS\SYSTEM32\dbghelp.dll

VM Arguments: jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:36705 -Djava.library.path=D:\workspace\project\ec\PlugDemo\TTTTT\Release -Dosgi.requiredJavaVersion=1.7 -Xms256m -Xmx1024m -Dfile.encoding=GBK java_command: org.eclipse.equinox.launcher.Main -application TTTTT.application -data D:\workspace\project\ec\PlugDemo/../runtime-TTTTT.application -configuration file:D:/workspace/project/ec/PlugDemo/.metadata/.plugins/org.eclipse.pde.core/TTTTT.application/ -dev file:D:/workspace/project/ec/PlugDemo/.metadata/.plugins/org.eclipse.pde.core/TTTTT.application/dev.properties -os win32 -ws win32 -arch x86_64 -nl zh_CN -consoleLog java_class_path (initial): D:\workspace\eclipse\MODE45\plugins\org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar Launcher Type: SUN_STANDARD

Environment Variables: PATH=C:/Program Files/Java/jre1.8.0_91/bin/server;C:/Program Files/Java/jre1.8.0_91/bin;C:/Program Files/Java/jre1.8.0_91/lib/amd64;D:\workspace\git\cefb\depot_tools;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\lucif\AppData\Roaming\npm;D:\workspace\eclipse\MODE45; USERNAME=lucif OS=Windows_NT PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel

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

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

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

Memory: 4k page, physical 12001356k(4951284k free), swap 13836364k(5047812k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.91-b14) for windows-amd64 JRE (1.8.0_91-b14), built on Apr 1 2016 00:58:32 by "java_re" with MS VC++ 10.0 (VS2010)

time: Mon Jun 20 20:26:04 2016 elapsed time: 27 seconds (0d 0h 0m 27s)

magreenblatt commented 8 years ago

Original comment by Li Hui (Bitbucket: yolaiyoqu, GitHub: yolaiyoqu).


I met the same issue. Use the example application, like Case 1. Windows 10 x64. cef 2704 and 2526 both have the same issue.

There is no error log. Only some error event in windows event manager. But the error module is unknown.

magreenblatt commented 8 years ago

Original comment by michael10 (Bitbucket: michael10, GitHub: michael10).


Are there any workarounds for handling this problem? Or have you any hints where I can fix the problem temporary. Maybe a similarly way as in CefApp.class implemented for MAC-OS with a ShutdownHook?

magreenblatt commented 8 years ago

Original comment by Andrew (Bitbucket: Senegura, GitHub: Senegura).


Untitled.png

From ShutdownHook comments: //Unfortunately this approach works only for Mac because // on Windows this will cause a "performed on wrong thread" exception in // the native CEF part. And calling SwingUtilities.invokeAndWait doesn't // work because the dispatcher thread starts this shutdown hook (thread) and // calls "join" on it. Therefore invokeAndWait will end up in a deadlock.

So we need to shutdown hook on "correct" thread?

magreenblatt commented 8 years ago

Original comment by michael10 (Bitbucket: michael10, GitHub: michael10).


We found a workaround: We have to guarantee that cef shutdown is excuted when we terminate. In CefApp we add new method (code is from MAC-OS ShutdownHook fix. CefApp.class ~ line 170):

#!Java

  public final void shutdownFix() {
      try {

          for (CefClient c : clients_) {
            c.dispose();
          }

          Thread.sleep(150);
          lock.lock();
          cefShutdown.signal();
          lock.unlock();
          N_Shutdown();

          // Avoid a deadlock. Give the native code at least 150 milliseconds
          // to terminate.
          Thread.sleep(150);
        } catch (Exception e) { }

    }

and we call this method in our own ExitHandler. So we can assume that cef shutdown is executed in time.

magreenblatt commented 8 years ago

Original comment by tbhasme (Bitbucket: tbhasme, GitHub: tbhasme).


@michael10 we area facing the same issue:

#!java

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fef2ffc4ff, pid=14832, tid=10008
#
# JRE version: Java(TM) SE Runtime Environment (7.0_75-b13) (build 1.7.0_75-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.75-b04 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [jcef.dll+0x1c4ff]

Just one question on your approach. How do you create the ExitHandler? We have to integrate the jcef in our SWT application and hence called your method like this:

#!java
CefBrowser cefBrowser = client.createBrowser("", OS.isWindows(), false);
final Component browserUI = cefBrowser.getUIComponent();
final Frame cefBrowserFrame = SWT_AWT.new_Frame(parent);
cefBrowserFrame.add(browserUI);
cefBrowserFrame.addWindowListener(new WindowAdapter() {

                @Override
                public void windowClosed(java.awt.event.WindowEvent e) {
                    cefApp.shutdownFix();
                }
            });

Anything that we miss?

magreenblatt commented 8 years ago

Original comment by michael10 (Bitbucket: michael10, GitHub: michael10).


I think this should be ok. But you have to check, that your "windowClosed" is executed first. I think CEF also listen on window close events. Maybe you have to stop event propagation for this event.

Do you have troubles with this implementation?

magreenblatt commented 8 years ago

Original comment by tbhasme (Bitbucket: tbhasme, GitHub: tbhasme).


Yeah, we are still seeing the same error. I can't find a way to stop the event propagation. What do you mean by windowClosed is executed first? Before what should it be executed. I found that when SWT fires the dispose event on 'parent', it disposes the child AWT frames in a separate thread. Is that the issue?

magreenblatt commented 8 years ago

Original comment by michael10 (Bitbucket: michael10, GitHub: michael10).


Hi sorry for late response.... The main problem is of course the asynchronicity. When we are debugging the problem, we see that CEFClient also get's an callback from native, when windows close event was triggered (I think it was CefClient.onBeforeClose()) and always if this breakpoint is reached during shutdown we get an JVMCrash. So we add an ShutdownHook into BaseRuntime, which executes the hook in time. Runtime.getRuntime().addShutdownHook(CefShutdown_hook);

magreenblatt commented 8 years ago

Please test with the 3.2840 update and report back if you're still seeing shutdown crashes with a Release build.

magreenblatt commented 8 years ago

Original comment by Hilal Kale (Bitbucket: hilalkale, GitHub: hilalkale).


Hi, we were facing the same "crash on shutdown" problem in our own application. Yesterday, I have downloaded v3.2840 and tested it. It solved the crash problem, but now it caused us another error. In our application we have some features that are accessing to mic/cam. But whenever I try them JVM crashes again. Console output is in this situation is :

"[1109/100142:FATAL:proof_verifier_chromium.cc(554)] Check failed: ct_policyenforcer."

We are using the "--enable-media-stream" argument. And this was not causing any problem with our previous java-cef version (v3.2623). Am I missing something, do I need to add some extra arguments to make it work?

magreenblatt commented 7 years ago

@hilalkale : Sounds like it could be an issue in CEF. Can you share a publicly accessible URL that reproduces the problem?

magreenblatt commented 7 years ago

Original comment by Hilal Kale (Bitbucket: hilalkale, GitHub: hilalkale).


@magreenblatt Ok I retry everything from scratch and realized that it was my bad, sorry for the inconvenience. In case anyone who may face the same problems with me, the list of the things I've done wrong is:

As a result v3.2840 seems solving the crash problem. Thanks in advance.

magreenblatt commented 7 years ago

Original comment by Mark Lin (Bitbucket: linmark333-code).


OSX Build on v3.2840, 'detailed' example, still crashing at times when main window closes.

crash report: https://gist.github.com/linmark333/1ed41331b984fceb9004783cd13333d4

Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010 Exception Note: EXC_CORPSE_NOTIFY ##

magreenblatt commented 7 years ago

Original comment by Kim Reed (Bitbucket: reedphoto).


I am having the same sort of trouble. Mine started out with my program not wanting to quit the application and hanging up. The simple mainframe worked fine but when I put the same basic functionallity into my test application it would hangup on close. I then used the code found in Issue #242. This allowed the application to close but then threw this error

#!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffb676f2beb, pid=15308, tid=0x000000000000257c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.111-b14 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [jcef.dll+0x22beb]

In another version of a program it still hangs with the fix mentioned when I close it. I then tried the fix by michael10 shutdownfix and it fixed the hanging of the new program but it is now throwing the same exception. I tried this new fix in the first test program and it would hang with shutdownfix but would close fine with dispose.

I have tried it with the 64bit cef and the 32bit cef and get the same results.

There appears to be some really weird timing issues on shutdown.

magreenblatt commented 7 years ago

Original comment by Roberto Neto (Bitbucket: BetoN, GitHub: BetoN).


Same #260/appcrash-on-close

magreenblatt commented 4 years ago

Duplicate of #369.

magreenblatt commented 8 years ago

Original changes by michael10 (Bitbucket: michael10, GitHub: michael10).


magreenblatt commented 8 years ago

Original changes by michael10 (Bitbucket: michael10, GitHub: michael10).


magreenblatt commented 4 years ago