Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
RenderToStream crash application |
Post Reply ![]() |
Author | |
Ihor.Karalash ![]() Beginner ![]() Joined: 10 Jun 14 Location: Ukraine Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 10 Jun 14 at 2:35PM |
I have many threads that use RenderToStream for writing document data to stream, very often i get access violation here, sometimes i get error message with link to ntdll.dll, sometimes "System error. Code 5".
function TPdfDocument.RenderPageToStream(dpi, page: integer; output: TRenderOutput; target: TStream): boolean; var res: Integer; begin try res := fLib.RenderPageToStream(dpi, page, Ord(output), target); except Exit(False); end; Result := res = ERR_Ok; end; And after some time, application crash and close without errors. Any ideas? Windows 7, x64
|
|
![]() |
|
Ihor.Karalash ![]() Beginner ![]() Joined: 10 Jun 14 Location: Ukraine Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
From event viewer:
Faulting application name: xxx.exe, version: 0.0.0.3, time stamp: 0x53970a6b Faulting module name: ntdll.dll, version: 6.1.7601.18247, time stamp: 0x521ea8e7 Exception code: 0xc0000029 Fault offset: 0x00090892 Faulting process id: 0x674 Faulting application start time: 0x01cf84b15adc7035 Faulting application path: ...\exe\xxx.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll Report Id: 35db0165-f0a5-11e3-8c36-7071bcb0fcec Edited by Ihor.Karalash - 10 Jun 14 at 3:19PM |
|
![]() |
|
tfrost ![]() Senior Member ![]() Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
![]() ![]() ![]() ![]() ![]() |
What type of stream are you passing to the function? Have you checked that the stream has been created and has not been closed or modified by one of your other threads? If you are writing direct to a filestream have you tried instead changing to a memorystream and then writing that to file later? When you run the application under the debugger what does the stack trace tell you when the exception occurs? What version of Delphi and Debenu are you using? Google indicates that c000029 may be related to a stack corruption issue: so can you reproduce the issue if you single-thread your application?
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Igor,
like TFROST told already... You should check where you're doing the CREATEs and FREEs. Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store