01-20-2009 11:31 AM
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
01-21-2009 04:35 PM
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.
01-21-2009 06:07 PM
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.
01-22-2009 04:47 PM
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.
01-22-2009 08:34 PM
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
01-23-2009 04:26 PM
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.
01-27-2009 05:18 PM
02-09-2009 05:49 PM
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