Support Center

OLE error 800A80E9 when saving PDF as TIF

Jordi Corbilla May 16, 2013 09:44AM EDT

When processing a PDF file with a number of pages and processing each individual page and saving it into TIF format, the component suddenly stops and it throws the following error:

OLE error 800A80E9.

Do you know what's happening here?

I'm using ImageMan 8.80 with Delphi XE under Windows 7 64 bits. Never seen this error before and I can't continue processing with files. It happens every time and I don't know why.

Jordi

9 Data Techniques Responses and 8 Community Responses

Up 2 Rated Down
DTI Support  Data Techniques Employee May 16, 2013 09:53AM EDT

Hello,

Do you know what line of code is triggering the OLE exception ?

This is not a known issue.

Sean
Data Techniques

Up 0 Rated Down
Jordi Corbilla  Data Techniques Employee May 16, 2013 10:01AM EDT

Hi Sean,

When it's doing:

ImageMan.SaveAs(NewFileName, lAttrs);

Jordi

Up 2 Rated Down
DTI Support  Data Techniques Employee May 16, 2013 10:06AM EDT

HI,

Does that tif file get created at all ?

Sean

Up 3 Rated Down
Jordi Corbilla  Data Techniques Employee May 16, 2013 10:47AM EDT

Hi Sean,

Yes, the file gets created. For example if the PDF file has 20 pages, it generates the first 3 pages of the TIF file and then it suddenly stops throwing that OLE error.

Regards,
Jordi

Up 4 Rated Down
DTI Support  Data Techniques Employee May 16, 2013 10:48AM EDT

Hi,

Is there any chance you could send us an exe and sample PDF to support@data-tech.com that duplicate the issue ?

Thanks,
Sean

Up 0 Rated Down
Jordi Corbilla  Data Techniques Employee May 16, 2013 12:06PM EDT

Hi Sean,

I won't be able to send any app or sample. Is there any work around I could do to sort this out? When it's saving the file, is it doing anything special, like generating temporary files or something like this?

Regards,
Jordi

Up 0 Rated Down
DTI Support  Data Techniques Employee May 16, 2013 12:11PM EDT

Hi,

No its not creating a temp file, it writes just to the file its creating. Ifthe file is being wriiten on a network drive then test with it being written locally.

Are you sure thats the Ole error # ? I didnt get one google hit on that which is unusual :-)

Sean

Up 2 Rated Down
Jordi Corbilla  Data Techniques Employee May 16, 2013 12:23PM EDT

Hi Sean,

Everything is being written locally. Yes the error is OLE Error 800A80E9. It could be that Delphi returns this error as ImageMan is created as an OLE control:

ImageMan := TImageControl.Create(nil);
where
TImageControl = class(TOleControl)

What are the conditions to break a SaveAs method?

The options are:
Attrs := CreateOLEObject('IMActX8.Attributes');
Attrs.Add( 'EXTENSION', 'TIF', IMString);
Attrs.Add( 'COMPRESS', 'True', IMBool);
Attrs.Add( 'TIFF_COMPRESS', 'GROUP3', IMString);
Attrs.Add( 'TIFF_XRES', '200', IMInt32);
Attrs.Add( 'TIFF_YRES', '200', IMInt32);

ImageMan := TImageControl.Create(nil);
try
try
ImageMan.PDFBitDepth := 24;
ImageMan.PDFResolution := 200;
ImageMan.Picture := OldFileName;
Attrs.Add('TIFF_ROWSPERSTRIP', X, IMInt32);
ImageMan.AppendImage := True;
...
...

As it is appending images, it fails in the loop of SaveAs().

Regards,
Jordi

Up 1 Rated Down
DTI Support  Data Techniques Employee May 16, 2013 12:25PM EDT

HI,

Could you please post the entire bit of code that calls SaveAs ?

Thanks,S
ean

Up 0 Rated Down
Jordi Corbilla  Data Techniques Employee May 16, 2013 12:27PM EDT

Hi Sean,

Here it is:

ImageMan := TImageControl.Create(nil);
try
try
ImageMan.PDFBitDepth := 24;
ImageMan.PDFResolution := 200;
ImageMan.Picture := OldFileName;
Attrs.Add('TIFF_ROWSPERSTRIP', X, IMInt32);
ImageMan.AppendImage := True;
for imageCount := 0 to ImageMan.Pages -1 do
begin
ImageMan.PageNumber := imageCount;
ImageMan.SaveAs(NewFileName, lAttrs);
end;
except
on e : exception do
.....

Regards,
Jordi

Up 0 Rated Down
DTI Support  Data Techniques Employee May 16, 2013 12:31PM EDT

