04-02-2013 10:32 AM
Hello,
I'm receiving error "-12 Out of memory" when using CopyTabPage (panel, TAB, 0, panel, TAB, -1) on my application (duplicating the first tab).
There is multi-level tab panel system (like next sample)
\tab_1 \sub_tab_1 \sub_tab_2 ... \sub_tab_16 \tab_2 \sub_tab_1 \sub_tab_2 ... \sub_tab_16 \tab_3 \sub_tab_1 \sub_tab_2 ... \sub_tab_16 \tab_4 \sub_tab_1 \sub_tab_2 ... \sub_tab_16
Each sub-tab panels contains appx. 16 x 60 controls (numeric, ring, string type) and some of them also stripchart graphs.
Did I reach the limit of CVI? Is there some things to check? (I'm developing under CVI 2012 SP1).
Could someone know how to overcome this issue?
Thanks,
George
Solved! Go to Solution.
04-02-2013 11:14 AM
Hello, I don't know if an actual limit on the number of controls actually exists, but I have some questions for you:
04-02-2013 01:15 PM
Hello, Roberto!
Again, thanks a lot for your concern - you are really Enthuesiast in CVI area!!
To your questions:
The application is interface to the distributed control system, each sub- tab panel belongs to particular control node ... Some of them are displaying on-line data, other has data-polling activity.
ad 1) I prepare the first sub- tab panel as "template" (also used for default setting). During the run (and reading the configuration xml files) the approprite amount of panels are copied from the "template" panel.
ad 2) Yes, the code is simplified - there is original version ...
if (nodePtr->nodeId > 1) { tabIdx = CopyTabPage (main_pTrigg, TRIGGER_TAB, 0, main_pTrigg, TRIGGER_TAB, -1); } else { tabIdx = 0; }
ad 3) Huh! Maybe there is the problem - many of controls used on sub tab panels are lying on another small panels (making some generic set of them)... I suppose the following picture is better for clarify this ... The red ellipse surrounds controls on the small panel - and they are copied to next traces ...
ad 4) Not yet ... The problem arise today as I try to add some functionality (and activate more sub panels ...).
I'm wondering if there is some information of available memory for gui ...
George
04-02-2013 02:10 PM - edited 04-02-2013 02:11 PM
Wow! I must admit that I never tried such a complex UI!
I'm afraid I cannot give you specific hints: the following are only common sense suggestions...
Does the error arise on the first copy or after some copies? If the first option, one possible problem can be the embedded panels on the tab page, so I would start without the subpanels and see if the copy process performs without errors. This ultimately may lead to a different way of creating your panels.
If the error is on one of the last copies, maybe som NI fellow can share some knowledge with us on the limits CVI suffers in loading complex UIs.
04-02-2013 02:21 PM
Hi,
unfortunately the error now arises on 8th sub tab panel on sixth parent tab - five groups of sub panels are "generated" without problem ...
I have another question - whether I prepare the design of sub tab panels in uir file the problem comes again - or not ...? Probably I must try ...
But the advantage of runtime modification of the interface will be gone away...
George
04-02-2013 05:25 PM
I second you: dynamical generation of controls is a powerful feature!
May there be simpler alternatives to that organization of panels? For example, could the controls you highlighted in your picture be organized as rows of a properly formatted table or items of a multicolumn tree? This will greatly simplify panel structure reducing a set of subpanels to a single table or tree control, while maintaining the ability to dynamically add as many rows as you want to it. Some control could be added separately like the checkbox on the last column.
Just a suggestion, don't know if it can completely fit you needs.
09-28-2013 03:40 AM
Hi, all,
I'm back again, unfortunately the problem with "Out of memory" comes up again :(.
Could someone from NI crew give a hint if there is any possibility to increase the available amount of memory?
Any help will be appreciated, I'm really in troubles, this issue is blocking further development ...
Thanks a lot,
George
09-30-2013 02:51 AM - edited 09-30-2013 02:52 AM
Hello George,
while I have really no additional clues for your situation, I would like to submit you a suggestion in the path of simplifying your user interface and perhaps avoiding the error you are facing: this is a table control structured to be similar to one of your tab panels. I know that the aspect is a bit different from your organization, but it consists of one control only instead of several child panels with their respective controls inside. It implies to dynamically create and customize table rows and to modify the functions that read / write to the table.
Just my 2c.
09-30-2013 02:59 AM
Hi, Roberto!
Thanks for your suggestion - but the main complaint to this is SPEED.
Unfortunately the table refresh is too slow in contrast to the using of single controls...
Regards,
George
10-01-2013 09:46 AM
Hi George,
If you can attach some form of your program that reproduces this error, I'd be happy to take a look at it for you, and then let you know if it really is a legitimate case of running out of memory, or if there's some other problem.
You could upload your program to NI's ftp site and then let me know here that you've done that so that I know to go look for it.
Luis