http://bugs.winehq.org/show_bug.cgi?id=19400
--- Comment #8 from Nate Eldredge nate@thatsmathematics.com 2009-11-08 09:24:37 --- I added a hack to PSDRV_FindPrinterInfo where, if passed a null pointer for `name', it uses the value from an environment variable instead. The call to ExtDeviceMode then succeeds. The application GlobalAlloc's and GlobalLock's a block of the appropriate size and passes it to FindPrinterInfo with wMode == DM_COPY which also succeeds. It GlobalUnlock's it, and then crashes. Trace attached.
It looks like this time the crash is coming from inside application code, so it may be harder to debug. I will probably keep looking at this when I have a chance.