RFR: 8370141: [macOS] Crash after PrinterJob ends when Graphics.create() is used.
Sergey Bylokhov
serb at openjdk.org
Tue Oct 21 20:33:48 UTC 2025
On Tue, 21 Oct 2025 18:19:04 GMT, Phil Race <prr at openjdk.org> wrote:
>> src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java line 833:
>>
>>> 831: }
>>> 832: painter.print(pathGraphics, FlipPageFormat.getOriginal(page), pageIndex);
>>> 833: delegate.surfaceData.invalidate();
>>
>> how this code synchronized? is it always executed on EDT?
>
> I don't know where you are headed. All it does is set a boolean variable and there's no reason to be on the EDT.
I meant, is it possible to get this surfaceData before invalidation on one thread, start rendering to it, and then call delegate.dispose() on another thread? Don't we need some kind of synchronization or is it already somehow implemented?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27905#discussion_r2449626316
More information about the client-libs-dev
mailing list