选择“显示 DevTools”时“程序‘cefclient’收到 X Window 系统错误”并崩溃

选择“显示 DevTools”时“程序‘cefclient’收到 X Window 系统错误”并崩溃

我按照以下步骤在 Ubuntu 22.04 桌面中构建了 CEF:https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md

构建过程看起来不错,从该文件中每个步骤的转录中可以看出:https://drive.google.com/file/d/118dYTusfovSw53vY6wG2C320LEmmOcSP/view?usp=sharing

执行cefclient的调试版本:

rapy@raohy:~/code/chromium_git/chromium/src/out/Debug_GN_x64$ ./cefclient

看起来工作正常:在此输入图像描述

但是,如果我用鼠标右键单击选择“显示 DevTools”,窗口crashes会出现以下错误:

raphy@raohy:~/code/chromium_git/chromium/src/out/Debug_GN_x64$ ./cefclient
[1001/113009.967704:WARNING:policy_logger.cc(148)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(88) Could not create policy manager as CBCM is not enabled.
[1001/113010.168511:WARNING:gpu_memory_buffer_support_x11.cc(49)] dri3 extension not supported.
[1001/113014.796492:INFO:CONSOLE(1)] "Uncaught TypeError: o.Integrations.RewriteFrames is not a constructor", source: https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/sentry.js (1)
[1001/113015.252872:ERROR:http_cache_writers.cc(579)] failed to write response data to cache
[1001/113015.508219:INFO:CONSOLE(29)] "JQMIGRATE: Migrate is installed with logging active, version 3.3.1", source: https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/aui-8.js (29)
[1001/113016.869440:INFO:CONSOLE(29)] "JQMIGRATE: jQuery.isArray is deprecated; use Array.isArray", source: https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/aui-8.js (29)
[1001/113016.869692:INFO:CONSOLE(29)] "console.trace", source: https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/aui-8.js (29)
[1001/113018.551089:INFO:CONSOLE(124)] "DEPRECATED JS - PopulateParameters has been deprecated since 9.0.0 and will be removed in 10.0.0.  
     at HTMLDocument.<anonymous> (https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/aui-8.js:124:129279)", source: https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/aui-8.js (124)
[1001/113018.606501:INFO:CONSOLE(124)] "DEPRECATED JS - Inline dialog constructor has been deprecated and will be removed in a future release. Use inline dialog 2 instead.   
     at https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/vendor.js:475:146584", source: https://d301sr5gafysq2.cloudfront.net/aa6b96a4960c/dist/webpack/aui-8.js (124)
[1001/113018.651010:INFO:CONSOLE(37)] "Refused to connect to 'https://stats.g.doubleclick.net/j/collect?t=dc&aip=1&_r=3&v=1&_v=j101&tid=UA-76642781-1&cid=8214567.1696152618&jid=1393044227&gjid=1634421549&_gid=2090662461.1696152618&_u=YEBAAEAAAAAAACACI~&z=1823278781' because it violates the following Content Security Policy directive: "connect-src bitbucket.org *.bitbucket.org bb-inf.net *.bb-inf.net id.atlassian.com api.atlassian.com api.stg.atlassian.com wss://bitbucketci-ws-service.services.atlassian.com/ wss://bitbucketci-ws-service.stg.services.atlassian.com/ wss://bitbucketci-ws-service.dev.services.atlassian.com/ analytics.atlassian.com as.atlassian.com api-private.stg.atlassian.com api-private.atlassian.com cofs.staging.public.atl-paas.net cofs.prod.public.atl-paas.net fd-assets.prod.atl-paas.net intake.opbeat.com api.media.atlassian.com api.segment.io xid.statuspage.io xid.atlassian.com xid.sourcetreeapp.com bam.nr-data.net bam-cell.nr-data.net www.google-analytics.com sentry.io *.ingest.sentry.io events.launchdarkly.com app.launchdarkly.com fd-config.us-east-1.prod.public.atl-paas.net app.pendo.io data.pendo.io pendo-static-6266914010103808.storage.googleapis.com bqlf8qjztdtr.statuspage.io https://d301sr5gafysq2.cloudfront.net/ https://d136azpfpnge1l.cloudfront.net/".
", source: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md (37)
[1001/113019.132398:INFO:CONSOLE(147)] "Refused to connect to 'https://region1.google-analytics.com/g/collect?v=2&tid=G-BD58956NGD&gtm=45je39r0&_p=617847984&ul=en-us&sr=1920x1080&cid=8214567.1696152618&ir=1&uaa=x86&uab=64&uafvl=Not%253DA%253FBrand%3B99.0.0.0%7CChromium%3B118.0.5993.0&uamb=0&uam=&uap=Linux&uapv=6.2.0&uaw=0&_eu=EBAI&_s=1&dl=https%3A%2F%2Fbitbucket.org%2Fchromiumembedded%2Fcef%2Fwiki%2FMasterBuildQuickStart.md&dp=bitbucket.apps.wiki.views.wiki&sid=1696152619&sct=1&seg=0&en=page_view&_fv=1&_ss=1&_ee=1' because it violates the following Content Security Policy directive: "connect-src bitbucket.org *.bitbucket.org bb-inf.net *.bb-inf.net id.atlassian.com api.atlassian.com api.stg.atlassian.com wss://bitbucketci-ws-service.services.atlassian.com/ wss://bitbucketci-ws-service.stg.services.atlassian.com/ wss://bitbucketci-ws-service.dev.services.atlassian.com/ analytics.atlassian.com as.atlassian.com api-private.stg.atlassian.com api-private.atlassian.com cofs.staging.public.atl-paas.net cofs.prod.public.atl-paas.net fd-assets.prod.atl-paas.net intake.opbeat.com api.media.atlassian.com api.segment.io xid.statuspage.io xid.atlassian.com xid.sourcetreeapp.com bam.nr-data.net bam-cell.nr-data.net www.google-analytics.com sentry.io *.ingest.sentry.io events.launchdarkly.com app.launchdarkly.com fd-config.us-east-1.prod.public.atl-paas.net app.pendo.io data.pendo.io pendo-static-6266914010103808.storage.googleapis.com bqlf8qjztdtr.statuspage.io https://d301sr5gafysq2.cloudfront.net/ https://d136azpfpnge1l.cloudfront.net/".
", source: https://www.googletagmanager.com/gtag/js?id=G-BD58956NGD&cx=c&_slc=1 (147)
[1001/113019.157073:WARNING:obfuscated_file_util.cc(1323)] Failed to get origin+type directory: { uri: filesystem:https://bitbucket.org/temporary/, storage key: { origin: https://bitbucket.org, top-level site: https://bitbucket.org, nonce: <null>, ancestor chain bit: Same-Site }, bucket id: 1 } error:-4
[1001/113141.388376:WARNING:cefclient_gtk.cc(34)] X error received: type 0, serial 788, error_code 3, request_code 7, minor_code 0
[1001/113141.388467:WARNING:cefclient_gtk.cc(34)] X error received: type 0, serial 789, error_code 3, request_code 12, minor_code 0
[1001/113141.400720:ERROR:render_widget_host_view_aura.cc(472)] Not implemented reached in virtual gfx::NativeViewAccessible content::RenderWidgetHostViewAura::GetNativeViewAccessible()

(cefclient:183015): Gdk-ERROR **: 11:31:41.401: The program 'cefclient' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 792 error_code 3 request_code 18 (core protocol) minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)




raphy@raohy:~/code/chromium_git/chromium/src/out/Debug_GN_x64$ ./cefclient GDK_SYNCHRONIZE=true
[1001/123606.094230:WARNING:policy_logger.cc(148)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(88) Could not create policy manager as CBCM is not enabled.
[1001/123606.317741:WARNING:gpu_memory_buffer_support_x11.cc(49)] dri3 extension not supported.
[1001/123612.860370:WARNING:cefclient_gtk.cc(34)] X error received: type 0, serial 509, error_code 3, request_code 7, minor_code 0
[1001/123612.860449:WARNING:cefclient_gtk.cc(34)] X error received: type 0, serial 510, error_code 3, request_code 12, minor_code 0
[1001/123612.871237:ERROR:render_widget_host_view_aura.cc(472)] Not implemented reached in virtual gfx::NativeViewAccessible content::RenderWidgetHostViewAura::GetNativeViewAccessible()

(cefclient:6903): Gdk-ERROR **: 12:36:12.872: The program 'cefclient' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 512 error_code 3 request_code 18 (core protocol) minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)
raphy@raohy:~/code/chromium_git/chromium/src/out/Debug_GN_x64$ 

我尝试了这些建议:https://askubuntu.com/questions/1402752/firefox-stopped-working-with-a-badalloc-x-window-system-error-on-ubuntu-21-10 但安装的 nvidia-driver 已经是最新的:

raphy@raohy:~$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001184sv00001569sd00001184bc03sc00i00
vendor   : NVIDIA Corporation
model    : GK104 [GeForce GTX 770]
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-470 - distro non-free recommended
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin


raphy@raohy:~$ sudo apt-get install nvidia-driver-470
nvidia-driver-470 is already the newest version (470.199.02-0ubuntu0.22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.



raphy@raohy:~$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: GK104 [GeForce GTX 770]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:33 memory:f6000000-f6ffffff memory:e8000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff
  *-graphics
       product: EFI VGA
       physical id: 2
       logical name: /dev/fb0
       capabilities: fb
       configuration: depth=32 resolution=1024,768
raphy@raohy:~$ 


raphy@raohy:~$ lspci -nn | grep -E 'VGA|Display'
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 770] [10de:1184] (rev a1)

该怎么做才能解决问题?

相关内容