LabVIEW Project Providers

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

Crash in Global_OnCommand

Hello everyone!

I've recently started developement of thousand ways to crash LV my own provider , and I've encountered a little problem.

I have this Global_OnCommand method implemented:

VERITECH_LVCM_RUN command is registered as item in Tools menu.

When I select this menu item from Project Explorer window, everything works fine - _Veritech_LVCM.vi is called as expected.

However, when I select this item in any other window (i.e. Getting Started window, VI window, or any other), LV crashes:

I have a feeling that this might not be really unexpected and I'm just missing something - can anyone give me a hint? Here's my ini file for reference:

[Provider]

SupportedType={D60740D6-F254-4BBC-5675-8858F35B810E}

SupportedType={ABC740D6-F254-4BBC-5675-8858F35B820E}

SupportedType={EFD740D6-F254-4BBC-5675-8858F35B820E}

SupportedType={64A9BF48-4C55-45DB-8F18-9C796DA0C113}

SupportedType={D60740D6-F254-4BBC-5675-8858F35B820E}

SupportedType={81C68620-8BE3-4643-B04A-4E83AA6363D2}

GlobalItemInterfaceVI=..\Veritech_LVCM\_Veritech_LVCM_Global_Interface.vi

ItemInterfaceVI=..\Veritech_LVCM\_Veritech_LVCM_Item_Interface.vi

IsPrimary=0

LicenseName=None

InterfaceVersion=1.0

Signature=H1DD3N

0 Kudos
Message 1 of 9
(754 Views)
8 REPLIES

Re: Crash in Global_OnCommand

Images I've inserted in poste gone somewhere, so here they are again:

VI:

Global_OnInit.png

Crash:

Crash.png

0 Kudos
Message 2 of 9
(708 Views)

Re: Crash in Global_OnCommand

PiDi wrote:

I've recently started developement of thousand ways to crash LV

I've likewise perfected this art; fortunately, have begun to learn the science of avoiding the "art"! Send me a message to my first name @wirebirdlabs.com, and perhaps we can screenshare to investigate the issue?

0 Kudos
Message 3 of 9
(708 Views)

Re: Crash in Global_OnCommand

I don't know offhand exactly what this is, but I have seen some weird issues with calling VIs programmatically in the provider context, and there may be some special weirdness with using the "Call and Forget" features. 

Thanks for offering your help here Jack, let us know if you guys are able to pin it down or if you need some additional assistance.

David

0 Kudos
Message 4 of 9
(708 Views)

Re: Crash in Global_OnCommand

Jack, the exact moment I've got notification about your message here, I've also got the idea what might be wrong... Coincidence...?

Here's the thing:

I've got some tools developed earlier, which I put into "<LVDirectory>\project\Veritech" path. This makes LV create Tools->Veritech menu automatically, where I can select my tools.

When I started working on provider, I've decided to put global commands into the same (Veritech) menu. Apparently if you do this (put provider menus into menu created from <LVDir>\project\ directory), something goes wrong when provider commands are called from outside Project Explorer window and LV crashes.

I've attached project which reproduce this behaviour.

0 Kudos
Message 5 of 9
(708 Views)

Re: Crash in Global_OnCommand

I can reproduce silent CTD when selecting the menu item from the GSW.

Looks like the "Crasher" is a red herring -- you can strip the _Veritech_LVCM_Global_OnCommand.vi diagram of everything except the "Object" and "Command ID" terminals (even delete err in and out), and the crash still occurs. Also, I recreated this VI from scratch and the problem persisted, meaning it's not a corrupting in your VI itself.

Perhaps, rather than trying to dynamically create this menu, you just drop those particular menu items in the Project dir? You can brand/localize the items using a ".txt" file to remap names to callback VIs. Perhaps you've already ruled this out technically, not sure...

Procmon did not turn up anything from a 2min "search for obvious problems"

It's not a solution, but hopefully it helps rule out some things!

0 Kudos
Message 6 of 9
(708 Views)

Re: Crash in Global_OnCommand

Looks like the "Crasher" is a red herring -- you can strip the _Veritech_LVCM_Global_OnCommand.vi diagram of everything except the "Object" and "Command ID" terminals (even delete err in and out), and the crash still occurs. Also, I recreated this VI from scratch and the problem persisted, meaning it's not a corrupting in your VI itself.

Yup, that's right, I also observed this behaviour in my original code before. There is some problem with calling OnCommand itself when selecting menu item. Might be the dreaded context that David talked about - probably LV itself tries to call OnCommand in other than Provider context, when it is called from "project-directory-menu". Interesting thing that it works from Project Explorer window though... Would that mean that the situation is reversed there and all the VIs from Tools menu in Project Explorer window are called in Provider context? I'll need to check.

Anyway, I think it's work for R&D here

Just for information: this issue is also present in LV2013.

Perhaps, rather than trying to dynamically create this menu, you just drop those particular menu items in the Project dir? You can brand/localize the items using a ".txt" file to remap names to callback VIs. Perhaps you've already ruled this out technically, not sure...

I have few ideas for workarounds. It's much easier to find solution when you know the source of problem

0 Kudos
Message 7 of 9
(708 Views)

Re: Crash in Global_OnCommand

Jack, PiDi


Do you have the stripped down version that crashed that you don't mind posting?  If not I can use PiDis and go from there, but figured I'd save some work if you still had it handy.

Anyway, I think it's work for R&D here

Once I reproduce it here I'll CAR it to R&D and post the results and CAR number here.

I have few ideas for workarounds. It's much easier to find solution when you know the source of problem

I'm glad you have workarounds for now.  If these don't work for some reason and this becomes more urgent, let us know and I can try to escalate faster.

0 Kudos
Message 8 of 9
(708 Views)

Re: Crash in Global_OnCommand

David,

I don't think there is much more to strip down from the example in my post I think you can reproduce the problem from it without too much effort (there are even Install and Remove VIs attached for your convenience )

0 Kudos
Message 9 of 9
(708 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.