Hi,

The code looks ok, I would suggest trying to isolate things, what happens if you pass NULL for the attributes ?

Does this occur only on this PC ? Cna you load/save any images ?


Sean

Up 1 Rated Down
Jordi Corbilla  Data Techniques Employee May 16, 2013 12:38PM EDT

Hi Sean,

I'll try what you say, passing NULL attributes. I can save images, but it only saves 3 or 4 out of 20 pages. Every time with a random number (sometimes 10 for example). But it always fails.

I have only tested it on my machine and it fails. I will try to test it on other machines as well.

Does ImageMan use Adobe to read the pdf? or any third party tool?

Regards,
Jordi

Up -3 Rated Down
DTI Support  Data Techniques Employee May 16, 2013 12:40PM EDT

Hello,

The ImageMan PDF Import Addon is based on code from Foxit software.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

Up 3 Rated Down
Jordi Corbilla  Data Techniques Employee May 22, 2013 10:40AM EDT

Hi Sean,

I'm still experiencing this issue and I'm enclosing my trace from my crash dump. I'm sure you will find where the issue occurs:

********************************************************************
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1: 00000000

EXCEPTION_PARAMETER2: 03006664

READ_ADDRESS: 03006664

FOLLOWUP_IP:
ImgMan81!ImgCaptureScreen+913
028d37d3 81fe2c358f02 cmp esi,offset ImgMan81!ScanAcquirePage+0x14c5c (028f352c)

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

FAULTING_THREAD: 000006cc

PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ

BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ

LAST_CONTROL_TRANSFER: from 7766f9d4 to 7766f577

STACK_TEXT:
0012fdec 7766f9d4 00000001 03006664 00000000 ntdll!RtlImageNtHeaderEx+0x6f
0012fe0c 75858b80 03006664 00000001 7623ef67 ntdll!RtlImageNtHeader+0x1b
0012fe1c 028d37d3 03006664 0012fe6c 00000000 KERNELBASE!FreeLibrary+0x27
WARNING: Stack unwind information not available. Following frames may be wrong.
0012fe30 028dfdf5 028c0000 00000000 00000001 ImgMan81!ImgCaptureScreen+0x913
00000000 00000000 00000000 00000000 00000000 ImgMan81!ScanAcquirePage+0x1525


STACK_COMMAND: ~0s; .ecxr ; kb

SYMBOL_STACK_INDEX: 3

SYMBOL_NAME: imgman81!ImgCaptureScreen+913

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: ImgMan81

IMAGE_NAME: ImgMan81.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 50a6acb3

FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_ImgMan81.dll!ImgCaptureScreen

BUCKET_ID: APPLICATION_FAULT_INVALID_POINTER_READ_imgman81!ImgCaptureScreen+913

WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/TRAMFaxImport_exe/6_1_4_34/2a425e19/ntdll_dll/6_1_7601_17725/4ec49b60/c0000005/0005f577.htm?Retriage=1

Followup: MachineOwner
********************************************************************

As you can see the issue occurs here:
APPLICATION_FAULT_INVALID_POINTER_READ_imgman81!ImgCaptureScreen+913

When is trying to capture the image. Is there any kind of special processing when performing this action?

The execution of imageman halts in that process and it stops reading the PDF.

Regards,
Jordi

Up 4 Rated Down
DTI Support  Data Techniques Employee May 22, 2013 10:46AM EDT

Hello,

The stack most be corrupted as the trace makes no sense if indeed its crashing when you save the PDF file.

Did you try passing NULL for the attributes ?

Sean

Up 1 Rated Down
Jordi Corbilla  Data Techniques Employee May 22, 2013 11:46AM EDT

Hi Sean,

I've done the test again with passing NULL for the attributes and it crashes with the same error:


FOLLOWUP_IP:
ImgMan81!ImgCaptureScreen+913
028b37d3 81fe2c358d02 cmp esi,offset ImgMan81!ScanAcquirePage+0x14c5c (028d352c)

MOD_LIST: <ANALYSIS/>

APPLICATION_VERIFIER_FLAGS: 0

FAULTING_THREAD: 00001b80

PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ

BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ

LAST_CONTROL_TRANSFER: from 7766f9d4 to 7766f577

Regards,
Jordi

Up 1 Rated Down
DTI Support  Data Techniques Employee May 22, 2013 11:49AM EDT

Hello,

We will need you to send us a small app that will duplicate this issue so we can see whats happening. Please send it to support@data-tech.com using www.dropsend.com which is a free file sending service.

Please include one of the input images which you are using when the exception occurs.

Thanks,
Sean

This question is closed to new answers.

Contact Us