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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - RenderToStream crash application
  FAQ FAQ  Forum Search   Register Register  Login Login

RenderToStream crash application

 Post Reply Post Reply
Author
Message
Ihor.Karalash View Drop Down
Beginner
Beginner


Joined: 10 Jun 14
Location: Ukraine
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ihor.Karalash Quote  Post ReplyReply Direct Link To This Post Topic: RenderToStream crash application
    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
Back to Top
Ihor.Karalash View Drop Down
Beginner
Beginner


Joined: 10 Jun 14
Location: Ukraine
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ihor.Karalash Quote  Post ReplyReply Direct Link To This Post Posted: 10 Jun 14 at 2:44PM
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
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 10 Jun 14 at 3:28PM
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?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 10 Jun 14 at 9:29PM
Hi Igor,

like TFROST told already...
You should check where you're doing the CREATEs and FREEs.

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store