LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LVOOP DataGridView crash when a specific property set in certain order

Solved!
Go to solution

I am writing an API in LVOOP for the .net DataGridView control, mostly becuase I like/want the combobox in the listbox functionality. Everything is going fine but I have run into something kind of strange. In the attached "test.vi" code, if I set the property to allow user to add rows to true after I add a combobox column, things work fine. But, if I set it to false, I get a crash.

 

Now, if I set the same property to either true or false BEFORE I add this column, I get no crash. I can't seem to reproduce outside of LVOOP so I'm wondering if that is the issue. Could someone let me know if they can reproduce this? I put all the possible cases into diagram disable structures, so you should just have to enable/disable appropriately.

 

Note: I hope you're familiar with context help, as I have not created icons for my VIs (yet) Smiley Very Happy

0 Kudos
Message 1 of 5
(2,696 Views)
Solution
Accepted by topic author GregFreeman

I see the same thing on 2012, although it's not acutally a crash - LV just gets stuck in the not responding state.

 

If you make the control larger, this stops happening, presumably because the cell or last row is now visible, so I suspect that there's an unhandled exception or something similar somewhere which LV is waiting on, similar to what's described here - http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/00437163-e197-4ba1-9e95-a3a24...


___________________
Try to take over the world!
Message 2 of 5
(2,680 Views)

You're right, I shouldn't have said crash so thanks for clarifying. I will look into it further but I'm sure that's the problem. I'll mark the solution once I test it when I get some free time. Thanks for the response.

0 Kudos
Message 3 of 5
(2,665 Views)

This definitely seems to have been the problem. I'm assuming there is no way I can handle this exception correct; it has to be done in the background by NI? Let me know if there is someway I can catch it otherwise. But I'm guessing it has to be handled by NI to throw error 1172 like all other .net nodes seem to do.

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

I don't think there's anything you can do, but I don't know the details of exception handling in .NET or LV (and we don't even know for sure that that's the problem).

 

In any case, I would suggest pointing NI towards this issue, as the freezing is probably a LV bug. Since it seems to be affected by the row's visibility, the example could probably be simplified (i.e. no LVOOP).


___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(2,634 Views)