VPE batch process error

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

VPE batch process error

Postby rudolfearle » Wed Apr 26, 2017 12:33 pm

We have implemented the VPE control (64 bit) within a dll (ver7.1), and via a windows service run a batch process. It is a multi-tread environment and each thread handle between 1 and 4000 reports.

Once deployed to the runtime environment and running the service, the service throw an error “error creating window handle. The VP document is not open call OpenDoc() first”. It seems the service run out of Handles and I tried the following link as a solution but did not work: viewtopic.php?f=2&t=108

I do close the vpedoc once processing is completed. I cannot replicate error in debug mode on dev.

The stack trace:

at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at IDEALSoftware.VpeEnterprise.VpeControl.OpenDoc()

and in event viewer:error on ntdll.dll


Not sure if this problem is common or advice on solution.
rudolfearle
 
Posts: 2
Joined: Wed Apr 26, 2017 12:19 pm

Re: VPE batch process error

Postby rudolfearle » Wed Apr 26, 2017 2:25 pm

okay for future reference I solved the problem myself.

i made the following change and error went away:

objForm = System.Windows.Forma.Form();
VpeControl doc = new VpeControl();
doc.parent = objFrom;
doc.OpenDoc();

......
doc.Closedoc();
objForm.close();
objForm = null;
rudolfearle
 
Posts: 2
Joined: Wed Apr 26, 2017 12:19 pm

Re: VPE batch process error

Postby IDEAL Software Support » Fri Apr 28, 2017 11:12 am

Thanks for the update. It is not the internal VPE-DLL window, which causes the problem, because this is closed when CloseDoc() is called. It is the internal window of the encapsulating C# control, which is not destroyed. We do not consider this as a bug, because if you place the VPE control on a form, the form will destroy the control when the form is destroyed. If you create the VPE control by code, you are responsible for destroying it.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron