RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v10]
Alexey Ivanov
aivanov at openjdk.org
Thu Oct 5 10:21:26 UTC 2023
On Wed, 4 Oct 2023 05:37:10 GMT, Renjith Kannath Pariyangad <duke at openjdk.org> wrote:
>> Hi Reviewers,
>>
>> Observations :
>> 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry).
>> 2. For Play back device always loading proper device GUID irrespective of com Initialization.
>>
>> Test:
>> Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem.
>> To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green.
>>
>> Please review the changes and let me know your comments if any.
>>
>> Regards,
>> Renjith.
>
> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision:
>
> File permission updated
Changes requested by aivanov (Reviewer).
src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp line 183:
> 181: INT32 cacheIndex;
> 182:
> 183: if (!DS_lockCache() || FAILED(::CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE))) {
This code doesn't handle the case where `CoInitializeEx` returns `RPC_E_CHANGED_MODE`. As [discussed previously](https://github.com/openjdk/jdk/pull/14898#discussion_r1327639556), we can proceed in this case too, but we must not call `CoUninitialize`.
It also need to be handled in the similar code below.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14898#pullrequestreview-1659463318
PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1347179257
More information about the client-libs-dev
mailing list