LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Out of memory when calling CopyTabPage () function ...

Solved!
Go to solution
Solution
Accepted by topic author DocRabbit

Hello All,

 

I have spoken to George and we found out that there is a problem with maximum number of GDI Handles
in Windows 7. As default it is set to 10 000 and when George tried to create more copies of Tab using
CopyTabPage (panel, TAB, 0, panel, TAB, -1) he exceeded this limit. It causes error -12 Out of memory.
It means that limitation is on OS not on CVI side.

 

 

The solution is to change registry. On the other hand it is not very recomended solution. Better way
is to develop different architecture which is going to be less exhaustive in terms of GDI Handles.

 

 

How to change registry:

Make sure that you have backup of registry. Be aware of risk while changing registry and that this
is not recomended solution. Before you start please read this links:


http://msdn.microsoft.com/en-us/library/windows/desktop/ms724291
http://blogs.msdn.com/b/oldnewthing/archive/2007/07/18/3926581.aspx
http://blogs.technet.com/b/markrussinovich/archive/2010/02/24/3315174.aspx
http://blogs.technet.com/b/markrussinovich/archive/2010/03/31/3322423.aspx
http://support.microsoft.com/kb/184802/en-us


Open Registry Editor and go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota
Increase the maximum number of GDI Handles. Restart computer.

 

 

Regards,

 

Daniel Haupt
Message 11 of 13
(841 Views)

Hello, all,

 

I have to confirm quite good cooperation with Daniel in digging the root cause of problem with my complex application.

Really the dynamical generation of tabs exhaust the GID Quota, as you can see on attached picture (configuration to 13 nodes makes the Out of memory crash).

Unfortunately the nature of application task has high demands for speed and user response - thus the suggested solution via table(s) cannot be used, so I have lot to think about.

 

Again thanks, Daniel, for good work!

 

George

 

 

0 Kudos
Message 12 of 13
(836 Views)

Hello, all,

 

I would add some findings during memory optimalization of my application - a significant saving of GID handles occurred after the cancellation of the use of tooltips ...

 

Regards,

 

George

0 Kudos
Message 13 of 13
(804 Views)