chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.39k stars 467 forks source link

Crash in devtools when clicking the network throttling menu #3724

Closed bjdupuis closed 4 months ago

bjdupuis commented 5 months ago

Describe the bug When clicking the network throttling menu in the devtool network tab the cefclient crashes when using Alloy.

To Reproduce Steps to reproduce the behavior:

  1. Run cefclient --disable-chrome-runtime
  2. Right-click on the main window
  3. Select "Show DevTools"
  4. Select "Network" tab
  5. Click on "No Throttling" to bring down the throttling menu
  6. Observe crash

Expected behavior Shouldn't crash.

Screenshots Screenshot of a crash from our application not cefclient with symbols loaded. Screenshot 2024-06-26 at 2 04 54 PM

If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

Additional context Mac OS crash report for cefclient stack trace as below:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               cefclient [69100]
Path:                  /Users/USER/cefclient.app/Contents/MacOS/cefclient
Identifier:            org.cef.cefclient
Version:               126.2.9.0 (9.0)
Code Type:             X86-64 (Native)
Parent Process:        zsh [826]
Responsible:           Terminal [738]
User ID:               501

Date/Time:             2024-06-26 16:14:44.2144 -0400
OS Version:            macOS 14.5 (23F79)
Report Version:        12
Bridge OS Version:     8.5 (21P5077)
Anonymous UUID:        301F3C81-1200-BEB2-533A-64368C520933

Time Awake Since Boot: 93000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000002, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [69100]

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0   Chromium Embedded Framework            0x110ed01a4 cef_time_from_basetime + 45645956
1   Chromium Embedded Framework            0x110ecf87d cef_time_from_basetime + 45643613
2   Chromium Embedded Framework            0x110ef5946 cef_time_from_basetime + 45799462
3   Chromium Embedded Framework            0x110f0683e cef_time_from_basetime + 45868830
4   Chromium Embedded Framework            0x110ca6659 cef_time_from_basetime + 43377977
5   Chromium Embedded Framework            0x1103d2c76 cef_time_from_basetime + 34122582
6   Chromium Embedded Framework            0x1125b2f10 ChromeAppModeStart_v7 + 8639648
7   Chromium Embedded Framework            0x1125b8c6f ChromeAppModeStart_v7 + 8663551
8   Chromium Embedded Framework            0x1125b492b ChromeAppModeStart_v7 + 8646331
9   Chromium Embedded Framework            0x1129052d9 ChromeAppModeStart_v7 + 12122217
10  Chromium Embedded Framework            0x112905743 ChromeAppModeStart_v7 + 12123347
11  Chromium Embedded Framework            0x112410b40 ChromeAppModeStart_v7 + 6926544
12  Chromium Embedded Framework            0x1124337bd ChromeAppModeStart_v7 + 7069005
13  Chromium Embedded Framework            0x112433e95 ChromeAppModeStart_v7 + 7070757
14  Chromium Embedded Framework            0x112482a21 ChromeAppModeStart_v7 + 7393201
15  Chromium Embedded Framework            0x10dff65fe 0x10ddfa000 + 2082302
16  Chromium Embedded Framework            0x1124818e1 ChromeAppModeStart_v7 + 7388785
17  CoreFoundation                      0x7ff811388087 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18  CoreFoundation                      0x7ff811388029 __CFRunLoopDoSource0 + 157
19  CoreFoundation                      0x7ff811387df4 __CFRunLoopDoSources0 + 215
20  CoreFoundation                      0x7ff811386a71 __CFRunLoopRun + 919
21  CoreFoundation                      0x7ff811386112 CFRunLoopRunSpecific + 557
22  HIToolbox                           0x7ff81bd9fa09 RunCurrentEventLoopInMode + 292
23  HIToolbox                           0x7ff81bd9f816 ReceiveNextEventCommon + 665
24  HIToolbox                           0x7ff81bd9f561 _BlockUntilNextEventMatchingListInModeWithFilter + 66
25  AppKit                              0x7ff8149f6c61 _DPSNextEvent + 880
26  AppKit                              0x7ff81530adc0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1273
27  AppKit                              0x7ff8149e8075 -[NSApplication run] + 603
28  Chromium Embedded Framework            0x112483348 ChromeAppModeStart_v7 + 7395544
29  Chromium Embedded Framework            0x112481224 ChromeAppModeStart_v7 + 7387060
30  Chromium Embedded Framework            0x112434189 ChromeAppModeStart_v7 + 7071513
31  Chromium Embedded Framework            0x1123f3864 ChromeAppModeStart_v7 + 6807028
32  Chromium Embedded Framework            0x10e29c614 cef_zip_reader_create + 329972
33  cefclient                              0x10174b8d9 0x101747000 + 18649
34  cefclient                              0x10179e193 0x101747000 + 356755
35  dyld                                0x7ff810f1f366 start + 1942
bjdupuis commented 5 months ago

First build this appears in is 126.0.1+g8abe66c+chromium-126.0.6478.17. Everything up to 125.0.18+ge997249+chromium-125.0.6422.41 is fine.

magreenblatt commented 4 months ago

Closing as Wont-Fix given the deprecation and upcoming removal of Alloy bootstrap (see #3685).

bjdupuis commented 4 months ago

@magreenblatt : My QA reports that other popups in our app unrelated to dev tools also crash in this same way, making it impossible to release. I understand Alloy is deprecated as of M127 and I'm trying to reach the point that we can swap, but it feels harsh to take that stance while 126 is supposed to still be officially supported and 127 hasn't reached stable. Including screenshot from our app's stack trace when attempting to open a different, javascript app-based menu.

Screenshot 2024-07-03 at 9 34 55 AM
magreenblatt commented 4 months ago

I understand your perspective. Unfortunately developer resources are finite. You’re welcome to debug the issue yourself, or just stick with the version that works for you until you can migrate to the Chrome bootstrap.

bjdupuis commented 4 months ago

I do understand resourcing, just leaves me in a tricky spot (we have SLAs on releasing based on the Chromium schedule so I don't have a ton of leeway in "riding" a version). Can you weigh in on this? It appears that this was hopefully fixed in late May... note that I see a ObjCCastStrict in my stack trace which is changed to a ObjCCast in this commit. I'm just not tied in enough to know when this actually appears in the Chromium/CEF build.

EDIT: I'm going to try again with CEF 126.2.10 in the hopes that it got in. I should note that I tried enabling the chrome runtime and still had this crash.

EDIT EDIT: No joy.

EDIT EDIT Part Deux: 127.0.8 works. But that's beta.

bjdupuis commented 4 months ago

Chromium team says it won't hit the 126 baseline so that one is dead to me. Ah well.

magreenblatt commented 4 months ago

@bjdupuis you can likely apply the change as a patch file to a custom build of M126. See https://github.com/chromiumembedded/cef/tree/master/patch