Vista-only issue: StartDoc fails with DC

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello!
I am having a Vista-specific problem with the PDFXChange V4 Print Drivers (v. 4.0.149).

Short introduction:
in our application we have a proprietary pseudo print spooler which is quite an old piece of code, written in C/C++. Instances of the main application print their reports to metafiles. The spooler gets a DEVMODE of a chosen printer to create a device context on which metafiles are being played with PlayEnhMetafile function. This is very old but a transparent solution, independent from a printer.

I used the delivered API to be able to set up PDFXChange Printer, e.g.: to set up an output file name. Everything works fine on Windows XP, I get expected output from Your printer.

Unfortunately, the same code fails on Windows Vista. This is a debugger output (WinDBG):

1) on applying the setting with m_pPrinter->ApplyOptions(0);

DrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012caec
DrvDocumentPropertySheets: Result: 1300
DrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012caec
DrvDocumentPropertySheets: Result: 1300
DrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012caec
DrvDocumentPropertySheets: Result: 1


2) directly afterwards the correct full DEVMODE structure (obtained with DocumentProperties) is used to CreateDC (it doesn't fail)

DrvDocumentEvent: iEsc = 14
DrvDocumentEvent: iEsc = 1
DrvEnablePDEV [016541a0]; OR: 1; BPP: 24; PW: 2159; PH: 2794
LoadUIDLLSoftware\Tracker Software\PDF-XChange 4.0\DriversHKEY_CURRENT_USERSetCurrentDirectory: 1; err: 0LoadLibrary: 049a0000; path: 'C:\Program Files\Tracker Software\PDF-XChange 4\pdfSaver\drvui40.dll'
hModule: 049a0000; err: 0
The operation completed successfully.
CommonStartPDEV [016541a0]: cjDevCaps: 304; cjDevInfo: 300; cPat: 6
FillDeviceCaps: pPDev(016541d0)
FillDevCaps: scale = 100
FillDeviceCaps: ok
CommonStartPDEV [016541a0] - ok
DrvEnablePDEV: - ok
DrvCompletePDEV: okDrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012ca54
DrvDocumentPropertySheets: Result: 1300
DrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012ca54
DrvDocumentPropertySheets: Result: 1300
DrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012ca54
DrvDocumentPropertySheets: pDPHdr->pdmIn: dmSpecVersion: 1025; dmDriverVersion: 1024; dmSize: 220; dmDriverExtra: 1080
DrvDocumentPropertySheets: Result: 1
DrvDocumentEvent: iEsc = 2


3) now to the point:

the handle of the device context is used to initiate the document with StartDoc(*hDC,&DocInfo) but the function fails, a code is throwing an UnknownException. I have set the Event Filter of the Windbg to break on this exception. This is the output I get:


DrvDocumentEvent: iEsc = 5
DrvEnableSurface: 016541d0
EnableSurface: [016541a0] [2480, 3508] - 1
EngAssociateSurface
DrvEnableSurface - ok
(6b8.874): Unknown exception - code 000006e4 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0012bd80 ebx=00000000 ecx=04f20034 edx=00000000 esi=000006e4 edi=0012c154
eip=763942eb esp=0012bd80 ebp=0012bdd0 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00200246
kernel32!RaiseException+0x58:
763942eb c9 leave
0:000> kbn
# ChildEBP RetAddr Args to Child
00 0012bdd0 769d412e 000006e4 00000001 00000000 kernel32!RaiseException+0x58
01 0012bde8 769d4106 016948f8 0012c090 76a67d18 RPCRT4!RpcpRaiseException+0x1e
02 0012bdf4 76a67d18 000006e4 fd7b41a7 0012c154 RPCRT4!RpcRaiseException+0x16
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\Tracker Software\PDF-XChange 4\pdfSaver\drvui40.dll -
03 0012c090 04a16344 04b5e1a8 04b5e0e2 0012c0a8 RPCRT4!NdrClientCall+0x23
WARNING: Stack unwind information not available. Following frames may be wrong.
04 0012c0f8 049c9cfc 0012c154 04f20034 04dac548 drvui40!DRVUI_Free+0x54064
05 0012c144 049c1a96 00000006 04f20034 00000001 drvui40!DRVUI_Free+0x7a1c
06 00000000 00000000 00000000 00000000 00000000 drvui40!DAPI_2k_StartJob+0x26


