diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index fac9049f..459a86dc 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "d909f2759066afd128aa1a299d3367c7ab76da8f" + echo "c86955d3806879fc97b127730e9fb90e232710a7" } # Show version information @@ -255,6 +255,7 @@ patch_enable_all () enable_winex11_drv_Query_server_position="$1" enable_wininet_Cleanup="$1" enable_winmm_mciSendCommandA="$1" + enable_winspool_drv_ClosePrinter="$1" enable_wintab32_improvements="$1" enable_wintrust_WTHelperGetProvCertFromChain="$1" enable_ws2_32_SIO_IDEAL_SEND_BACKLOG_QUERY="$1" @@ -788,6 +789,9 @@ patch_enable () winmm-mciSendCommandA) enable_winmm_mciSendCommandA="$2" ;; + winspool.drv-ClosePrinter) + enable_winspool_drv_ClosePrinter="$2" + ;; wintab32-improvements) enable_wintab32_improvements="$2" ;; @@ -3785,6 +3789,18 @@ if test "$enable_winmm_mciSendCommandA" -eq 1; then patch_apply winmm-mciSendCommandA/0001-winmm-Do-not-crash-in-Win-9X-mode-when-an-invalid-de.patch fi +# Patchset winspool.drv-ClosePrinter +# | +# | This patchset fixes the following Wine bugs: +# | * [#53425] - Add more tracing to ClosePrinter +# | +# | Modified files: +# | * dlls/winspool.drv/info.c +# | +if test "$enable_winspool_drv_ClosePrinter" -eq 1; then + patch_apply winspool.drv-ClosePrinter/0001-winspool.drv-Add-more-tracing-to-ClosePrinter.patch +fi + # Patchset wintab32-improvements # | # | This patchset fixes the following Wine bugs: diff --git a/patches/winspool.drv-ClosePrinter/0001-winspool.drv-Add-more-tracing-to-ClosePrinter.patch b/patches/winspool.drv-ClosePrinter/0001-winspool.drv-Add-more-tracing-to-ClosePrinter.patch new file mode 100644 index 00000000..b6592782 --- /dev/null +++ b/patches/winspool.drv-ClosePrinter/0001-winspool.drv-Add-more-tracing-to-ClosePrinter.patch @@ -0,0 +1,35 @@ +From 98ceaf4ecb3682152baebf2aa38d2de839ac7cea Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sat, 30 Jul 2022 18:08:00 +1000 +Subject: [PATCH] winspool.drv: Add more tracing to ClosePrinter + +--- + dlls/winspool.drv/info.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c +index e1cd0338207..0faced259e5 100644 +--- a/dlls/winspool.drv/info.c ++++ b/dlls/winspool.drv/info.c +@@ -2857,15 +2857,18 @@ BOOL WINAPI ClosePrinter(HANDLE hPrinter) + LIST_FOR_EACH_SAFE(cursor, cursor2, &printer->queue->jobs) + { + job_t *job = LIST_ENTRY(cursor, job_t, entry); ++ TRACE("Scheduling Job: %p\n", job); + ScheduleJob(hPrinter, job->job_id); + } + HeapFree(GetProcessHeap(), 0, printer->queue); + } + + if (printer->backend_printer) { ++ TRACE("Closing Bankend printer\n"); + backend->fpClosePrinter(printer->backend_printer); + } + ++ TRACE("Freeing Printer entry\n"); + free_printer_entry( printer ); + printer_handles[i - 1] = NULL; + LeaveCriticalSection(&printer_handles_cs); +-- +2.35.1 + diff --git a/patches/winspool.drv-ClosePrinter/definition b/patches/winspool.drv-ClosePrinter/definition new file mode 100644 index 00000000..5c9f6872 --- /dev/null +++ b/patches/winspool.drv-ClosePrinter/definition @@ -0,0 +1,3 @@ +Fixes: [53425] - Add more tracing to ClosePrinter + +# This is help with working where the crash is occuring.