http://bugs.winehq.org/show_bug.cgi?id=33502
Bug #: 33502 Summary: SnagIt 8.x writes incomplete HKLM\System\CurrentControlSet\Control\Print\Print ers entry, causing loader failures for apps that depend on winspool.drv Product: Wine Version: 1.5.29 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello folks,
split off from bug 12703
@Bruno --- quote --- The program still does not run. The error in console is:
err:module:attach_process_dlls "winspool.drv" failed to initialize, aborting err:module:LdrInitializeThunk Main exe initialization for L"C:\Program Files\TechSmith\SnagIt 8\SnagIt32.exe" failed, status c0000005
I don't know how to circumvent that. --- quote ---
It seems the app installs it's own printer but with incomplete data. Wine's builtin winspool.drv reads the registry data upon initialization. Unfortunately it doesn't expect incomplete entry, crashing in dll entry point. Nasty to debug.
This also breaks all Wine builtin apps that have "winspool.drv" dependency ("winecfg", "notepad" etc.), failing them to start.
--- snip --- ... 000d:Call PE DLL (proc=0x7dfc22d8,module=0x7dfa0000 L"winspool.drv",reason=PROCESS_ATTACH,res=0x1) 000d:Call KERNEL32.DisableThreadLibraryCalls(7dfa0000) ret=7dfc22b7 000d:Ret KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=7dfc22b7 000d:trace:winspool:load_cups 0x7d530240: libcups.so.2 loaded 000d:Call KERNEL32.CreateMutexW(00000000,00000001,7dfc3c00 L"__WINE_WINSPOOL_MUTEX__") ret=7dfa996b 000d:Ret KERNEL32.CreateMutexW() retval=0000007c ret=7dfa996b ... 000d:trace:winspool:WINSPOOL_EnumPrintersW Found 1 printers 000d:Call advapi32.RegEnumKeyW(00000080,00000000,0032f6b6,000000ff) ret=7dfb4771 000d:Ret advapi32.RegEnumKeyW() retval=00000000 ret=7dfb4771 000d:trace:winspool:WINSPOOL_EnumPrintersW Printer 0 is L"SnagIt 8" 000d:Call advapi32.RegOpenKeyW(00000080,0032f6b6 L"SnagIt 8",0032f8b4) ret=7dfb4861 000d:Ret advapi32.RegOpenKeyW() retval=00000000 ret=7dfb4861 000d:Call advapi32.RegQueryValueExW(00000088,7dfc3462 L"Name",00000000,0032f604,0015c04c,0032f608) ret=7dfb2db5 000d:Ret advapi32.RegQueryValueExW() retval=00000000 ret=7dfb2db5 000d:trace:winspool:WINSPOOL_GetStringFromReg L"Name": L"SnagIt 8" 000d:Call advapi32.RegQueryValueExW(00000088,7dfc34a8 L"Port",00000000,0032f604,0015c060,0032f608) ret=7dfb2db5 000d:Ret advapi32.RegQueryValueExW() retval=00000002 ret=7dfb2db5 000d:warn:winspool:WINSPOOL_GetStringFromReg Got ret = 2 000d:Call advapi32.RegQueryValueExW(00000088,7dfc32c0 L"Attributes",00000000,0032f604,0032f600,0032f608) ret=7dfa5a9a 000d:Ret advapi32.RegQueryValueExW() retval=00000002 ret=7dfa5a9a 000d:warn:winspool:get_dword_from_reg Got ret = 2 on name L"Attributes" 000d:Call advapi32.RegQueryValueExW(00000088,7dfc33d8 L"dnsTimeout",00000000,0032f604,0032f600,0032f608) ret=7dfa5a9a 000d:Ret advapi32.RegQueryValueExW() retval=00000002 ret=7dfa5a9a 000d:warn:winspool:get_dword_from_reg Got ret = 2 on name L"dnsTimeout" 000d:Call advapi32.RegQueryValueExW(00000088,7dfc35d8 L"txTimeout",00000000,0032f604,0032f600,0032f608) ret=7dfa5a9a 000d:Ret advapi32.RegQueryValueExW() retval=00000002 ret=7dfa5a9a 000d:warn:winspool:get_dword_from_reg Got ret = 2 on name L"txTimeout" 000d:Call advapi32.RegCloseKey(00000088) ret=7dfb4ae6 000d:Ret advapi32.RegCloseKey() retval=00000000 ret=7dfb4ae6 000d:Call advapi32.RegCloseKey(00000080) ret=7dfb4b07 000d:Ret advapi32.RegCloseKey() retval=00000000 ret=7dfb4b07 000d:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7dfa5219 ip=7dfa5219 tid=000d 000d:trace:seh:raise_exception info[0]=00000000 000d:trace:seh:raise_exception info[1]=00000000 000d:trace:seh:raise_exception eax=00000000 ebx=7dfcb154 ecx=00000005 edx=7dfc3680 esi=7ffdf000 edi=7ffd8000 000d:trace:seh:raise_exception ebp=0032f968 esp=0032f968 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010202 000d:trace:seh:call_stack_handlers calling handler at 0x7bc983b2 code=c0000005 flags=0 --- snip ---
NOTE: no "Port" value.
Source: http://source.winehq.org/git/wine.git/blob/f63d59d640f48f5c734e09c5f0c4e322e...
--- snip --- 1544 static void old_printer_check( BOOL delete_phase ) 1545 { 1546 PRINTER_INFO_5W* pi; 1547 DWORD needed, type, num, delete, i, size; 1548 const DWORD one = 1; 1549 HKEY key; 1550 HANDLE hprn; 1551 1552 EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 5, NULL, 0, &needed, &num ); 1553 if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) return; 1554 1555 pi = HeapAlloc( GetProcessHeap(), 0, needed ); 1556 EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 5, (LPBYTE)pi, needed, &needed, &num ); 1557 for (i = 0; i < num; i++) 1558 { 1559 if (strncmpW( pi[i].pPortName, CUPS_Port, strlenW(CUPS_Port) ) && 1560 strncmpW( pi[i].pPortName, LPR_Port, strlenW(LPR_Port) )) 1561 continue; 1562 1563 if (open_printer_reg_key( pi[i].pPrinterName, &key )) continue; ... --- snip ---
If the printer entry doesn't contain "Port" strncmpW() will cause a crash due to null pointer. Printer info members that are not present in registry are zero-initialized.
Wine should be able to cope with incomplete data.
$ du -sh SnagIt823.exe 14M SnagIt823.exe
$ sha1sum SnagIt823.exe 6314a99f2378de9d072c174ea894d9697a08a546 SnagIt823.exe
$ wine --version wine-1.5.29-38-g8e4317c
Regards
http://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, printing URL| |http://www.oldapps.com/Snag | |IT.php?ModPagespeed=noscrip | |t
http://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23467
http://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|SnagIt 8.x writes |SnagIt 8.x/9.x writes |incomplete |incomplete |HKLM\System\CurrentContro |HKLM\System\CurrentContro |lSet\Control\Print\Print |lSet\Control\Print\Print |ers entry, causing loader |ers entry, causing loader |failures for apps that |failures for apps that |depend on winspool.drv |depend on winspool.drv
--- Comment #1 from Anastasius Focht focht@gmx.net 2013-05-01 15:37:13 CDT --- Hello folks,
revising summary: SnagIt 9.x also writes incomplete printer entry.
Regards
http://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33530
http://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|SnagIt 8.x/9.x writes |SnagIt writes incomplete |incomplete |HKLM\System\CurrentContro |HKLM\System\CurrentContro |lSet\Control\Print\Print |lSet\Control\Print\Print |ers entry, causing loader |ers entry, causing loader |failures for apps that |failures for apps that |depend on winspool.drv |depend on winspool.drv |
--- Comment #2 from Anastasius Focht focht@gmx.net 2013-05-05 13:05:25 CDT --- Hello again,
it seems all SnagIt versions write this printer entry, even the latest 11.x one which is .NET 4.0 based. Refining summary again.
Regards
http://bugs.winehq.org/show_bug.cgi?id=33502
Detlef Riekenberg wine.dev@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine.dev@web.de
https://bugs.winehq.org/show_bug.cgi?id=33502
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 50205 --> https://bugs.winehq.org/attachment.cgi?id=50205 windows XP regedit screenshot
Hi, I'm no longer sure if the problem is that. Actually in Windows it writes a lot of entries, or maybe windows completed it with basic stuff?
Tested in XP with the old 8.32 version.
https://bugs.winehq.org/show_bug.cgi?id=33502
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 50206 --> https://bugs.winehq.org/attachment.cgi?id=50206 wine regedit screenshot
https://bugs.winehq.org/show_bug.cgi?id=33502
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #5 from super_man@post.com --- still an issue 1.7.52
https://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12703
https://bugs.winehq.org/show_bug.cgi?id=33502
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |0c5ce58505e24bf07cbd4c09752 | |ef2f949d64fd0 CC| |leslie_alistair@hotmail.com
--- Comment #6 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=0c5ce58505e24bf07cbd4c097...
https://bugs.winehq.org/show_bug.cgi?id=33502
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.21.
https://bugs.winehq.org/show_bug.cgi?id=33502
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=33502
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #8 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bug fixes included in 3.0.5.
https://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |spooler
https://bugs.winehq.org/show_bug.cgi?id=33502
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.oldapps.com/Snag |https://web.archive.org/web |IT.php?ModPagespeed=noscrip |/20130606062430/download.te |t |chsmith.com/snagit/enu/823/ | |snagit.exe