Due to the lack of symbol files I can't get more output, but I guess you can at least identify the piece of your code which throws the exception. I was also playing with the values of the DocInfo structure passed to the StartDoc to find out more, but without any success.

As I said, this fails on Vista only. On XP I am getting nice PDF files correctly formatted and saved.
We're standing in front of the buying decision, and this Vista problem is very crucial, because it simply means we cannot print PDFs on Vista using your drivers. I would be very glad if you could take a closer look at the problem and at least roughly estimate, if it easy to solve. I can provide you with any debugging info you might need. We would be interested in having this issue solved, because we like the features your tools offer.

Best regards,
Maciej Tokarski
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

Will check the code why it can happens. Maybe will send you debug version of our DLLs for checking.

In any case, we will try to solve the problem asap.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,
if you want me to generate a more meaningful dumpfile using your PDBs, go ahead please. I am ready to help you to get closer to the core of the problem.

Regards,
Maciej
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,
is there any news on this topic?
Regards,
Maciej
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

Please download debug version of drvui40.dll and its pdb file here: https://www.pdf-xchange.com/file_do ... 40_dbg.zip
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by John - Tracker Supp »

Please advise if this resolved your issues ?

Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,

here is the output I am getting now. At the end you'll find local variables of the interesting frames. I don't know if it helps.

Regards,
Maciej

PS: it doesn't resolve any issue of course, I didn't expect it from a debugging version.

HPSPL00!DoJob+0x74:
004022a4 8b4508 mov eax,dword ptr [ebp+8] ss:0023:0012fd54=004336ac
0:000> g
Breakpoint 1 hit
eax=00000000 ebx=00000000 ecx=00000008 edx=00403a6b esi=00000464 edi=0012fe20
eip=00402bad esp=0012cb48 ebp=0012cb5c iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000206
HPSPL00!NewDC+0x8d:
00402bad 8b4d0c mov ecx,dword ptr [ebp+0Ch] ss:0023:0012cb68=0012fd30
0:000> g
DrvDocumentEvent: iEsc = 14
DrvDocumentEvent: iEsc = 1
DrvEnablePDEV [0602b1f0]; OR: 1; BPP: 24; PW: 2159; PH: 2794
LoadUIDLLSoftware\Tracker Software\PDF-XChange 4.0\DriversHKEY_CURRENT_USERSetCurrentDirectory: 1; err: 0LoadLibrary: 04f00000; path: 'C:\Program Files\Tracker Software\PDF-XChange 4\pdfSaver\drvui40.dll'
hModule: 04f00000; err: 0
The operation completed successfully.
DAPI_2k_StartDrv
+++++++++++++ DAPI_2k_StartDrv: 0602cff8DSJob2k::Init [1]: m_sPrinterName = 'PDF-XChange 4.0'
DSJob2k::Init [2]: m_hPrinter: 06020c4c; sDevice: 'PDF-XChange 4.0'; sPrinter: 'PDF-XChange 4.0'
CommonStartPDEV [0602b1f0]: cjDevCaps: 304; cjDevInfo: 300; cPat: 6
DAPI_2k_ValidateSetDrvDM
FillDeviceCaps: pPDev(0602b220)
DAPI_2k_GetPageSize
FillDevCaps: scale = 100
FillDeviceCaps: ok
CommonStartPDEV [0602b1f0] - ok
DrvEnablePDEV: - ok
DrvCompletePDEV: okDrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012ca54
DrvDocumentPropertySheets: Result: 1300
DrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012ca54
DrvDocumentPropertySheets: Result: 1300
DrvDocumentPropertySheets: pPSUIInfo: 00000000; lParam: 0012ca54
DrvDocumentPropertySheets: pDPHdr->pdmIn: dmSpecVersion: 1025; dmDriverVersion: 1024; dmSize: 220; dmDriverExtra: 1080
DAPI_2k_ValidateSetDrvDM
DAPI_2k_ConvertDevmode
DrvDocumentPropertySheets: Result: 1
DrvDocumentEvent: iEsc = 2
DrvDocumentEvent: iEsc = 5
DrvEnableSurface: 0602b220
EnableSurface: [0602b1f0] [2550, 3300] - 1
EngAssociateSurface
DrvEnableSurface - ok
DAPI_2k_StartJob
StartDocument: enter(e18.e1c): Unknown exception - code 000006e4 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0012b97c ebx=00000000 ecx=00000000 edx=00000000 esi=000006e4 edi=0012bd78
eip=75e742eb esp=0012b97c ebp=0012b9cc iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
kernel32!RaiseException+0x58:
75e742eb c9 leave
0:000> kbn
# ChildEBP RetAddr Args to Child
00 0012b9cc 7636412e 000006e4 00000001 00000000 kernel32!RaiseException+0x58
01 0012b9e4 76364106 0012bd9c 0012bc8c 763f7d18 RPCRT4!RpcpRaiseException+0x1e
02 0012b9f0 763f7d18 000006e4 4d8ae8a7 0012bd78 RPCRT4!RpcRaiseException+0x16
03 0012bc8c 052d07c1 056f6a00 056f693a 0012bd80 RPCRT4!NdrClientCall+0x23
04 0012bd78 0521892a 04b00034 059d6f94 059a6428 drvui40!UI_StartDoc+0x31 [f:\development\pdf35\pdfsaver4\pdfsaver4rpc_c.win32.c @ 113]
05 0012bebc 05218dca 0012c03c 04b00034 059d6f94 drvui40!DSJob2k::_Do_StartDocument+0xaa [f:\development\pdf35\driversui40\job_w2k.cpp @ 313]
06 0012c068 05206d63 00000003 04b00034 0602b220 drvui40!DSJob2k::StartDocument+0x3ba [f:\development\pdf35\driversui40\job_w2k.cpp @ 429]
07 0012c158 027f281f 0602cff8 04b00034 00000003 drvui40!DAPI_2k_StartJob+0x53 [f:\development\pdf35\driversui40\driversui.cpp @ 140]
WARNING: Stack unwind information not available. Following frames may be wrong.
08 0012c178 76031086 04b00000 04b00034 00000003 PXC40f!DrvDisableDriver+0xb0f
09 0012c1b4 7727b1e5 0012ca1c 0012c1cc 00000004 GDI32!GdiPrinterThunk+0x732
0a 0012ca04 774499ce 0012ca1c 00000020 0012cb58 USER32!__ClientPrinterThunk+0x28
0b 0012ca38 76064369 76053d0f ab2109d5 0012ca88 ntdll!KiUserCallbackDispatcher+0x2e
0c 0012ca3c 76053d0f ab2109d5 0012ca88 0012ca64 GDI32!NtGdiStartDoc+0xc
0d 0012cb68 00402a7f ab2109d5 0012cb80 00000000 GDI32!StartDocW+0x463
0e 0012cb98 00402960 0012fd30 0012cce4 004336ac HPSPL00!FirstPage+0x7f [z:\lego\print\spool\chromspl.c @ 1759]
0f 0012cbc4 004022b8 0012fd30 0012cce4 004336ac HPSPL00!ValidateDC+0x60 [z:\lego\print\spool\chromspl.c @ 1701]
10 0012fd4c 00401d06 004336ac 004336ea 00000000 HPSPL00!DoJob+0x88 [z:\lego\print\spool\chromspl.c @ 1349]
11 0012fd68 004018f3 00000464 75f52f67 75f570e9 HPSPL00!EmptyQueue+0x56 [z:\lego\print\spool\chromspl.c @ 1203]
12 0012fda4 7726f8d2 0002031e 00000464 00000000 HPSPL00!SpoolMainWndProc+0x283 [z:\lego\print\spool\chromspl.c @ 1047]
13 0012fdd0 7726f794 00401670 0002031e 00000464 USER32!InternalCallWinProc+0x23
0:000> .frame 4
04 0012bd78 0521892a drvui40!UI_StartDoc+0x31 [f:\development\pdf35\pdfsaver4\pdfsaver4rpc_c.win32.c @ 113]
0:000> x
0012bd80 lpwszJobName = 0x04b00034 "DEMO_005-0101"
0012bd84 lpwszAppName = 0x059d6f94 "CHEMMAIN.EXE"
0012bd88 sPrinterName = 0x059a6428 "PDF-XChange 4.0"
0012bd8c dwJobID = 3
0012bd90 dwPDMsize = 0x438
0012bd94 pdm = 0x0602b2fc "DCXP???"
0012bd98 dwProcID = 0xe18
0012bd9c dwBufSize = 0x810
0012bda0 pHWNDBuf = 0x0602d218 ""
0012bd70 _RetVal = union _CLIENT_CALL_RETURN
0:000> .frame 5;x
05 0012bebc 05218dca drvui40!DSJob2k::_Do_StartDocument+0xaa [f:\development\pdf35\driversui40\job_w2k.cpp @ 313]
0012be90 ssz = 0x438
0012be9c this = 0x0602cff8
0012bec4 bOK = 0x0012c03c
0012bec8 pwszDocName = 0x04b00034 "DEMO_005-0101"
0012becc exe_name = 0x059d6f94 "CHEMMAIN.EXE"
0012bed0 JobID = 3
0012bed4 pdm = 0x0602b2fc "DCXP???"
0:000> .frame 6;x
06 0012c068 05206d63 drvui40!DSJob2k::StartDocument+0x3ba [f:\development\pdf35\driversui40\job_w2k.cpp @ 429]
0012c054 this = 0x0602cff8
0012c070 JobID = 3
0012c074 pwszDocName = 0x04b00034 "DEMO_005-0101"
0012c078 devmode = 0x0602b220
0012c07c flags = 0
0012c048 needed = 0x638
0012c018 hr = 0x00000000
0012bfe8 pdm = 0x0602b2fc
0012c03c bOK = 1
0012bfd4 exe_name = class DStringW
0012bff4 dm = 0x0602b220
0012c030 job_info = 0x06070af0 "???"
0012c024 level = 2
0012c00c docname = 0x06070ba4 "DEMO_005-0101"
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

The Trouble is as I suspect in the RPC mechanism of the Windows API (PDF-XChange uses RPC to communicate between two parts of driver -- the low-level driver part, and the pdfSaver4.exe process which generates PDF files based on the driver's information). I will check where and why the problem is caused.

May I ask you to check if pdfSaver4.exe process is running when you try to print please using task manager?

Thanks
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,

yes it is. I can also see a small activity of the pdfsaver4.exe process in the Task Manager at the moment of printing (e.g.: I/O Other, I/O Other Bytes).

Regards,
Maciej
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,
any news on the problem?

Regards,
Maciej
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

For now I cannot imagine why the RPC subsystem causes this exception.

I will send you debug version of pdfSaver4.exe and drvui40.dll (latest versions) and will ask to check again.

thanks
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,
I found an interesting issue. I wrote a test application (unmanaged C), basically executing a few functions: create printer, create DC for it, start document, start page, play metafile on DC, end page, end document, delete DC, destroy printer.
It works fine on Vista.
Then I copied the piece of code into our main application - StartDoc fails again in the way you've seen in my previous postings! I am totally confused, do you have any idea how a different process environment could interfere with StartDoc communicating with your driver?

Best regards,
Maciej
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

maybe your "pseudo print spooler" is 16-bit ?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,
no more problems with StartDoc under Vista!

The thing was I had a few gflags-options turned on (application verifier and so on) - it seems your driver still have some problems, but at least it's no longer crashing the StartDoc function when all debugging features are turned off.

There are still two issues I'd like you to help me with:

1) output file path/name issue

Because we're using Windows API to play a metafile on a printer, we're using StartDoc, StartPage and so on. First I set up the printer:

m_pPrinter->ResetDefaults();
m_pPrinter->Option[L"Save.SaveType"] = L"Save";
m_pPrinter->Option[L"Save.ShowSaveDialog"] = L"No";
m_pPrinter->Option[L"Save.File"] = L"c:\\wholepathtothefile\\file.pdf"
m_pPrinter->Option[L"Save.WhenExists"] = L"Overwrite";
m_pPrinter->ApplyOptions(0);


afterwards we prepare the DOCINFO structure and pass it to StartDoc function:

DocInfo.cbSize=sizeof(DocInfo);
DocInfo.lpszDocName=JobName;
DocInfo.lpszOutput=NULL;
DocInfo.lpszDatatype=NULL;
if ( StartDoc(*hDC,&DocInfo) == SP_ERROR)


The thing is, if I set DocInfo.lpszOutput=NULL the results are unreliable - at times the file gets written to what I set in m_pPrinter->Option[L"Save.File"], but often I get asked for the file name and location, as if I didn't set the options for the PDF printer at all.
But when I set DocInfo.lpszOutput to the same string I passed to m_pPrinter->Option[L"Save.File"], it works fine.

Could you please confirm this behaviour? Is it necessary for your printer to set up DocInfo.lpszOutput to the same string as m_pPrinter->Option[L"Save.File"]?

2) Crashing Spooler SubSystem on Vista

Our spooler is a win32 executable. At the beginning of WinMain I create an instance of factory and printer:

m_pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));
if (m_pFactory == NULL)
{
MessageBox(NULL,L"PDF-XChange 4.0 SDK not installed or not properly registered. Application will quit.",
L"PXC-XChange 4.0 Example", MB_OK | MB_ICONERROR);
return;
}
if (m_pPrinter == NULL)
{
m_pPrinter = m_pFactory->Printer[L"", PDF_PRINTER_NAME, L"<YOUR REG KEY HERE>", L"<YOUR DEV CODE HERE>"];


then there is a main message loop of the app, and at the very end of WinMain I simply do:

if (m_pPrinter)
m_pPrinter.Release();
if(m_pFactory)
m_pFactory.Release();
CoUninitialize();



And it ALWAYS crashes Vista's Spooler SubSystem ("Spooler SubSystem App stopped working and was closed"). It happens on Vista ONLY.
Could you please give me a hint?

Best regards,
Maciej
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by John - Tracker Supp »

Hi,

We have tested here and cannot replicate this - can you please create a small and complete example that causes issues there and send to us - zipped and with both the project code and the compiled exe/dll's as may be necessary to reproduce here - with any extra info we may need and email to Ivan@tracker-software.com

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Actually your example project CExAPI crashes the spooling subsystem on that machine too. If you're sure the example should work correctly on Vista it means there's something wrong to the Vista-VM I am using. Anyway, could you please give me an answer to my first question (DOCINFO and filename issue)?

Regards,
Maciej
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

CExAPI works well on Vista -- I'm working on Vista for two years already V4 driver was developed and tested mainly on Vista.

About DOCINFO -- we never had such troubles before -- will make some test to try to reproduce the problem.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hello,
I resolved the DOCINFO issue, I am sorry there was a multithread timing issue inside of my application.

I know how to reproduce the crash of Vista's spooler SubSystem. I checked it on my VMWare Vista and on two "real" Vista-PCs. The key is there can be no PDF-Xchange printer among windows printers before starting the test application. Please do the following - install your driver on a clean Vista machine, then go to printers and remove the default PDF-Xchange printer. Reboot the system, make sure there is no PDF-Xchange printer among the printers, run your test application CExAPI.exe, print anything (the PDF-Xchange 4.0 Sample printer will appear). If you now close the application, the m_pPrinter.Release() will cause exception at pdfsaver4.exe (I attached WinDbg to it) and Spooler SubSystem will crash in consequence.
Could you please comment on the issue? The thing is, we'd like to have make the PDF-Xchange printer appear only when our application is working.

Best regards,
M. Tokarski
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

Thanks for detailed description. Will check and fix.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Hi,
by the way: the official code examples mention only creating a new temporary printer with a factory:

PXC::IPXCControlExPtr m_pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));
PXC::IPXCPrinterPtr m_pPrinter = m_pFactory->Printer[L"", L"My printer", L"<YOUR REG KEY HERE>", L"<YOUR DEV CODE HERE>"];

Can I get IPXCPrinterPtr of an existing printer instance somehow?

Regards,
Maciej
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

Can I get IPXCPrinterPtr of an existing printer instance somehow?
No, it is impossible.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Ok, thanks. It makes the issue I mentioned in my previous posting even more relevant.

Regards,
Maciej
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by Ivan - Tracker Software »

I know how to reproduce the crash of Vista's spooler SubSystem. I checked it on my VMWare Vista and on two "real" Vista-PCs. The key is there can be no PDF-Xchange printer among windows printers before starting the test application. Please do the following - install your driver on a clean Vista machine, then go to printers and remove the default PDF-Xchange printer. Reboot the system, make sure there is no PDF-Xchange printer among the printers, run your test application CExAPI.exe, print anything (the PDF-Xchange 4.0 Sample printer will appear). If you now close the application, the m_pPrinter.Release() will cause exception at pdfsaver4.exe (I attached WinDbg to it) and Spooler SubSystem will crash in consequence.
Could you please comment on the issue? The thing is, we'd like to have make the PDF-Xchange printer appear only when our application is working.
Problem is fixed. Fix will be available into the next build (in days).
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Thank you!
Regards,
Maciej
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by John - Tracker Supp »

Hi,

Build 155 is now available - have you downloaded and tried ?
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Matchay
User
Posts: 42
Joined: Fri Jul 11, 2008 1:23 pm

Re: Vista-only issue: StartDoc fails with DC

Post by Matchay »

Yes I did and I can't reproduce the problem!
Maciej
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Vista-only issue: StartDoc fails with DC

Post by John - Tracker Supp »

Excellent news - thanks :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Post Reply