-
Bug
-
Resolution: Unresolved
-
P4
-
8, 21, 25
-
None
This is very similar to the macOS bug
https://bugs.openjdk.org/browse/JDK-8370141 but is entirely windows-specific.
It is also somewhat harder to reproduce, but does if multiple threads are in use.
When the native Windows GDI call is made, to conclude the job
EndDoc((HDC)printerDC) call
it invalidates the HDC (handle to device contest).
Then depending on timing a call which uses the DC may be made and cause a crash.
The solution appears to be to synchronize this call to release the dc and all calls which use it on the same lock - the WPrinterJob instance seems like the right place.
https://bugs.openjdk.org/browse/JDK-8370141 but is entirely windows-specific.
It is also somewhat harder to reproduce, but does if multiple threads are in use.
When the native Windows GDI call is made, to conclude the job
EndDoc((HDC)printerDC) call
it invalidates the HDC (handle to device contest).
Then depending on timing a call which uses the DC may be made and cause a crash.
The solution appears to be to synchronize this call to release the dc and all calls which use it on the same lock - the WPrinterJob instance seems like the right place.
- links to
-
Review(master)
openjdk/jdk/27984