Created attachment 190322 [details] Lock down extension for the OpenCL page, enabling and locking the feature This is related to the bug 157843 There the example configuration extension locks down the OpenCL feature as disabled - this works. However if the OpenCL feature is locked down as enabled, this leads a startup crash of LO. 1. Install the attached extension in the Tools - Extensions dialog 2. Restart LibreOffice -> crash after start, with terminate called after throwing an instance of 'com::sun::star::lang::IllegalArgumentException' on the console. Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 3649dc202bedf72e37c77993a1f7027bfdfc6d9e CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: hu-HU (hu_HU.UTF-8); UI: en-US Calc: threaded
Repro Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 7d08767b890e723cd502b1c61d250924f695eb98 CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win Locale: en-US (en_FI); UI: en-US Calc: threaded
No repro here -- works as expected. The OpenCL checkbox is grayed out and set to enabled. Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: a1b0fc647d14dc36e9fe238d5bfc81ebcfa1d5dc CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded
After a bit of looking into the issue, this happens in OpenCLConfig::set and OpenCLZone::hardDisable - there is a bit of sanity checking, and if your hardware/driver is not good enough to use OpenCL (but the same pattern is used in OpenGL and Skia), then it disables the feature. Looks like this is a good approach and doing the lockdown to enable stuff is not so wise.