14063 Window create failed exception

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

14063 Window create failed exception

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:54 pm

by T Moore >> Tue, 28 Jun 2005 13:01:53 GMT

We have a script that opens all the forms in the system and produces a picture for each form. It also serves the purpose to generate a *.jfm file for the thin client. Unfortuantely due to the number of forms we are getting 14063 exceptions. Does anyone know how to force Jade to clean up the GDI memory as we are not reaching a "quiet point." I've tried adding App.doWindowsEvents and a Process.sleep calls but they don't work. Does anyone else have any ideas?

Thanks

Torrie

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: 14063 Window create failed exception

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:54 pm

by Jade Support >> Tue, 28 Jun 2005 21:26:16 GMT

Deleted JADE forms are not released until a quiet point in the processing is achieved. Similarly if you're using the 'process.sleep' method to try to regain the resources this will not achieve the desired result as the cleanup of deleted forms occurs during idle periods. eg: no call stack. You may be able to allow the resources to be freed up more reliably by using a timer to induce the sleep such that your call stack for the printing application goes idle for say 1 or 2 seconds every ten forms and then restarts when the timer fires.

Using createPrintForm() may be a feasible solution to your problem, this was designed to be used with the conservation of GDI resources in mind.

If createPrintForm doesn't work you can increase the heap size through editing the Registry.

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Jade Software Corporation cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To correct this problem, increase the size of the desktop heap:

1. Run Registry Editor (REGEDT32.EXE).
2. From the HKEY_LOCAL_MACHINE subtree, go to the following key: \System\CurrentControlSet\Control\Session Manager\SubSystems
3. Select the Windows value.
4. From the Edit menu, choose String.
5. Increase the SharedSection parameter.

SharedSection specifies the system and desktop heaps using the following format:
SharedSection=xxxx,yyyy
where xxxx defines the maximum size of the system-wide heap (in kilobytes) and yyyy defines the size of the per desktop heap. The default value of the per desktop heap under Windows NT 3.5 (512K) can support approximately 2,500 windows. Increasing the desktop heap by 256K or 512K normally provides enough memory to correct "Out of Memory" errors messages.

Hope that helps.

Jade Support.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: 14063 Window create failed exception

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:54 pm

by jcampbell >> Tue, 28 Jun 2005 23:56:31 GMT

Not entirely correct with the SharedSection description
SharedSection specifies the system and desktop heaps using the following format:
SharedSection=xxxx,yyyy
where xxxx defines the maximum size of the system-wide heap (in kilobytes) and yyyy defines the size of the per desktop heap. The default value of the per desktop heap under Windows NT 3.5 (512K) can support approximately 2,500 windows. Increasing the desktop heap by 256K or 512K normally provides enough memory to correct "Out of Memory" errors messages.

should in fact be
SharedSection specifies the system and desktop heaps using the following format:
SharedSection=xxxx,yyyy,zzzz
where
xxxx is the size of the shared heap common to all desktops, in kilobytes (in kilobytes)
yyyy is the size of the desktop heap needed for each desktop that is created in the interactive window station, WinSta0, in kilobytes.
zzzz is the size of the desktop heap needed for each desktop that is created in a noninteractive window station, in kilobytes.


So depending on how you are running your Jade.exe or whatever will depend on what you have to change.
Assuming you're running under the control of a Jaws service or as a standard Jade service then the desktop value involved will be the zzzz value.

However you need to be very careful about changing this value as it impacts on all non-interactive windowstations/desktops and will limit the number of non-interactive windowstations/desktops that can be created on the machine which could prevent things from running at all. This is due to the fact that there is a limited overall desktopheap available to be shared amongst the non-interactive windowstations/desktops (this is dependent on O/S and configuration).
So for example Windows 2000 with Terminal Services installed has approx 18MB of desktopheap available to be shared amongst the non-interactive windowstations/desktops so if you use the default value of 512kb for zzzz this will allow for approx 36 windowstation/desktops to be created, if you change this value to 1024kb then you've just halved the possible number that can be created. Note these desktops etc are not only used by Jade/Jaws services but also by TaskScheduler, IIS etc.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: 14063 Window create failed exception

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:54 pm

by Scott >> Mon, 25 Jul 2005 0:38:23 GMT

Hi,

You probably have this nailed by now however we had the same issue running reports some time ago.
In the end we were able to use createPrintForm with minimal coding changes. We did look at running the code in blocks on another thread.
Using timers was also suggested....


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 24 guests