Have a small C# program using Distiller Automation API to create a PDF. It crashes intermitantly, when invoking the Create method. It never does it on the first invocation. So perhaps something is not getting cleaned up from previous invocations?

here is a Dr Watson snippet:

Application exception occurred:
App: D:\Program Files\Adobe\Acrobat 7.0\Distillr\acrodist.exe (pid=2884)
When: 10/3/2006 @ 15:57:17.600
Exception number: c0000005 (access violation)
.....
* ----> Stack Back Trace <----*
* ** WARNING: Unable to verify checksum for D:\Program Files\Adobe\Acrobat 7.0\Distillr\acrodist.exe
* ** ERROR: Module load completed but symbols could not be loaded for D:\Program Files\Adobe\Acrobat 7.0\Distillr\acrodist.exe ChildEBP RetAddr Args to Child
WARNING: Stack unwind information not available. Following frames may be wrong.
0013fd40 00404af6 001624cc 77e68990 004200d8 AcroDistDLL+0x18b6
0013fd64 00404b6f 77e68990 00000000 00000092 acrodist+0x4af6
0013fdf0 00000009 0013fe64 000000ff 0013fe28 acrodist+0x4b6f
.....

here is a code snippet:
....
private PdfDistiller pdfDistiller = null;

public void CreatePDF(string postscriptFile)
{
string outputPdfFile;
// PdfDistiller pdfDistiller = null;
ACRODISTXLib._PdfEvents_OnJobDoneEventHandler onJobDone;
ACRODISTXLib._PdfEvents_OnJobFailEventHandler onJobFail;
// ACRODISTXLib._PdfEvents_OnLogMessageEventHandler onLogMessage;
ACRODISTXLib._PdfEvents_OnPercentDoneEventHandler onPercentDone;

try
{
onJobDone = new ACRODISTXLib._PdfEvents_OnJobDoneEventHandler(OnJo bDone);
onJobFail = new ACRODISTXLib._PdfEvents_OnJobFailEventHandler(OnJo bFail);
onPercentDone = new ACRODISTXLib._PdfEvents_OnPercentDoneEventHandler( OnPercentDone);

if (pdfDistiller == null)
{
int maxTries = 10;
do
{
try
{
pdfDistiller = new PdfDistiller();
break;
}
catch (COMException ex)
{
if (--maxTries == 0)
throw;
if ((uint) ex.ErrorCode != 0x800706ba)
throw;
}
System.Threading.Thread.Sleep(m_delayBetweenDistil lerCalls);
} while (true);
}

pdfDistiller.bShowWindow = 0;
> crash here pdfDistiller.Create();
pdfDistiller.OnJobDone += onJobDone;
pdfDistiller.OnJobFail += onJobFail;
pdfDistiller.OnPercentDone += onPercentDone;





if (postscriptFile.EndsWith(".ps"))
outputPdfFile = postscriptFile.Replace(".ps", ".pdf");
else
outputPdfFile = postscriptFile + ".pdf";

pdfDistiller.FileToPDF(postscriptFile, outputPdfFile, "");

pdfDistiller.OnJobDone -= onJobDone;
pdfDistiller.OnJobFail -= onJobFail;
pdfDistiller.OnPercentDone -= onPercentDone;
.....

Has anyone seen this beviour before?
I am stumped.

Thanks,

peter dot dunphy ...
at ....
unisys dot ...
com