LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows error with Graph: Mouse Down event and zooming

Hi,

I'm trying to create a program with LabVIEW 7.0 Express where the user can switch between zooming in on a graph or selecting a cursor on the graph by clicking on either a blank portion of the graph to zoom in or clicking on a cursor to select a cursor. The user wants to be able to do this without having to select "cursor select" and "zoom" from the graph palette.

I've got code that determines whether the user has clicked on a cursor or a blank portion of the graph. This code is located in an event structure for the Graph: Mouse Down event. My problem is that after the code switches the active palette tool within that event structure using a property node to zoom then clicking on a cursor on the graph to generate a Graph: Mouse Down event to switch back to cursor select crashes LabVIEW and the following Windows error is reported:

"LabVIEW.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being created."

Does anybody have any idea why this is happening, how to prevent it or a different way to accomplish this programming goal?

Thank you!!

JesseB
Message 1 of 13
(2,931 Views)
Let's have a look at your vi. Could you post it here ?

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 2 of 13
(2,923 Views)
Here is a watered down version of the code. The funny thing is, this code that doesn't have all the other functions in it that the real code does generates the Windows error even quicker!

Any suggestions?

Thanks,

JesseB
0 Kudos
Message 3 of 13
(2,914 Views)
Please give us step by step instructions on how to create the crash.

I took a quick look using LV 7.1 and no crash.

So...
1) I did do the right things
or
2) The problem is corrected in LV 7.1

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 13
(2,906 Views)
Here's what I do:
1. run program
2. try to click on a cursor on the graph to move it and the error occurs.

Sometimes it will let me move a couple cursors a few times but if I click on a blank portion of the graph to switch to zoom mode, zoom in, and then try to click on a cursor to get back to cursor select (or choose cursor select from the graph options control and then try to click on the graph) it crashes. I can rarely run this sample code more than 4-6 mouse clicks on the graph without it crashing.

Perhaps it is something that has been fixed in version 7.1.

JesseB
0 Kudos
Message 5 of 13
(2,901 Views)
Not fixed in 7.1 (+W2K)!
LV crashes at the first mouse click on a cursor. Rather boring to be obliged to reload each time.

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 6 of 13
(2,893 Views)
OK, I managed to reproduce the crash.

I will call this a bug and report it to NI.

Please refer to the attached mod of the original llb.

Open the vi "Waveform Graph with Zoom_Cursor SelectCrash.vi".

The new "crash button" on the FP lets you determine if you want the VI to crash or not.

I noticed that crash occured while I still had the mose down so I started trowing away code until the problem went away.

I appears that

If
the previous active palette tool was zoom
and
the mouse down event is firing
and
you set the active palette tool to "2".

then it crashes.

Omit any of these criteria and no crash.

In my example that is how I control if it crashes or not.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 13
(2,883 Views)
My previous post should have read

"the previous active palette tool was "0" "

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 13
(2,879 Views)
Hello,

Thank you both for your assistance. I'll try out the modified version of the code when I'm back in the office on Wednesday. Thank you too for reporting this to NI!

JesseB
0 Kudos
Message 9 of 13
(2,873 Views)
Hey Jesse, Ben,

I have filed this as a bug report to LabVIEW R&D. I was actually getting errors even with the modified VI supplied by Ben's later post, and it looks like there is a bug regarding graph cursor events that is being fixed. Thanks again for reporting this strange behavior.

Kileen
Message 10 of 13
(2,851 Views)