Page 1 of 1

'exception: _com_error...' debug message

Posted: Thu Mar 07, 2019 10:31 pm
by ResponseTechDev
From a Windows 10 (64-bit) machine (within the Visual Studio 2013 IDE debugging session) the snippet of code listed below produces a _com_error exception message in the output window as follows:

'First-chance exception at 0x768318A2 in inwin.exe: Microsoft C++ exception: _com_error at memory location 0x0019F304.'

Before this exception message is shown, a dialog stating: "This action cannot be completed because the other program is busy. Choose 'Switch To' to activate the busy program and correct the problem." appears.

The error string created in the catch() section produces the following:
"ERROR: PDF-XChange Printer Driver caused exception! Code = 0x80080005"

try
{
PXC::IPXCControlExPtr m_pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));
.
.
.
}
catch (_com_error& e)
{
.
.
.
CString s;
s.Format("ERROR: PDF-XChange Printer Driver caused prgram exception! Code = 0x%08lx\n", e.Error());
}

Note that on the same Windows 10 machine, using identical source to build same EXE (release build) with Visual Studio 2008 tool the program closes automatically when attempting to create a PDF file. This same EXE on a Windows 7 (32-bit) machine DOES NOT crash!

I need help is resolving what why this Windows 10 machine specifically is producing the com_error.

Re: 'exception: _com_error...' debug message

Posted: Wed Apr 03, 2019 5:48 pm
by Roman - Tracker Supp
Hello,
1. How much time (approximately) does it take to get this exception since you execute your code?
2. Please try to execute (assuming you installed the Driver API SDK to the default directory):

Code: Select all

"%ProgramFiles%\Tracker Software\PDF-XChange 7 API\pdfSaver.exe" /show
This should open pdfSaver configuration window. Please check the time interval from the start till the window appears.

Re: 'exception: _com_error...' debug message

Posted: Wed Oct 30, 2019 5:25 pm
by ResponseTechDev
Answers:

#1: I do not know and it should not matter! (see comment below)

#2: I installed the exact same software with the exact same command line parameters (/SILENT /NORESTART /COMPONENTS="pdfSaver,PDF-XChange driver" /Pname="INSYTE_PDFX" /DIR="C:\INSYTE\PDF-XChange-INSYTE\") as clients of our software would use.

I can use the exact same defined printer from other applications (Word, Excel) and DO NOT receive any 'Server Busy' message or the application failing in any way. Why is this?

In this particular instance the program is attempting to print to a PDF without user interaction. So the 'PdfSaver' dialog should NOT be displayed or accept a path and filename where the created PDF is to be placed.

Re: 'exception: _com_error...' debug message

Posted: Thu Oct 31, 2019 6:37 pm
by Roman - Tracker Supp
The error you get means that COM runtime cannot start pdfSaver as a COM server.
One possible reason is a delay in the server startup process. During regular printing pdfSaver is not started by COM runtime but by the driver itself and therefore is not a subject for the COM timeout.
This is why I asked you about the delays.
So I have to repeat my previous questions. No need for exact time measurement, accuracy of 5-10 seconds is enough.

In addition, after your code snippet starts to execute, please locate pdfSaver.exe process in Windows Task Manager (Details tab) and create a memory dump of this process (Create dump file in the popup menu).
Then please send us this dump file (zipped). Please see here for details.