CEF and Frozen Main Thread?

delphi package - automated exception handling
Post Reply
cpstevenc
Posts: 9
Joined: Thu May 29, 2014 2:39 am

CEF and Frozen Main Thread?

Post by cpstevenc »

Using Delphi 11.2
Latest madexcept
CEF 106.0.26

Not 100% sure what is going on.

If I enable "check for frozen main thread"

Chromium / CEF then seems to flag things being frozen.

Always this routine and line.

I have 3 of these in one form ( different tabs ) and all are working?

Code: Select all

disassembling:
00671bd8      public uCEFApplicationCore.TCefApplicationCore.ExecuteProcess:  ; function entry point
00671bd8 1382   push    ebp
00671bd9        mov     ebp, esp
00671bdb        add     esp, -$14
00671bde        push    ebx
00671bdf        push    esi
00671be0        push    edi
00671be1        mov     [ebp-8], edx
00671be4        mov     [ebp-4], eax
00671be7 1383   mov     dword ptr [ebp-$c], $ffffffff
00671bee 1384   xor     eax, eax
00671bf0        push    ebp
00671bf1        push    $671c3d                ; System.@HandleOnException
00671bf6        push    dword ptr fs:[eax]
00671bf9        mov     fs:[eax], esp
00671bfc 1385   cmp     dword ptr [ebp-8], 0
00671c00        jz      loc_671c33
00671c02 1387   lea     edx, [ebp-$10]
00671c05        mov     eax, [ebp-4]
00671c08        call    -$51 ($671bbc)         ; uCEFApplicationCore.TCefApplicationCore.InitializeCefMainArgs
00671c0d 1388   mov     eax, [ebp-4]
00671c10        mov     eax, [eax+$d8]
00671c16        push    eax
00671c17        mov     eax, [ebp-8]
00671c1a        mov     edx, [eax]
00671c1c        call    dword ptr [edx+$c]
00671c1f        push    eax
00671c20        lea     eax, [ebp-$10]
00671c23        push    eax
00671c24        mov     eax, [$f8ccc8]
00671c29        mov     eax, [eax]
00671c2b      > call    eax
00671c2d        add     esp, $c
00671c30        mov     [ebp-$c], eax
00671c33        xor     eax, eax
00671c35        pop     edx
00671c36        pop     ecx
00671c37        pop     ecx
00671c38        mov     fs:[eax], edx
00671c3b        jmp     loc_671c79
00671c3d        jmp     -$4d6832 ($19b410)     ; System.@HandleOnException
00671c46        on Exception do loc_671c4e
00671c4e 1391   mov     [ebp-$14], eax
00671c51 1393   mov     eax, [ebp-4]
00671c54        mov     dword ptr [eax+$100], 9
00671c5e 1394   mov     edx, [ebp-$14]
00671c61        mov     eax, $671c90
00671c66        call    -$1004f ($661c1c)      ; uCEFMiscFunctions.CustomExceptionHandler
00671c6b        test    al, al
00671c6d        jz      loc_671c74
00671c6f        call    -$4d64c8 ($19b7ac)     ; System.@RaiseAgain
00671c74        call    -$4d6479 ($19b800)     ; System.@DoneExcept
00671c79 1397   mov     eax, [ebp-$c]
00671c7c        pop     edi
00671c7d        pop     esi
00671c7e        pop     ebx
00671c7f        mov     esp, ebp
00671c81        pop     ebp
00671c82        ret
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: CEF and Frozen Main Thread?

Post by madshi »

What kind of project is this? Probably not a GUI application? I'm not sure if this type of project is supposed to have the main thread regularly react to messages?

madExcept's "frozen main thread" detection works by simply checking if the main thread is still responding to messages. The main thread should do that if it's running in an endless message loop, which VCL GUI applications normally do. Does your project have such a message loop in its main thread?
Post Reply