LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity plot out of memory issue

Hi,

 

I have an Out of memory issue with the PlotScaledIntensity function and I couldn't fint reason. I'm using CVI 2013.

 

I have extracted the problem from the complete and large project in order to make it more easy to explain and understand.

 

I have a graph on which I can display either a bitmap picture or an intensity plot.

If I display first the Intensity plot and then the picture it works fine but doing the opposite first the bitmap and then the intensity plot I get an Out of memory error and the plot is not displayed.

 

I have added the complete project in case someone wants to test it.

 

I spent a lot of time trying to find out what was wrong but I couldn't see it.

 

Maybe someone can help me.

 

Thanks in advance

Bertrand

 

 

0 Kudos
Message 1 of 5
(4,597 Views)

Hi,

 

I have tested your project and can confirm the out-of-memory message. I would assume that either this message is misleading or it has to do with some limitation within the function or library... so it is up to NI Smiley Wink

0 Kudos
Message 2 of 5
(4,596 Views)

I can confirm that this is a bug in CVI (bug id: 519095).

 

The bug manifests itself when you do an intensity plot immediately after deleting a bitmap plot. So one possible workaround would be to delete the bitmap plot after the intensity plot. For example, if you do something like this (of course you'd have to do some tweaking if you don't already have a bitmap plot at this time):

 

    case EVENT_COMMIT:

        PG_ModeMesure = 2;
        InitGraphique (); // <-- don't delete bitmap graph plot here

 

        SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_REFRESH_GRAPH, 0);

        PG_MisAppVolPlotData.PlotHandle = PlotScaledIntensity (panelHandle, PANEL_GRAPH, PG_MisAppVolPlotData.Z,

            PG_MisAppVolPlotData.NbOfPtsX, PG_MisAppVolPlotData.NbOfPtsY, VAL_DOUBLE,

            PG_MisAppVolPlotData.GainY, PG_MisAppVolPlotData.OffsetY, PG_MisAppVolPlotData.GainX,

            PG_MisAppVolPlotData.OffsetX, TabIntensityColors, 0x00990000, 6, 0, 1);

        DeleteGraphPlot (panelHandle, PANEL_GRAPH, FL_PlotHandle, VAL_DELAYED_DRAW);
        SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_REFRESH_GRAPH, 1);

        break;

 

 

 

0 Kudos
Message 3 of 5
(4,571 Views)

Thank you for the work around.

 

By the way I think saw 2 more bugs.

 

  1. If you have several files with excluded lines and select "Resolve All Excuded lines" the program jumps from file to file but the tabs are not updated. You end up in the last file that had excluded lines but the active tab is still on the first file that had excluded lines.
  2. Again with "Resolve All Excluded lines" if you select "Delete" browse infos are not generated and its not possible to use "Go to definition" for example until one has made some other changes that generate browse infos.

Best regards

 

0 Kudos
Message 4 of 5
(4,532 Views)

Hi Bertrand, thanks for the bug reports.

 

I've confirmed the first bug (519487), but not the second. When I delete an excluded region, it does seem to update the browse info for me.

 

(By the way, it's unfortunate that excluded code is counted as part of the project, for source code browsing purposes, unlike commented-out lines, for example. But that's a known issue, which we have to live with for now).

 

This is what I did to try to reproduce this: I excluded a function call in my code, then I deleted the function call (using the Resolve All Excluded Lines command). Then, without making any additional code change, I brought up the Source Code Browser window, typed the name of the function and verified that the function call that I deleted no longer appears as a reference.

 

One thing you should be aware of is that if you have the browse window already open while you are modifying your code, the window doesn't update in real time. To force it to update the information of a particular symbol, you can click on the edit control that has the symbol name and press Enter to force the update. But this is the case regardless of how you modified the code -- it is the case while you're typing in the same way that it is the case when you delete regions during the resolve.

 

If you can still reproduce this problem, then maybe I'm missing some important step. If that's the case, please give me more detailed, step-by-step instructions so that I can try to reproduce it.

 

Luis

 

0 Kudos
Message 5 of 5
(4,502 Views)