Opened 2 years ago
Closed 2 years ago
#9388 closed defect (fixed)
Blank HTML widgets in daily build
Reported by: | Elaine Meng | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Window Toolkit | Version: | |
Keywords: | Cc: | chimera-programmers | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: macOS-12.6.7-arm64-arm-64bit ChimeraX Version: 1.7.dev202307180036 (2023-07-18 00:36:28 UTC) Description HTML widgets blank in daily build (M1 mac laptop) screen shot of initial appearance attached Log: > open /Users/meng/Desktop/startup.cxc > alias reset view orient; view initial > alias start tool show $1 > alias whereprefs info path user unversioned config > alias captut open help:user/tutorials/binding-sites.html#cap-example > alias previewts toolshed url https://cxtoolshed- > preview.rbvi.ucsf.edu;toolshed reload available > alias normalts toolshed url https://cxtoolshed.rbvi.ucsf.edu;toolshed reload > available > alias btut open > https://www.cgl.ucsf.edu/home/meng/chimerax/vdocs/user/tutorials/binding- > sites.html; ui dockable false "Help Viewer" > alias stut open https://www.rbvi.ucsf.edu/chimerax/data/conservation- > coloring/conservation-coloring.html; ui dockable false "Help Viewer" > alias ltut open https://www.rbvi.ucsf.edu/chimerax/data/loop-modeling/loop- > modeling.html; ui dockable false "Help Viewer" > alias mtut open https://www.rbvi.ucsf.edu/chimerax/data/mole-channel/mole- > channel.html; ui dockable false "Help Viewer"; windowsize 600 800 executed startup.cxc UCSF ChimeraX version: 1.7.dev202307180036 (2023-07-18) © 2016-2023 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > help help:user OpenGL version: 4.1 Metal - 76.3 OpenGL renderer: Apple M1 Pro OpenGL vendor: Apple Python: 3.11.2 Locale: UTF-8 Qt version: PyQt6 6.5.1, Qt 6.5.1 Qt runtime version: 6.5.1 Qt platform: cocoa Hardware: Hardware Overview: Model Name: MacBook Pro Model Identifier: MacBookPro18,1 Chip: Apple M1 Pro Total Number of Cores: 10 (8 performance and 2 efficiency) Memory: 16 GB System Firmware Version: 8422.121.1 OS Loader Version: 7459.141.1 Software: System Software Overview: System Version: macOS 12.6.7 (21G651) Kernel Version: Darwin 21.6.0 Time since boot: 1:00 Graphics/Displays: Apple M1 Pro: Chipset Model: Apple M1 Pro Type: GPU Bus: Built-In Total Number of Cores: 16 Vendor: Apple (0x106b) Metal Family: Supported, Metal GPUFamily Apple 7 Displays: Color LCD: Display Type: Built-in Liquid Retina XDR Display Resolution: 3456 x 2234 Retina Main Display: Yes Mirror: Off Online: Yes Automatically Adjust Brightness: Yes Connection Type: Internal Installed Packages: alabaster: 0.7.13 appdirs: 1.4.4 appnope: 0.1.3 asttokens: 2.2.1 Babel: 2.12.1 backcall: 0.2.0 beautifulsoup4: 4.11.2 blockdiag: 3.0.0 blosc2: 2.0.0 build: 0.10.0 certifi: 2022.12.7 cftime: 1.6.2 charset-normalizer: 3.2.0 ChimeraX-AddCharge: 1.5.11 ChimeraX-AddH: 2.2.5 ChimeraX-AlignmentAlgorithms: 2.0.1 ChimeraX-AlignmentHdrs: 3.4 ChimeraX-AlignmentMatrices: 2.1 ChimeraX-Alignments: 2.9.3 ChimeraX-AlphaFold: 1.0 ChimeraX-AltlocExplorer: 1.1.1 ChimeraX-AmberInfo: 1.0 ChimeraX-Arrays: 1.1 ChimeraX-Atomic: 1.46.1 ChimeraX-AtomicLibrary: 10.0.8 ChimeraX-AtomSearch: 2.0.1 ChimeraX-AxesPlanes: 2.3.2 ChimeraX-BasicActions: 1.1.2 ChimeraX-BILD: 1.0 ChimeraX-BlastProtein: 2.1.2 ChimeraX-BondRot: 2.0.4 ChimeraX-BugReporter: 1.0.1 ChimeraX-BuildStructure: 2.10.4 ChimeraX-Bumps: 1.0 ChimeraX-BundleBuilder: 1.2.2 ChimeraX-ButtonPanel: 1.0.1 ChimeraX-CageBuilder: 1.0.1 ChimeraX-CellPack: 1.0 ChimeraX-Centroids: 1.3.2 ChimeraX-ChangeChains: 1.0.2 ChimeraX-CheckWaters: 1.3.1 ChimeraX-ChemGroup: 2.0.1 ChimeraX-Clashes: 2.2.4 ChimeraX-ColorActions: 1.0.3 ChimeraX-ColorGlobe: 1.0 ChimeraX-ColorKey: 1.5.3 ChimeraX-CommandLine: 1.2.5 ChimeraX-ConnectStructure: 2.0.1 ChimeraX-Contacts: 1.0.1 ChimeraX-Core: 1.7.dev202307180036 ChimeraX-CoreFormats: 1.1 ChimeraX-coulombic: 1.4.2 ChimeraX-Crosslinks: 1.0 ChimeraX-Crystal: 1.0 ChimeraX-CrystalContacts: 1.0.1 ChimeraX-DataFormats: 1.2.3 ChimeraX-Dicom: 1.2 ChimeraX-DistMonitor: 1.4 ChimeraX-DockPrep: 1.1.2 ChimeraX-Dssp: 2.0 ChimeraX-EMDB-SFF: 1.0 ChimeraX-ESMFold: 1.0 ChimeraX-FileHistory: 1.0.1 ChimeraX-FunctionKey: 1.0.1 ChimeraX-Geometry: 1.3 ChimeraX-gltf: 1.0 ChimeraX-Graphics: 1.1.1 ChimeraX-Hbonds: 2.4 ChimeraX-Help: 1.2.1 ChimeraX-HKCage: 1.3 ChimeraX-IHM: 1.1 ChimeraX-ImageFormats: 1.2 ChimeraX-IMOD: 1.0 ChimeraX-IO: 1.0.1 ChimeraX-ItemsInspection: 1.0.1 ChimeraX-IUPAC: 1.0 ChimeraX-Label: 1.1.7 ChimeraX-ListInfo: 1.2 ChimeraX-Log: 1.1.5 ChimeraX-LookingGlass: 1.1 ChimeraX-Maestro: 1.8.2 ChimeraX-Map: 1.1.4 ChimeraX-MapData: 2.0 ChimeraX-MapEraser: 1.0.1 ChimeraX-MapFilter: 2.0.1 ChimeraX-MapFit: 2.0 ChimeraX-MapSeries: 2.1.1 ChimeraX-Markers: 1.0.1 ChimeraX-Mask: 1.0.2 ChimeraX-MatchMaker: 2.1 ChimeraX-MCopy: 1.0 ChimeraX-MDcrds: 2.6 ChimeraX-MedicalToolbar: 1.0.2 ChimeraX-Meeting: 1.0.1 ChimeraX-MLP: 1.1.1 ChimeraX-mmCIF: 2.12 ChimeraX-MMTF: 2.2 ChimeraX-Modeller: 1.5.9 ChimeraX-ModelPanel: 1.4 ChimeraX-ModelSeries: 1.0.1 ChimeraX-Mol2: 2.0 ChimeraX-Mole: 1.0 ChimeraX-Morph: 1.0.2 ChimeraX-MouseModes: 1.2 ChimeraX-Movie: 1.0 ChimeraX-Neuron: 1.0 ChimeraX-Nifti: 1.1 ChimeraX-NRRD: 1.1 ChimeraX-Nucleotides: 2.0.3 ChimeraX-OpenCommand: 1.10.2 ChimeraX-PDB: 2.7.2 ChimeraX-PDBBio: 1.0.1 ChimeraX-PDBLibrary: 1.0.2 ChimeraX-PDBMatrices: 1.0 ChimeraX-PickBlobs: 1.0.1 ChimeraX-Positions: 1.0 ChimeraX-PresetMgr: 1.1 ChimeraX-PubChem: 2.1 ChimeraX-ReadPbonds: 1.0.1 ChimeraX-Registration: 1.1.1 ChimeraX-RemoteControl: 1.0 ChimeraX-RenderByAttr: 1.1 ChimeraX-RenumberResidues: 1.1 ChimeraX-ResidueFit: 1.0.1 ChimeraX-RestServer: 1.2 ChimeraX-RNALayout: 1.0 ChimeraX-RotamerLibMgr: 3.0 ChimeraX-RotamerLibsDunbrack: 2.0 ChimeraX-RotamerLibsDynameomics: 2.0 ChimeraX-RotamerLibsRichardson: 2.0 ChimeraX-SaveCommand: 1.5.1 ChimeraX-SchemeMgr: 1.0 ChimeraX-SDF: 2.0.1 ChimeraX-Segger: 1.0 ChimeraX-Segment: 1.0.1 ChimeraX-SelInspector: 1.0 ChimeraX-SeqView: 2.9 ChimeraX-Shape: 1.0.1 ChimeraX-Shell: 1.0.1 ChimeraX-Shortcuts: 1.1.1 ChimeraX-ShowSequences: 1.0.1 ChimeraX-SideView: 1.0.1 ChimeraX-Smiles: 2.1.2 ChimeraX-SmoothLines: 1.0 ChimeraX-SpaceNavigator: 1.0 ChimeraX-StdCommands: 1.12.1 ChimeraX-STL: 1.0.1 ChimeraX-Storm: 1.0 ChimeraX-StructMeasure: 1.1.2 ChimeraX-Struts: 1.0.1 ChimeraX-Surface: 1.0.1 ChimeraX-SwapAA: 2.0.1 ChimeraX-SwapRes: 2.2.1 ChimeraX-TapeMeasure: 1.0 ChimeraX-Test: 1.0 ChimeraX-Toolbar: 1.1.2 ChimeraX-ToolshedUtils: 1.2.4 ChimeraX-Topography: 1.0 ChimeraX-ToQuest: 1.0 ChimeraX-Tug: 1.0.1 ChimeraX-UI: 1.30.2 ChimeraX-uniprot: 2.3 ChimeraX-UnitCell: 1.0.1 ChimeraX-ViewDockX: 1.2.2 ChimeraX-VIPERdb: 1.0 ChimeraX-Vive: 1.1 ChimeraX-VolumeMenu: 1.0.1 ChimeraX-VTK: 1.0 ChimeraX-WavefrontOBJ: 1.0 ChimeraX-WebCam: 1.0.2 ChimeraX-WebServices: 1.1.1 ChimeraX-Zone: 1.0.1 colorama: 0.4.6 comm: 0.1.3 contourpy: 1.1.0 cxservices: 1.2.2 cycler: 0.11.0 Cython: 0.29.33 debugpy: 1.6.7 decorator: 5.1.1 docutils: 0.19 executing: 1.2.0 filelock: 3.9.0 fonttools: 4.41.0 funcparserlib: 1.0.1 grako: 3.16.5 h5py: 3.9.0 html2text: 2020.1.16 idna: 3.4 ihm: 0.38 imagecodecs: 2023.7.10 imagesize: 1.4.1 ipykernel: 6.23.2 ipython: 8.14.0 ipython-genutils: 0.2.0 ipywidgets: 8.0.7 jedi: 0.18.2 Jinja2: 3.1.2 jupyter-client: 8.2.0 jupyter-core: 5.3.1 jupyterlab-widgets: 3.0.8 kiwisolver: 1.4.4 line-profiler: 4.0.2 lxml: 4.9.2 lz4: 4.3.2 MarkupSafe: 2.1.3 matplotlib: 3.7.2 matplotlib-inline: 0.1.6 msgpack: 1.0.4 nest-asyncio: 1.5.6 netCDF4: 1.6.2 networkx: 3.1 nibabel: 5.0.1 nptyping: 2.5.0 numexpr: 2.8.4 numpy: 1.25.1 openvr: 1.23.701 packaging: 21.3 ParmEd: 3.4.3 parso: 0.8.3 pep517: 0.13.0 pexpect: 4.8.0 pickleshare: 0.7.5 Pillow: 10.0.0 pip: 23.0 pkginfo: 1.9.6 platformdirs: 3.9.1 prompt-toolkit: 3.0.39 psutil: 5.9.5 ptyprocess: 0.7.0 pure-eval: 0.2.2 py-cpuinfo: 9.0.0 pycollada: 0.7.2 pydicom: 2.3.0 Pygments: 2.14.0 pynrrd: 1.0.0 PyOpenGL: 3.1.7 PyOpenGL-accelerate: 3.1.7 pyparsing: 3.0.9 pyproject-hooks: 1.0.0 PyQt6-commercial: 6.5.1 PyQt6-Qt6: 6.5.1 PyQt6-sip: 13.5.1 PyQt6-WebEngine-commercial: 6.5.0 PyQt6-WebEngine-Qt6: 6.5.1 python-dateutil: 2.8.2 pytz: 2023.3 pyzmq: 25.1.0 qtconsole: 5.4.3 QtPy: 2.3.1 RandomWords: 0.4.0 requests: 2.31.0 scipy: 1.11.1 setuptools: 67.4.0 setuptools-scm: 7.0.5 sfftk-rw: 0.7.3 six: 1.16.0 snowballstemmer: 2.2.0 sortedcontainers: 2.4.0 soupsieve: 2.4.1 sphinx: 6.1.3 sphinx-autodoc-typehints: 1.22 sphinxcontrib-applehelp: 1.0.4 sphinxcontrib-blockdiag: 3.0.0 sphinxcontrib-devhelp: 1.0.2 sphinxcontrib-htmlhelp: 2.0.1 sphinxcontrib-jsmath: 1.0.1 sphinxcontrib-qthelp: 1.0.3 sphinxcontrib-serializinghtml: 1.1.5 stack-data: 0.6.2 tables: 3.8.0 tcia-utils: 1.5.1 tifffile: 2023.7.10 tinyarray: 1.2.4 tomli: 2.0.1 tornado: 6.3.2 traitlets: 5.9.0 typing-extensions: 4.7.1 tzdata: 2023.3 urllib3: 2.0.3 wcwidth: 0.2.6 webcolors: 1.12 wheel: 0.38.4 wheel-filename: 1.4.1 widgetsnbextension: 4.0.8 File attachment: Screen Shot 2023-07-18 at 9.26.49 AM.png
Attachments (1)
Change History (20)
by , 2 years ago
Attachment: | Screen Shot 2023-07-18 at 9.26.49 AM.png added |
---|
comment:1 by , 2 years ago
Cc: | added |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Blank HTML widgets in daily build |
Whereas on my 2015 Intel iMac also running 12.6.7, the HTML windows in the daily build are fine.
comment:2 by , 2 years ago
Probably caused by updating to Qt 6.5.1 yesterday. HTML widgets worked yesterday in my test on Intel Mac, but I did not test on ARM Mac. Surprised that does not work and will investigate today.
comment:3 by , 2 years ago
Component: | Unassigned → Window Toolkit |
---|
comment:4 by , 2 years ago
If I build ChimeraX on the Mac ARM build machine without notarization using the licensed PyQt it works. Also building on my Mac ARM laptop works.
I think I saw this problem before where notarization breaks the separate QWebEngineProcess.app that Qt starts for each html window. I forget how I fixed it last time.
comment:5 by , 2 years ago
Comment 17 of my initial port #4663 of ChimeraX to Mac M1 had the same problem where QtWebEngineProcess.app was crashing at startup. I see in the Mac Console app under crash reports that the QtWebEngineProcess.app crashes when ChimeraX starts but the crash report does not indicate why it crashed. I guess it is a codesign problem but I haven't seen an error message that confirms that. It is not clear in #4663 what the solution was.
comment:6 by , 2 years ago
Three possibilities that I remember:
(1) Something is modified in the QtWebEngineProcess app after signing.
(2) Something in the QtWebEngineProcess app references a non-system library outside the app.
(3) Something is identified as a Mach-O binary needing signing that is not in fact a Mach-O binary.
comment:7 by , 2 years ago
Thanks for the ideas. I find that if I replace the QtWebEngineProcess executable with the one from the wheel that we did not sign then ChimeraX works. If we sign it, "codesign -vvvv" says it is good, but it crashes on startup. I don't have any lead on why it crashes on startup. It gives a full crash dump for QtWebEngineProcess that says it got SIGTRAP, but I did not see any indicator of what caused the crash. Actually the crash report says
"codeSigningID" : "org.qt-project.Qt.QtWebEngineProcess",
which seems odd given that we resigned it so I would think the old signature would be erased.
comment:8 by , 2 years ago
Having no good lead I'm running an experiment to see if ChimeraX html panels work if we do not sign QtWebEngineProcess.
comment:9 by , 2 years ago
Notarization of ChimeraX fails if it does not sign QtWebEngineProcess. I need a clue about why it is crashing when signed. Maybe it is not because of a signature failure, but somehow the signature causes it to crash.
The Qt 6.5 release announcement says "Qt WebEngine has been updated to Chromium 108, and even includes Chromium 110 security patches. Now it supports hardware accelerated video rendering on Linux under Vulkan for both X11 and Wayland."
comment:10 by , 2 years ago
The fact that it works on Intel but not ARM has to be some kind of clue. Maybe something to do with combining the binaries.
comment:11 by , 2 years ago
The ARM-only daily build fails in the same way, so it is not a problem with the universal build.
Simply replacing the QtWebEngineProcess executable with an unsigned version from my development build fixes it. So it is something related to the signing. Maybe if it is signed then its permissions are restricted and the app is violating those restrictions (e.g. by accessing some resources it is not allowed to access). But the crash reports say nothing useful that I can see. Here is an example crash of QtWebEngineProcess
{"app_name":"QtWebEngineProcess","timestamp":"2023-07-18 10:35:24.00 -0700","app_version":"","slice_uuid":"951bff85-9dc0-3782-847b-5ef8373b2735","build_version":"","platform":1,"bundleID":"org.qt-project.Qt.QtWebEngineProcess","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.3.1 (22E261)","roots_installed":0,"name":"QtWebEngineProcess","incident_id":"A6F5FEFF-7359-4BCC-A59F-787B797C0D94"} { "uptime" : 660000, "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookPro18,2", "coalitionID" : 47745, "osVersion" : { "train" : "macOS 13.3.1", "build" : "22E261", "releaseType" : "User" }, "captureTime" : "2023-07-18 10:35:24.3670 -0700", "incident" : "A6F5FEFF-7359-4BCC-A59F-787B797C0D94", "pid" : 68077, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2023-07-18 10:35:24.2957 -0700", "procStartAbsTime" : 15889017742556, "procExitAbsTime" : 15889019426736, "procName" : "QtWebEngineProcess", "procPath" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtWebEngineCore.framework\/Helpers\/QtWebEngineProcess.app\/Contents\/MacOS\/QtWebEngineProcess", "bundleInfo" : {"CFBundleShortVersionString":"","CFBundleVersion":"","CFBundleIdentifier":"org.qt-project.Qt.QtWebEngineProcess"}, "storeInfo" : {"deviceIdentifierForVendor":"5231680A-DAE8-5DF8-B25D-1484C844C234","thirdParty":true}, "parentProc" : "ChimeraX", "parentPid" : 68075, "coalitionName" : "edu.ucsf.cgl.ChimeraX", "crashReporterKey" : "BA6E14FF-9FD1-806E-F23A-DBA948840378", "responsiblePid" : 68075, "responsibleProc" : "ChimeraX", "codeSigningID" : "org.qt-project.Qt.QtWebEngineProcess", "codeSigningTeamID" : "LWV8X224YF", "codeSigningFlags" : 570491649, "codeSigningValidationCategory" : 6, "codeSigningTrustLevel" : 0, "wakeTime" : 793, "sleepWakeUUID" : "D73D9F48-B6D0-4983-82AB-C13127CCC4D2", "sip" : "enabled", "exception" : {"codes":"0x0000000000000001, 0x000000011df4a5e0","rawCodes":[1,4797539808],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"}, "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":68077}, "os_fault" : {"process":"QtWebEngineProcess"}, "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":5670054,"threadState":{"x":[{"value":0},{"value":18446744073709551615},{"value":7},{"value":3},{"value":4},{"value":624},{"value":105553137926768},{"value":2976},{"value":13},{"value":8707834128,"symbolLocation":0,"symbol":"errno"},{"value":4806574976},{"value":25},{"value":14},{"value":2095104},{"value":2043},{"value":2147676174},{"value":7176210668,"symbolLocation":0,"symbol":"__error"},{"value":2147676174},{"value":0},{"value":268435456},{"value":1},{"value":5637144576},{"value":16384},{"value":105553162100384},{"value":105553162100472},{"value":105553162100408},{"value":4897477160,"symbolLocation":274264,"symbol":"vtable for QtWebEngineCore::ColorChooserController"},{"value":5503012456},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4747569464},"cpsr":{"value":2684358656},"fp":{"value":6103997856},"sp":{"value":6103997760},"esr":{"value":4060086272,"description":"(Breakpoint) brk 0"},"pc":{"value":4797539808,"matchesCrashFrame":1},"far":{"value":4797539808}},"name":"CrRendererMain","queue":"com.apple.main-thread","frames":[{"imageOffset":64841184,"imageIndex":1},{"imageOffset":14870840,"imageIndex":1},{"imageOffset":14872072,"imageIndex":1},{"imageOffset":11998132,"imageIndex":1},{"imageOffset":14715580,"imageIndex":1},{"imageOffset":14718848,"imageIndex":1},{"imageOffset":18260800,"imageIndex":1},{"imageOffset":11879956,"imageIndex":1},{"imageOffset":92372356,"imageIndex":1},{"imageOffset":92371840,"imageIndex":1},{"imageOffset":124743072,"imageIndex":1},{"imageOffset":124744140,"imageIndex":1},{"imageOffset":109220596,"imageIndex":1},{"imageOffset":108655776,"imageIndex":1},{"imageOffset":107492496,"imageIndex":1},{"imageOffset":107487696,"imageIndex":1},{"imageOffset":107491992,"imageIndex":1},{"imageOffset":107523392,"imageIndex":1},{"imageOffset":57341252,"imageIndex":1},{"imageOffset":57344036,"imageIndex":1},{"imageOffset":57337080,"imageIndex":1},{"imageOffset":57339352,"imageIndex":1},{"imageOffset":597360,"symbol":"QtWebEngineCore::processMain(int, char const**)","symbolLocation":208,"imageIndex":1},{"imageOffset":32288,"symbol":"main","symbolLocation":372,"imageIndex":0},{"imageOffset":24360,"symbol":"start","symbolLocation":2236,"imageIndex":14}]},{"id":5670056,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":5670057,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":5670063,"name":"ThreadPoolServiceThread","frames":[{"imageOffset":52712,"symbol":"kevent64","symbolLocation":8,"imageIndex":16},{"imageOffset":66456416,"imageIndex":1},{"imageOffset":66456056,"imageIndex":1},{"imageOffset":66095840,"imageIndex":1},{"imageOffset":65841224,"imageIndex":1},{"imageOffset":66244748,"imageIndex":1},{"imageOffset":66148516,"imageIndex":1},{"imageOffset":66245124,"imageIndex":1},{"imageOffset":66405820,"imageIndex":1},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":5670064,"name":"ThreadPoolForegroundWorker","frames":[{"imageOffset":3860,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":16},{"imageOffset":78400,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":16},{"imageOffset":39800,"symbol":"mach_msg_overwrite","symbolLocation":604,"imageIndex":16},{"imageOffset":4752,"symbol":"mach_msg","symbolLocation":24,"imageIndex":16},{"imageOffset":66432988,"imageIndex":1},{"imageOffset":66194376,"imageIndex":1},{"imageOffset":66197284,"imageIndex":1},{"imageOffset":66196288,"imageIndex":1},{"imageOffset":66196016,"imageIndex":1},{"imageOffset":66405820,"imageIndex":1},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":5670065,"name":"ThreadPoolBackgroundWorker","frames":[{"imageOffset":3860,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":16},{"imageOffset":78400,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":16},{"imageOffset":39800,"symbol":"mach_msg_overwrite","symbolLocation":604,"imageIndex":16},{"imageOffset":4752,"symbol":"mach_msg","symbolLocation":24,"imageIndex":16},{"imageOffset":66432988,"imageIndex":1},{"imageOffset":66194376,"imageIndex":1},{"imageOffset":66196656,"imageIndex":1},{"imageOffset":66196156,"imageIndex":1},{"imageOffset":66196064,"imageIndex":1},{"imageOffset":66405820,"imageIndex":1},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":5670066,"name":"Chrome_ChildIOThread","frames":[{"imageOffset":52712,"symbol":"kevent64","symbolLocation":8,"imageIndex":16},{"imageOffset":66456416,"imageIndex":1},{"imageOffset":66456056,"imageIndex":1},{"imageOffset":66095840,"imageIndex":1},{"imageOffset":65841224,"imageIndex":1},{"imageOffset":66244748,"imageIndex":1},{"imageOffset":106528564,"imageIndex":1},{"imageOffset":66245124,"imageIndex":1},{"imageOffset":66405820,"imageIndex":1},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":5670067,"name":"ThreadPoolForegroundWorker","frames":[{"imageOffset":3860,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":16},{"imageOffset":78400,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":16},{"imageOffset":39800,"symbol":"mach_msg_overwrite","symbolLocation":604,"imageIndex":16},{"imageOffset":4752,"symbol":"mach_msg","symbolLocation":24,"imageIndex":16},{"imageOffset":66432988,"imageIndex":1},{"imageOffset":66194376,"imageIndex":1},{"imageOffset":66196656,"imageIndex":1},{"imageOffset":66196288,"imageIndex":1},{"imageOffset":66196016,"imageIndex":1},{"imageOffset":66405820,"imageIndex":1},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":5670068,"name":"GpuMemoryThread","frames":[{"imageOffset":3860,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":16},{"imageOffset":78400,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":16},{"imageOffset":39800,"symbol":"mach_msg_overwrite","symbolLocation":604,"imageIndex":16},{"imageOffset":4752,"symbol":"mach_msg","symbolLocation":24,"imageIndex":16},{"imageOffset":66432988,"imageIndex":1},{"imageOffset":66432480,"imageIndex":1},{"imageOffset":65638108,"imageIndex":1},{"imageOffset":66095840,"imageIndex":1},{"imageOffset":65841224,"imageIndex":1},{"imageOffset":66244748,"imageIndex":1},{"imageOffset":66245124,"imageIndex":1},{"imageOffset":66405820,"imageIndex":1},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4362878976, "CFBundleShortVersionString" : "", "CFBundleIdentifier" : "org.qt-project.Qt.QtWebEngineProcess", "size" : 32768, "uuid" : "951bff85-9dc0-3782-847b-5ef8373b2735", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtWebEngineCore.framework\/Helpers\/QtWebEngineProcess.app\/Contents\/MacOS\/QtWebEngineProcess", "name" : "QtWebEngineProcess", "CFBundleVersion" : "" }, { "source" : "P", "arch" : "arm64", "base" : 4732698624, "size" : 164446208, "uuid" : "846a3706-1eeb-32e5-9532-e6b495ec44ca", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtWebEngineCore.framework\/Versions\/A\/QtWebEngineCore", "name" : "QtWebEngineCore" }, { "source" : "P", "arch" : "arm64", "base" : 4374396928, "size" : 3899392, "uuid" : "a3b3ddab-a9f4-3716-8815-b55c7f8c3715", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtQuick.framework\/Versions\/A\/QtQuick", "name" : "QtQuick" }, { "source" : "P", "arch" : "arm64", "base" : 4364730368, "size" : 524288, "uuid" : "504483f4-aba2-3a3f-8e8f-2efb9ef18377", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtQmlModels.framework\/Versions\/A\/QtQmlModels", "name" : "QtQmlModels" }, { "source" : "P", "arch" : "arm64", "base" : 4365451264, "size" : 393216, "uuid" : "5c0dd254-d593-3b30-b7e5-94c99a9759d7", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtOpenGL.framework\/Versions\/A\/QtOpenGL", "name" : "QtOpenGL" }, { "source" : "P", "arch" : "arm64", "base" : 4366057472, "size" : 6488064, "uuid" : "3a2e92dd-0766-3cab-a7c0-8be58840302a", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtGui.framework\/Versions\/A\/QtGui", "name" : "QtGui" }, { "source" : "P", "arch" : "arm64", "base" : 4363878400, "size" : 180224, "uuid" : "eb327b1c-c407-32e3-903a-2866ccdede57", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtWebChannel.framework\/Versions\/A\/QtWebChannel", "name" : "QtWebChannel" }, { "source" : "P", "arch" : "arm64", "base" : 4389421056, "size" : 3751936, "uuid" : "51d09840-1778-3e93-a6e3-131399e64a2d", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtQml.framework\/Versions\/A\/QtQml", "name" : "QtQml" }, { "source" : "P", "arch" : "arm64", "base" : 4382769152, "size" : 1081344, "uuid" : "9271e4d4-9021-32ab-8cf4-6b4de6149ffc", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtNetwork.framework\/Versions\/A\/QtNetwork", "name" : "QtNetwork" }, { "source" : "P", "arch" : "arm64", "base" : 4363255808, "size" : 442368, "uuid" : "085a429e-84ec-31b7-98eb-f3c3fa63c55d", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtPositioning.framework\/Versions\/A\/QtPositioning", "name" : "QtPositioning" }, { "source" : "P", "arch" : "arm64", "base" : 4405657600, "size" : 4718592, "uuid" : "96ff8988-bf0b-3668-99dc-2c3d6b9325f9", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtCore.framework\/Versions\/A\/QtCore", "name" : "QtCore" }, { "source" : "P", "arch" : "arm64", "base" : 4381196288, "size" : 524288, "uuid" : "6ea13fe0-eaa0-34c3-a862-c57f35a24f56", "path" : "\/Users\/USER\/Desktop\/ChimeraX July 18 2023.app\/Contents\/Library\/Frameworks\/Python.framework\/Versions\/3.11\/lib\/python3.11\/site-packages\/PyQt6\/Qt6\/lib\/QtDBus.framework\/Versions\/A\/QtDBus", "name" : "QtDBus" }, { "source" : "P", "arch" : "arm64e", "base" : 4364484608, "size" : 49152, "uuid" : "80f14f3d-d099-3693-a8e0-eb9a526b1790", "path" : "\/usr\/lib\/libobjc-trampolines.dylib", "name" : "libobjc-trampolines.dylib" }, { "source" : "P", "arch" : "arm64e", "base" : 4374069248, "CFBundleShortVersionString" : "3.0", "CFBundleIdentifier" : "com.apple.security.csparser", "size" : 131072, "uuid" : "862735d9-d84d-31b0-bfa8-d75e2271af1a", "path" : "\/System\/Library\/Frameworks\/Security.framework\/Versions\/A\/PlugIns\/csparser.bundle\/Contents\/MacOS\/csparser", "name" : "csparser", "CFBundleVersion" : "60420.101.4" }, { "source" : "P", "arch" : "arm64e", "base" : 7172939776, "size" : 582972, "uuid" : "ac277a36-1808-327a-8761-cca585421212", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "source" : "P", "arch" : "arm64e", "base" : 7176441856, "size" : 53248, "uuid" : "b401cfb3-8dfe-32db-92b3-ba8af0f8ca6e", "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib", "name" : "libsystem_pthread.dylib" }, { "source" : "P", "arch" : "arm64e", "base" : 7176204288, "size" : 237544, "uuid" : "7acbd9bc-d056-310e-858d-81b116cf6d28", "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib", "name" : "libsystem_kernel.dylib" } ], "sharedCache" : { "base" : 7172276224, "size" : 3539533824, "uuid" : "ebddd61c-5dcf-399c-a88b-759edf197103" }, "vmSummary" : "ReadOnly portion of Libraries: Total=1.5G resident=0K(0%) swapped_out_or_unallocated=1.5G(100%)\nWritable regions: Total=1.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.1G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nKernel Alloc Once 32K 1 \nMALLOC 222.2M 26 \nMALLOC guard page 96K 5 \nMALLOC_MEDIUM (reserved) 480.0M 4 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nMach message 32K 2 \nMemory Tag 253 32.0G 44 \nMemory Tag 255 1.1T 14 \nMemory Tag 255 (reserved) 1024K 1 reserved VM address space (unallocated)\nSTACK GUARD 56.1M 9 \nStack 57.2M 10 \nVM_ALLOCATE 16K 1 \n__AUTH 1696K 346 \n__AUTH_CONST 27.6M 569 \n__CTF 824 1 \n__DATA 21.8M 573 \n__DATA_CONST 34.9M 586 \n__DATA_DIRTY 1946K 220 \n__FONT_DATA 2352 1 \n__INFO_FILTER 8 1 \n__LINKEDIT 807.8M 15 \n__OBJC_RO 66.2M 1 \n__OBJC_RW 2011K 1 \n__TEXT 776.0M 605 \ndyld private memory 272K 2 \nmapped file 60.4M 13 \nshared memory 1216K 11 \n=========== ======= ======= \nTOTAL 1.1T 3064 \nTOTAL, minus reserved VM space 1.1T 3064 \n", "legacyInfo" : { "threadTriggered" : { "name" : "CrRendererMain", "queue" : "com.apple.main-thread" } }, "logWritingSignature" : "bd9460315b8883eb48e67bdd6a930627b2d90b6c", "trialInfo" : { "rollouts" : [ { "rolloutId" : "5f72dc58705eff005a46b3a9", "factorPackIds" : { }, "deploymentId" : 240000015 }, { "rolloutId" : "6297d96be2c9387df974efa4", "factorPackIds" : { }, "deploymentId" : 240000008 } ], "experiments" : [ { "treatmentId" : "c28e4ee6-1b08-4f90-8e05-2809e78310a3", "experimentId" : "6317d2003d24842ff850182a", "deploymentId" : 400000013 } ] } }
comment:12 by , 2 years ago
I wrote a simple test application that shows a QWebEngineView to test directly with ChimeraX python3.11, code below. With my development build with Qt 6.5.1 it works showing the web page and with the daily build it shows a blank window and issues warning
$ ./python3.11 ~/Desktop/wv.py Compositor returned null texture
I only got this warning one time. In 10 subsequent tries it never gave the Compositor warning but still the window is blank.
This makes me think the ChimeraX signing does not grant some entitlement to use the compositor. My development build QtWebEngineProcess has an adhoc signature from the PyQt commercial wheel.
Test code wv.py
from Qt.QtWebEngineWidgets import QWebEngineView from Qt.QtWidgets import QApplication, QFrame a = QApplication(['myapp']) v = QWebEngineView() from Qt.QtCore import QUrl v.setUrl(QUrl('https://www.rbvi.ucsf.edu/chimerax/')) v.show() a.exec()
comment:13 by , 2 years ago
Looking at what entitlements Chrome uses on Mac does not suggest we are missing critical ones. The list bluetooth, camera, print, usb, personal-information.location.
https://chromium.googlesource.com/chromium/src/+/HEAD/chrome/app/app-entitlements.plist
Our notarization adds
<!-- These 3 entitlements are so that the Python ctypes module works --> <key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/> <key>com.apple.security.cs.disable-library-validation</key><true/> <key>com.apple.security.cs.allow-dyld-environment-variables</key><true/> <!-- Camera and audio entitlements are so that the ChimeraX webcam command works --> <key>com.apple.security.device.camera</key><true/> <key>com.apple.security.device.audio-input</key><true/>
I would not think bluetooth, print, usb, or personal-information.location would cause a crash of QtWebEngineProcess, but hard to tell.
I studied the system logs when ChimeraX starts using the mac Console app and could not find any error message indicating why QtWebEngineProcess is failing.
I tried using QTWEBENGINE_CHROMIUM_FLAGS as described here https://doc.qt.io/qt-6/qtwebengine-debugging.html to get more logging info but did not get anything on stderr, nor did using qInstallMessageHandler() help get any logging.
But I noticed in the console log just before QtWebEngineProcess crashes the following
CODE SIGNING: 87195[QtWebEngineProce] vm_map_protect:6059(0x0,0x0,0x7) can't have both write and exec at the same time
and searching for that led me to https://forum.qt.io/topic/102212/qtwebengine-signing-issues/3 which is old from 2019 but said that entitlement "com.apple.security.cs.disable-executable-page-protection" was needed to avoid QtWebEngineProcess crashes. Maybe our ChimeraX entitlement "com.apple.security.cs.allow-unsigned-executable-memory" is causing the issue.
This page describes the Apple entitlements related to executable memory: https://developer.apple.com/documentation/security/hardened_runtime
It may be that the com.apple.security.cs.allow-jit entitlement is what is needed, as mentioned here https://bugs.chromium.org/p/chromium/issues/detail?id=850193
I can try running the notarization script on Qt 6.5 ChimeraX builds under the chimera account on euclid to see if these extra entitlements resolve the problem.
comment:14 by , 2 years ago
I reverted daily builds on all platforms from PyQt 6.5.1 to PyQt 6.4.2.
It seems that the Qt 6.5 update of Chromium prevents it from running on Mac ARM when signed. I recall Intel macOS was more tolerant than ARM macOS about the need for signing in the past, perhaps explaining why the problem is only on Mac ARM. Adhoc signing of QtWebEngineProcess fixes the problem and that is the signing that the commercial PyQt6 wheel provides. But notarization cannot be done with adhoc signing. I tried dtruss to trace system calls to see where QtWebEngineProcess may be failing but security restrictions prevent it from tracing so that did not work. I don't have further ideas about how to figure out why signing causes QtWebEngineProcess to crash. I think it would be too much work to try to compile it. Maybe the best hope is that someone working on another notarized Qt 6.5 app using QtWebEngine on Mac ARM will solve it and we can learn the solution from them.
comment:15 by , 2 years ago
You know, QtWebEngineProcess is an app, so you could try to use 'open' on it and see what happens. For 1.6.1 it's /Applications/ChimeraX-1.6.1.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyQt6/Qt6/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app. You could also try running the binary directly, which is under Contents/MacOS.
comment:16 by , 2 years ago
Tried that yesterday. It behaves just like the working app. Both exit because it needs to connect to the process that owns the Qt window. I have some new leads on what signing entitlements might fix the issue that I will try today.
comment:17 by , 2 years ago
I found a solution, adding the Apple notarization entitlement com.apple.security.cs.allow-jit. This post about Chromium clued me in
https://bugs.chromium.org/p/chromium/issues/detail?id=850193
and this page describes the Apple entitlements related to executable memory
https://developer.apple.com/documentation/security/hardened_runtime
What is probably going on is that the new Chromium in Qt 6.5 uses some just-in-time compilation of JavaScript that creates executable code in memory, that Apple security does not like.
I notarized and tested with Qt 6.5.1 on our Mac ARM build machine euclid, but I want to test the resulting dmg on another Mac ARM machine before checking in the fix.
comment:19 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed.
Added Apple notarization entitlement com.apple.security.cs.allow-jit to make the notarized Qt 6.5.1 html widgets work.
Added by email2trac