LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reload VI Memory Space

I posted a few days ago about a crash in my executable when the Export Image invoke node (from a picture control) was run 102 times while set at EMF file type. It turns out that changing the filetype does fix the crash, but after further work, I came to the conclusion that I need it to be EMF for formatting and report manipulation reasons.

 

The crash doesn't occur if I restart the executable before reaching the 102nd iteration, but it does occur if I stop the running VI and run it again without restarting the executable. Is there a way to run a VI in a way that resets it completely? I've toyed around with the Call by Reference options and Call Setup dialog, but none of it has fixed the problem.

 

Here's all of the same info from the last post as it is still valid:

Crash Popup.png

Copy Image to Clipboard.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 1 of 15
(3,956 Views)

Check Windows memory usage, see if there is a memory leak.

 

George Zou
Message 2 of 15
(3,939 Views)

No memory leak that I can see. CPU goes up, but nothing goes to the extremes.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 3 of 15
(3,929 Views)

How big is your image?  I just ran your program on my PC with Windows 7 (64-bit), LabVIEW 2014 SP1 (32-bit), a smallish BMP (119 KB).  It ran find 102 times, and also 200 times.  Hmm -- I'm running it on my home PC, which has a fair amount of memory (I think 16GB) -- I'll try to run it on my Surface Pro ...

 

Bob Schor

Message 4 of 15
(3,899 Views)

I've run it on two computers at work and now on my laptop at home and it crashes on i=101. Both work computers are decent. One of them I use to run SolidWorks, so I think it has at least 16GB. My home laptop has 8GB.

 

Are you running the executable, or the VI? The VI doesn't crash, it's just the executable that has an issue. You don't need to load any images, if you open the executable and hit Go without changing anything, it crashes. It defaults to using the image that is already loaded in to the Picture control.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 15
(3,887 Views)

Oh -- I ran the VI in Development Mode.  Sorry I missed that this was a problem with the Build.  Did you just make a "simple" Build?  I'll try again ...

 

BS

Message 6 of 15
(3,871 Views)

Well, when you build an executable, what do you know, you get a "We apologize ..." message!  I peeked at the Error Report, and found a reference (which I don't understand) that said

 

"12/20/2015 5:34:44.419 PM
DWarn 0x0E2E7DCF: ISetGPort: could not get hdc from CreateEnhMetaFile
c:\nimble\penguin\labview\components\LVManager\trunk\14.0\source\image.cpp(15384) : DWarn 0x0E2E7DCF: ISetGPort: could not get hdc from CreateEnhMetaFile"

 

Maybe NI can make sense of this ...

 

Bob Schor

 

P.S. -- I wonder if Nimble Penguins are related to Snow Leopards ...

Message 7 of 15
(3,858 Views)

I'm making a service request now. Do you know of a way to load a VI completely separate from the previous run which could maybe bypass this issue? Since it's an iteration crash, I assume it has something to do with memory, so maybe reloading completely will fix the issue for now.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 8 of 15
(3,816 Views)

Use a VI template.

Got new VI every time.

 

George Zou
Message 9 of 15
(3,801 Views)

I tried this, but ran in to the error Bob Schor describes here, even with using his solution.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 10 of 15
(3,772 Views)