https://bugs.winehq.org/show_bug.cgi?id=42767
Bug ID: 42767 Summary: Trying to sign PDFs with Foxit Reader causes crash Product: Wine Version: 2.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: seanaubin@gmail.com Distribution: ---
Created attachment 57777 --> https://bugs.winehq.org/attachment.cgi?id=57777 Backtrace of the crash
When trying to sign a PDF. Draw a signature, click save. The reader then crashes. Foxit Reader version 8.2.1.6871
https://bugs.winehq.org/show_bug.cgi?id=42767
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Ever confirmed|0 |1 URL| |https://web.archive.org/web | |/20170204173145/http://cdn0 | |1.foxitsoftware.com/pub/fox | |it/reader/desktop/win/8.x/8 | |.2/en_us/FoxitReader82_enu_ | |Setup_clean.exe Summary|Trying to sign PDFs with |Foxit PDF reader 8.2 |Foxit Reader causes crash |crashes when trying to save | |signature for the first | |time (PDF Sign signature) Keywords| |download
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming, still present.
Stable download link via Internet Archive:
https://web.archive.org/web/20170204173145/http://cdn01.foxitsoftware.com/pu...
Steps:
1) main menu 'Protect' 2) click 'PDF Sign' button 3) click '+' sign or 'Create Signature' 4) click 'Draw Signature' 5) draw signature 6) click 'Save'
A message box with garbled text is shown. Clicking 'Save' again causes the crash due to heap corruption.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Foxit Software/Foxit Reader
$ WINEDEBUG=+seh,+relay,+ole,+variant,+loaddll wine ./FoxitReader.exe >>log.txt 2>&1 ... 0024:Call KERNEL32.CreateFileW(0814e92c L"C:\users\focht\Temp\UserSign\tempFile.pdf",80000000,00000003,00000000,00000003,00000080,00000000) ret=00c10e01 0024:Ret KERNEL32.CreateFileW() retval=00000568 ret=00c10e01 ... 0024:Call KERNEL32.GetFileSizeEx(00000568,0031e054) ret=00c10e83 0024:Ret KERNEL32.GetFileSizeEx() retval=00000001 ret=00c10e83 0024:Call KERNEL32.SetFilePointerEx(00000568,000000000,0031e04c,00000000) ret=00c10ef6 0024:Ret KERNEL32.SetFilePointerEx() retval=00000001 ret=00c10ef6 0024:Call KERNEL32.ReadFile(00000568,0031e0c0,00000004,0031e050,00000000) ret=00c10f38 0024:Ret KERNEL32.ReadFile() retval=00000001 ret=00c10f38 ... 0024:Call KERNEL32.FindFirstFileW(0815e774 L"C:\users\focht\Application Data\Foxit Software\Foxit Reader\InstaSign",0815e808) ret=0084b8ce 0024:Ret KERNEL32.FindFirstFileW() retval=18535060 ret=0084b8ce ... 0024:Call KERNEL32.CreateDirectoryW(0815e8bc L"C:\users\focht\Application Data\Foxit Software\Foxit Reader\InstaSign\UserSign\",00000000) ret=01956b36 0024:Ret KERNEL32.CreateDirectoryW() retval=00000000 ret=01956b36 ... 0024:Call KERNEL32.CreateFileW(0815e974 L"C:\users\focht\Application Data\Foxit Software\Foxit Reader\InstaSign\UserSign\FXPSjdhzgoshmtpwglp.pdf",c0000000,00000003,00000000,00000002,00000080,00000000) ret=00c10e01 0024:Ret KERNEL32.CreateFileW() retval=00000570 ret=00c10e01 ... 0024:Call KERNEL32.GetFileSizeEx(00000570,0031dfd0) ret=00c10e83 0024:Ret KERNEL32.GetFileSizeEx() retval=00000001 ret=00c10e83 0024:Call KERNEL32.SetFilePointerEx(00000570,000000000,0031dfa0,00000000) ret=00c10ef6 0024:Ret KERNEL32.SetFilePointerEx() retval=00000001 ret=00c10ef6 0024:Call KERNEL32.WriteFile(00000570,085160a0,00000b15,0031dfa4,00000000) ret=00c11018 0024:Ret KERNEL32.WriteFile() retval=00000001 ret=00c11018 0024:Call KERNEL32.CloseHandle(00000570) ret=00c10e2b 0024:Ret KERNEL32.CloseHandle() retval=00000001 ret=00c10e2b ... 0024:Call KERNEL32.DeleteFileW(081626a4 L"C:\users\focht\Temp\UserSign\tempFile.pdf") ret=0197c3b7 0024:Ret KERNEL32.DeleteFileW() retval=00000001 ret=0197c3b7 0024:Call user32.IsDlgButtonChecked(000101f6,000065f6) ret=008167b9 ... 0024:Ret user32.IsDlgButtonChecked() retval=00000000 ret=008167b9 ... 0024:Call KERNEL32.CreateFileW(0815e974 L"C:\users\focht\Application Data\Foxit Software\Foxit Reader\InstaSign\UserSign\FXPSjdhzgoshmtpwglp.pdf",80000000,00000003,00000000,00000003,00000080,00000000) ret=00c10e01 0024:Ret KERNEL32.CreateFileW() retval=00000568 ret=00c10e01 ... 0024:Call KERNEL32.SetFilePointerEx(00000568,000000000,0031e080,00000000) ret=00c10ef6 0024:Ret KERNEL32.SetFilePointerEx() retval=00000001 ret=00c10ef6 0024:Call KERNEL32.ReadFile(00000568,0031e0f4,00000004,0031e084,00000000) ret=00c10f38 0024:Ret KERNEL32.ReadFile() retval=00000001 ret=00c10f38 ... 0024:Call KERNEL32.CopyFileW(08157604 L"C:\users\focht\Temp\TempStamp\FXSmojezpksghxolwv.pdf~",0815e974 L"C:\users\focht\Application Data\Foxit Software\Foxit Reader\InstaSign\UserSign\FXPSjdhzgoshmtpwglp.pdf",00000000) ret=0199be60 ... 0024:Ret KERNEL32.CopyFileW() retval=00000001 ret=0199be60 0024:Call KERNEL32.DeleteFileW(08157604 L"C:\users\focht\Temp\TempStamp\FXSmojezpksghxolwv.pdf~") ret=0199be7b 0024:Ret KERNEL32.DeleteFileW() retval=00000001 ret=0199be7b ... 0024:Call user32.DrawTextW(002902fb,0815e3b8 L"sample.pdf - Foxit Reader",00000019,0031e06c,00008824) ret=00813e0c ... 0024:Ret user32.RedrawWindow() retval=00000001 ret=00d24c50 ... 0024:Call gdi32.CreateDIBSection(00000000,0031e600,00000000,0031e634,00000000,00000000) ret=0053ffd5 0024:Ret gdi32.CreateDIBSection() retval=0033035b ret=0053ffd5 0024:Call gdi32.DeleteObject(192e0000) ret=0054000a 0024:Ret gdi32.DeleteObject() retval=00000000 ret=0054000a 0024:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,0031e568) ret=009c3422 0024:Call ntdll.memcpy(0031e4c8,0031e568,0000000c) ret=7b00ff18 0024:Ret ntdll.memcpy() retval=0031e4c8 ret=7b00ff18 0024:trace:seh:dispatch_exception code=e06d7363 flags=1 addr=7B00FF28 ip=7b00ff28 tid=0024 0024:trace:seh:dispatch_exception info[0]=19930520 0024:trace:seh:dispatch_exception info[1]=0031e584 0024:trace:seh:dispatch_exception info[2]=026bd41c 0024:trace:seh:dispatch_exception eax=0031e4b4 ebx=00000002 ecx=0031e568 edx=0000000c esi=00000003 edi=0031e520 0024:trace:seh:dispatch_exception ebp=0031e508 esp=0031e4b4 cs=7bc50023 ds=31002b es=7bc3002b fs=310063 gs=006b flags=00000216 0024:trace:seh:call_vectored_handlers calling handler at 7B00F270 code=e06d7363 flags=1 0024:trace:seh:call_vectored_handlers handler at 7B00F270 returned 0 0024:trace:seh:call_stack_handlers calling handler at 020ADA80 code=e06d7363 flags=1 0024:Call KERNEL32.GetLastError() ret=009c65a1 0024:Ret KERNEL32.GetLastError() retval=00000000 ret=009c65a1 0024:Call ntdll.RtlFlsGetValue(00000001,0031de98) ret=7b04cc33 0024:Ret ntdll.RtlFlsGetValue() retval=00000000 ret=7b04cc33 0024:trace:seh:call_stack_handlers handler at 020ADA80 returned 1 0024:trace:seh:call_stack_handlers calling handler at 020BCD60 code=e06d7363 flags=1 0024:Call KERNEL32.GetLastError() ret=009c65a1 0024:Ret KERNEL32.GetLastError() retval=00000000 ret=009c65a1 0024:Call ntdll.RtlFlsGetValue(00000001,0031de98) ret=7b04cc33 0024:Ret ntdll.RtlFlsGetValue() retval=00000000 ret=7b04cc33 0024:trace:seh:call_stack_handlers handler at 020BCD60 returned 1 0024:trace:seh:call_stack_handlers calling handler at 01FE7206 code=e06d7363 flags=1 ... 0024:Call user32.MessageBoxW(000101f6,0031d920 L"\9047\5230\4e0d\9002\5f53\7684\53c2\6570\3002",04c1c258 L"Foxit Reader",00000010) ret=0081955b --- snip ---
The preceding gdi32 API calls are not the reason of the C++ exception. Some app internal data structures seem to be inconsistent. Has to be further debugged.
Interestingly, after restarting the app once (after the first-time crash), the signing procedure works all the time without any problems due to presence of PDF Sign signatures file:
--- snip --- $ ll .wine/drive_c/users/focht/Application\ Data/Foxit\ Software/Foxit\ Reader/InstaSign/UserSign/ total 8 -rw-rw-r--. 1 focht focht 7478 Jan 30 17:45 FXPSmyxkkjvkfllzeyv.pdf --- snip ---
That file contains the saved signatures which are displayed as preview in ribbon bar. If the file is manually removed, the first-time crash can be reproduced again.
* https://web.archive.org/web/20170122204248/http://superuser.com/questions/97...
* https://web.archive.org/web/20210130170812/https://kb.foxitsoftware.com/hc/e...
* https://web.archive.org/web/20210130170836/https://kb.foxitsoftware.com/hc/e...
$ sha1sum FoxitReader82_enu_Setup_clean.exe 8e315a0ed99a8c88f3e5a0baef3fcb892c1a5448 FoxitReader82_enu_Setup_clean.exe
$ du -sh FoxitReader82_enu_Setup_clean.exe 52M FoxitReader82_enu_Setup_clean.exe
$ wine --version wine-6.1
Regards