This Forum is Currently Locked – Access is Read Only
You must be logged in to post Login


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Pdf2TxtOCR utility cannot work correctly when launched by service for x64 computer

No Tags
UserPost

12:33 pm
October 6, 2011


PeterS

Member

posts 4

Hello,
I have a trouble with pdf2txtocr.exe utility.
This utility is crashing when it is launched from a Windows service in Windows Server 2008 x64 or Windows 7 x64.
The exception code: C0000005 ACCESS_VIOLATION appears during execution of the "pdf2txtocr.exe" utility when launched by service for x64 computer. 

Please note that pdf2txtocr.exe works correctly under Windows Server 2003 x84, in the same conditions: launched from a Windows service.

I have found and validate your solution in our test environment: 
Call PDF to Text OCR from Web or Windows Service
It does not solve the issue: pdf2txtocr.exe is still crashing.
What can be a cause of such failure ?
I am looking forward to your answer.

Thank you.

Peter

12:34 pm
October 6, 2011


PeterS

Member

posts 4

Process Monitor info:
…
"14:29:17.8644131 PM","pdf2txtocr.exe","7760","CreateFile","C:\Tools\UltraEdit\BoxedAppSDK.dll","NAME NOT FOUND","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a","6676","n/a"
"14:29:17.8646158 PM","pdf2txtocr.exe","7760","CreateFile","C:\Tools\BoxedAppSDK.dll","NAME NOT FOUND","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a","6676","n/a"
"15:08:31.9477895 PM","pdf2txtocr.exe","7760","Thread Exit","","SUCCESS","Thread ID: 6676, User Time: 0.0624004, Kernel Time: 0.1404009","6676","n/a"
"15:08:31.9479413 PM","pdf2txtocr.exe","7760","QueryNameInformationFile","C:\Windows\System32\apisetschema.dll","SUCCESS","Name: \Windows\System32\apisetschema.dll","6676","n/a"
"15:08:31.9479744 PM","pdf2txtocr.exe","7760","QueryNameInformationFile","E:\OCR-Tools\VeryPDF-to-Text-OCR\pdf2txtocrcmd\pdf2txtocr.exe","SUCCESS","Name: \OCR-Tools\VeryPDF-to-Text-OCR\pdf2txtocrcmd\pdf2txtocr.exe","6676","n/a"
…
"15:08:31.9486352 PM","pdf2txtocr.exe","7760","Process Exit","","SUCCESS","Exit Status: -1073741819, User Time: 0.0624004 seconds, Kernel Time: 0.1404009 seconds, Private Bytes: 12,124,160, Peak Private Bytes: 12,124,160, Working Set: 43,663,360, Peak Working Set: 43,679,744","6676","n/a"
"15:08:31.9486607 PM","pdf2txtocr.exe","7760","RegCloseKey","HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options","SUCCESS","","6676","n/a"
"15:08:31.9486800 PM","pdf2txtocr.exe","7760","CloseFile","C:\Windows","SUCCESS","","6676","n/a"
"15:08:31.9487120 PM","pdf2txtocr.exe","7760","RegCloseKey","HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options","SUCCESS","","6676","n/a"
"15:08:31.9487226 PM","pdf2txtocr.exe","7760","CloseFile","C:\Windows\SysWOW64","SUCCESS","","6676","n/a"
"15:08:31.9487979 PM","pdf2txtocr.exe","7760","RegCloseKey","HKLM\System\CurrentControlSet\Control\Nls\Sorting\Versions","SUCCESS","","6676","n/a"
"15:08:31.9488110 PM","pdf2txtocr.exe","7760","RegCloseKey","HKLM\System\CurrentControlSet\Control\SESSION MANAGER","SUCCESS","","6676","n/a"
"15:08:31.9488238 PM","pdf2txtocr.exe","7760","RegCloseKey","HKLM","SUCCESS","","6676","n/a"
"15:08:31.9488453 PM","pdf2txtocr.exe","7760","RegCloseKey","HKCU\Control Panel\International","SUCCESS","","6676","n/a"
"15:08:31.9488566 PM","pdf2txtocr.exe","7760","RegCloseKey","HKLM\System\CurrentControlSet\Control\Nls\CustomLocale","SUCCESS","","6676","n/a"
"15:08:31.9488693 PM","pdf2txtocr.exe","7760","CloseFile","C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af","SUCCESS","","6676","n/a"
…


