Jump to content
The Engineering Bear

Troubleshooting Crashes and Hangs VI! Any feedback is appreciated

Recommended Posts

Hey y'all,

Wanted to look for some feedback on some code I made for troubleshooting crashes and hangs for medium to large LabVIEW applications.  Wanted a way for a user experiencing a crash/hang to have a simple way of narrowing down where the problem is occurring.  The VI is named Crash Logger.vi and it only requires the VI itself to use.  No type def's, additional VI's, or other necessary parts.  The reason for this is so that a user can drop it in multiple parts of their application and have it log the current state and some information on system state to narrow down where a crash/hang is occurring.  I've gotten some feedback from friend's regarding making it a global variable that wrote to variables and had a separate VI to do the logging, but this takes away the "ease of use" I am going for for the user.  I've included an example application to show how it can be used for a simple state machine.

 

I'd love getting more insight into what I could do better though which is why I'm coming here!  Let me know what y'all think!

 

- Bear 

Crash Logger BD.PNG

Crash Logger FP.PNG

 

Crash Logger Project and VI.zip

Crash Logger.vi

 

 

Crash Logger BD.PNG

Edited by The Engineering Bear
Updated Crash Logger and Pictures

Share this post


Link to post
Share on other sites

Hello Bear,

you can click the "Highlight Execution" Light Bulb in the top left corner in the Diagram window and run your VI to observe the dataflow.

I think your bug is in the case structure that checks which OS it's running on, your case "Linux, Default" is always used I think, the other cases are greyed out so that's probably where you should double check how to implement that part.

Let me know if that doesn't help.

Cheers,

Jimmy

Share this post


Link to post
Share on other sites

Yeah for me the conditional disable says that OS is not a defined symbol and so it defaults to the default case which here is Linux.  NI has lots of multiplatform code so you might want to look into how they do OS detection.

Share this post


Link to post
Share on other sites

Also (I'm on linux, desktop), Crash logger.vi is broken because of a missing /<vilib>/nisysconfig/Close.vi  and Close (System).vi (This VI needs a driver or toolkit component that is not found. Missing resource file "nisysapi.rc). And, perhaps as a consequence, the "System Session" nodes miss any of the properties they're supposeed to have. Was the code really tested on linux? [maybe on some RT NI-linux, which I miss?]

Edited by ensegre
typo

Share this post


Link to post
Share on other sites

I highly recommend you use the native property nodes which are guaranteed to work on all supported platforms. The "Execute" is a last resort and I don't see anything in your code which cannot be obtained with property nodes.

OS.png

 

Edited by ShaunR

Share this post


Link to post
Share on other sites
5 hours ago, hooovahh said:

Yeah for me the conditional disable says that OS is not a defined symbol and so it defaults to the default case which here is Linux.  NI has lots of multiplatform code so you might want to look into how they do OS detection.

http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/creating_cond_disable_struc/

"The VI must be in a LabVIEW project to access this symbol."

Probably best of both worlds is a default case which calls the method shaun suggested and otherwise its compiled in.

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, smithd said:

http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/creating_cond_disable_struc/

"The VI must be in a LabVIEW project to access this symbol."

Probably best of both worlds is a default case which calls the method shaun suggested and otherwise its compiled in.

This is why I prefer the "TARGET_TYPE" which doesn't have this limitation.

Share this post


Link to post
Share on other sites

Thank's y'all for the feedback!

I realized that I had been uploading a non working version, but that just gave me some time after NI Week to work in some of your suggestions!  

The one I'm most curious about is switching from OS to Target_Type.  Using Target_Type definitely has more options, but then how would you specify things like file path so that the user knows where to find it/make sure they don't put it some where they aren't supposed to?

 

-Bear  

Share this post


Link to post
Share on other sites
18 minutes ago, The Engineering Bear said:

how would you specify things like file path so that the user knows where to find it/make sure they don't put it some where they aren't supposed to?

This way perhaps? (or maybe this one since now we're all obsoleting out)

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.