Bug 157845 - Locking down the enabled status of the OpenCL feature leads to a startup crash
Summary: Locking down the enabled status of the OpenCL feature leads to a startup crash
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 157843
  Show dependency treegraph
 
Reported: 2023-10-20 09:09 UTC by Gabor Kelemen (allotropia)
Modified: 2024-01-12 13:22 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Lock down extension for the OpenCL page, enabling and locking the feature (1.45 KB, application/vnd.openofficeorg.extension)
2023-10-20 09:09 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-10-20 09:09:15 UTC
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
Comment 1 Buovjaga 2023-10-30 18:22:25 UTC
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
Comment 2 Matt K 2023-12-16 17:56:31 UTC
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
Comment 3 Gabor Kelemen (allotropia) 2024-01-12 13:22:42 UTC
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.