From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Code: -12 Out of memory

I have an intermittent problem where a dialog box pops up and says Error in call to LoadPanelEx Error Code: -12 Out of Memory. It identifies a .uir filename. This happens only occasionally. Does anyone know how I can prevent this from happening?
Thanks,
Donna
0 Kudos
Message 1 of 4
(3,137 Views)
Hi Donna,

Does the same thing happen with example projects, or only this one project? Some offhand ideas would be to try increasing your virtual memory size, defragging your hard drive, or restarting the computer to clear the cache. It may be that the OS sometimes cannot find a page with enough memory available. It may also be an unhandled memory leak. Can you narrow down your code to its simplest form and reproduce the error? If so, post that version of the app and I'll be happy to take a look at it! Thanks!
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,122 Views)
Jeremy,
Thanks for your response. I restarted my computer and at the moment I don't have the problem. Sometimes I stay logged on for 5 days at a time. But when I run my program on other machines I have the same problem and I believe that other people do log off their machines. I was wondering whether a large number of menus in one .uir file matters. My two largest .uir files were the files that were identified in the popup. I also have a .bmp in 26 rows in a table. Shall I avoid the .bmp? Shall I break up the .uir file? If I need to break up the .uir file can I popup a menu from a .uir file that exists in another .uir file? Do I need to do anything special to do that?
Thanks,
Donna
0 Kudos
Message 3 of 4
(3,117 Views)
Hi Donna,

Everything you mentioned could be a reason for that memory error. I would probably first try taking out the .bmp file and maybe replace it with a smaller compression file if you really need it in the table. Test it with this change. If it still dumps, then I would see if it's possible to remove extra menus that are not used in the project. Lastly, to access another .uir file, all you have to do is specify the new .uir file when you are calling LoadPanel. It should be able to pick up the panel without any problems, provided you supply the correct uir file to find the panel.
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,099 Views)