12:34 pm
October 6, 2011


PeterS

Member

posts 4

WinDbg info:
…
(1e50.1a14): Access violation – code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.

stack:
WARNING: Frame IP not in any known module. Following frames may be wrong.
0014df40 77056ab9 0x8eb8
0014df64 77056a8b ntdll32!RtlDosSearchPath_Ustr+0xada
0014e014 77020143 ntdll32!RtlDosSearchPath_Ustr+0xaac
0014e384 77056a8b ntdll32!KiUserExceptionDispatcher+0xf
…

4:29 am
October 7, 2011


VeryPDF

Admin

posts 136

Post edited 7:05 pm – May 3, 2018 by VeryPDF


This problem is caused by permission of Windows Service account, we suggest you may use cmdasuser.exe to launch pdf2txtocr.exe from an interactive user account, cmdasuser.exe can be downloaded from following web page,

 

http://www.verydoc.com/exeshell.html

 

CmdAsUser Administrator . /p Password /c "C:VeryPDFpdf2txtocr.exe" C:VeryPDFtest.pdf C:VeryPDFout.txt

 

if you can run above command line in CMD window by manual correctly, you can call above command line from Windows Service without any problem too.

Remark:
You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please by following steps to solve this 1314 Error,

ERROR 1314:
~~~~~~~~~~~~~
1314 A required privilege is not held by the client. ERROR_PRIVILEGE_NOT_HELD
~~~~~~~~~~~~~

To resolve this issue:
1. Click Start, click Run, type "secpol.msc", and then press ENTER.
2. Double-click "Local Policies".
3. Double-click "User Rights Assignment".
4. Double-click "Replace a process level token".
5. Click "Add", and then double-click the "Everyone" group
6. Click "OK".
7. You may have to logout or even reboot to have this change take effect.

Please refer to following two screenshots to understand above steps,

http://www.verydoc.com/images/err1314-1.png
http://www.verydoc.com/images/err1314-2.png

Please look at following page for the details about ERROR 1314,

http://www.verydoc.com/exeshell.html

11:53 am
October 7, 2011


PeterS

Member

posts 4

As I posted above, I already followed to your recommendations:
CmdAsUser was executed correctly, but pdf2txtocr.exe was failed in the same place.

Anyway, thank you for quick response.
 

12:34 am
October 8, 2011


VeryPDF

Admin

posts 136

Can you please create a remote desktop account for us? after we logged into your test machine, we will figure out a solution for you asap. We suggest you may share your PC or Server by TeamViewer, TeamViewer can be downloaded from following website,

http://www.teamviewer.com

after you installed TeamViewer, please email to us your TeamViewer's ID and Password, please also arrange your test machine running at 24 hours, after we logged into your test machine and solved the problem, we will send an email to you, then you can close the TeamViewer application.

No Tags

About the VeryPDF Knowledge Base Forum

Forum Timezone: Europe/Lisbon

Most Users Ever Online: 104

Currently Online:
2 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 1
Forums: 1
Topics: 72
Posts: 170

Membership:

There are 192845 Members

There is 1 Admin

Top Posters:

VeryPDF – 21
PeterS – 4
Arjen – 3
Martijn_K – 2
pdfprintUser – 1
eurban – 1

Recent New Members: Manuel Ruiz, djebbi walid, Andrey Rostov, Novice, Eric de los Santos, arisetio purnomo

Administrators: VeryPDF (136 Posts)



 
VN:F [1.9.20_1166]
Rating: 6.1/10 (34 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 20 votes)
Forum, 6.1 out of 10 based on 34 ratings