LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scrollbar reference control leads to crash during remote debugging

Hello All,

 

I've run into a possible bug which seems to be causing my compiled EXE (LabVIEW 8.6) to crash during remote debugging with a message like the following:

 

The instruction at "0x304326f5" referenced memory at "0x00000350".  The memory could not be "read". 

 

The target system runs Windows XP SP2 with LabVIEW run-time engine 8.6.  My development system runs Windows XP SP2 with LabVIEW 8.6 Full + LabVIEW application builder.

 

I've been able to isolate the problem to a single sub-vi, and more specifically, to the condition where the sub-vi contains a scrollbar reference control on the front-panel (see attached project).  If I build this VI to an EXE, the exe crashes immediately when opened on either my development system or my target system.

 

I'd like to find a solution, or at least a work-around, for this problem so that I am able to use remote debugging with my application.  I've attached a (zipped) LabVIEW project containing the simplest VI which still triggers the problem and the build specification I've been using.  I can also provide the built application if that would be helpful.

 

Thanks,

 

Mark Moss

Electrical Validation Engineer

GHSP

0 Kudos
Message 1 of 8
(3,208 Views)

Hi MarkMoss,

 

I have not been able to reproduce the error you see.  However, it seems like the error may be a result of a null pointer.  If you add the scroll bar which you are referencing to the front panel, do you still get the error?

 

Kristen H.

0 Kudos
Message 2 of 8
(3,183 Views)

Thanks for taking a look at my problem.

 

I'm not quite sure what you mean by "add the scrollbar you are referencing to the front panel".  I did do the following, and still get an error when I attempt to run the compiled program:

 

1. Create a new VI.

2. Add a system horizontal scrollbar to the front panel.

3. On the block diagram, right-click on the scroll-bar's icon and pick create reference.

3. Right click on the reference and pick create control.

 

This gives me a VI which consists of a system horizontal scroll-bar control, a scroll-bar reference control, and a reference to the scroll bar control.  If I compile and attempt to run this VI, I still get the error message.  (Immediately, before the program has a chance to "run".)

 

I've done a bit more investigating on my end, and I have found a work-around which lets me use the remote debugger with my compiled application.  If I change the VI server class of my reference control from Generic.GObject.Control.Scrollbar to Generic.Generic, and then type-cast it to Generic.GObject.Control.Scrollbar in the block diagram, everything works fine.  I've also noticed that the crash seems to occur when the system loads the front panel of a VI containing a scrollbar reference control.  As long as I don't open the sub-vi containing the scrollbar reference control, everything works fine.  As soon as I open that sub-vi with the remote debugger, whether or not the program is running, my compiled application crashes.

0 Kudos
Message 3 of 8
(3,177 Views)

 
In your example that you posted, there was not a scrollbar control on the front panel.  What I meant by "add the scrollbar you are referencing to the front panel" was make sure the control that the reference is referencing is actually present.  I apploogize if that seems confusing! 

Does the error occur if you do NOT open the subVI with the scrollbar reference, but have the subVI in the main VI? 

 

Kristen H.

0 Kudos
Message 4 of 8
(3,153 Views)

I'm confident that the reference I pass to the scrollbar reference control is valid as the VI, and my program as a whole, works as intended.  In my program (where the VI with the scrollbar reference control is a sub-VI of the main VI), the crash only occurs when I open the sub-VI containing the scrollbar reference control through the remote debugger.

 

If I compile the sub-VI with the scrollbar reference control into its own executable (as in the project I posted), that executable crashes as soon as it is run.

 

 

Mark Moss

Electrical Validation Engineer

GHSP 

0 Kudos
Message 5 of 8
(3,142 Views)

Hi MarkMoss,

 

I have been able to reproduce your error, and am looking into it further.  I'm glad that you have found a possible work around.  I will post back when I make any discoveries.  Please feel free to keep me updated on your side too!  Thank you for bringing this to our attention.

 

Have a great day!

 

Kristen H.

0 Kudos
Message 6 of 8
(3,127 Views)
Hi MarkMoss!

It seems that the error occurs when the refnum includes the data type.  You can right click on the control refnum and unselect Include Data Type, then rebuild and run the .exe without error.  Is this also what you see?  You can then cast the value to the data type you need.

As far as why the error appears, I do not know.  I think it may be a bug.  I am submitting a Corrective Action Report on the issue.  Once again, thank you for bringing it to our attention! Post back if you have any further questions!

Kristen H.
0 Kudos
Message 7 of 8
(3,087 Views)

I see the same thing on my end.  If I uncheck the include data type option on the reference control and then rebuild, the program does not crash.

 

Mark Moss

0 Kudos
Message 8 of 8
(2,974 Views)