Jump to content
flarn2006

[DANGER!] Low-level editing of VI objects

Recommended Posts

I don't know if anyone else has thought of this, but you know that Heep Peek window? It's mainly used outside of NI for getting rid of insane objects, but another thing it tells you is the addresses of VI objects' data. How is this useful? Well, there's this program called Cheat Engine that lets you edit memory. It's designed for games, and that's what it's mainly used for, but it can also be used for this purpose.
 
OtJtx.png
 
Here's a screenshot of the Heap Peek window. See those green boxes I added? Those are the addresses in LabVIEW's memory for the objects. Now in Cheat Engine, you'd target LabVIEW.exe by selecting the computer icon in the upper-left corner, and selecting it from the list. The Memory View button will open a window showing a hex dump, and you can right-click that and select Goto Address to browse to one of these addresses. Now you'll see an editable hex dump of this object's data. The bottom of the Heap Peek window shows the order of the values, and it should be relatively simple to look for those values in the hex dump, but I don't know a surefire way to get the address of any item at the bottom. One thing I managed to do by editing the flags value of a Terminal object is make a constant with a terminal that acted as an input rather than an output. Connecting a control to it and running the VI gave me a broken run arrow, with an error saying LabVIEW needs more memory.

If you're wondering how to open the Heap Peek window, just add "LVdebugKeys=true" to the end of LabVIEW.ini. Then relaunch LabVIEW and press Ctrl+Shift+D, then Ctrl+Shift+H.

It should go without saying that editing these values is purely for exploration purposes, and should NOT be used in any production VIs. This is definitely not supported by NI, and neither they nor I take any responsibility for anything you may mess up by editing these values. Even more so than Generic VIs, SuperSecretPrivateSpecialStuff, XNodes, or any of that stuff. It is very possible to crash LabVIEW and/or corrupt VI's by editing these values.
 

Here's the VI I mentioned. It contains a numeric constant connected to an indicator with a broken wire. Changing the indicator to a control makes the wire no longer broken, and running it gives a memory error. Obviously dangerous in a production environment, and definitely not supported by NI, so be warned!

 

constant to indicator error.vi

Edited by flarn2006

Share this post


Link to post
Share on other sites

A4Tmz.png

I hacked the Bounds property of an Add node...when you move it you can see it's trying to draw a really wide Addfunct.png, but it doesn't seem to be erasing properly. Also, the terminals don't scale with it.

Edited by flarn2006

Share this post


Link to post
Share on other sites

I don't know what (if any) value can come from low level editing like this, but I am curious about what things are possible.  Like would it be possible to make a 0px splitter bar?

Share this post


Link to post
Share on other sites
<sarcasm>What could possibly go wrong with this?</sarcasm>

Exactly. This is purely for fun; it would be idiotic to use this in any important VIs.

Here's a tip for editing objects: copy something to the clipboard, and then select BDHP Clipboard or FPHP Clipboard on the left (for block diagram or front panel, respectively) and select the object on the right with an asterisk before its name.

Ehr6D.png

Edited by flarn2006
  • Like 1

Share this post


Link to post
Share on other sites
<sarcasm>What could possibly go wrong with this?</sarcasm>

I almost feel like the sarcasm tag wasn't even needed for this one.

  • Like 1

Share this post


Link to post
Share on other sites
This is why LAVA exists. Love it!

 

Strange, I thought it existed because of intense heat and pressure underground or something like that.

Edited by flarn2006
  • Like 1

Share this post


Link to post
Share on other sites
flarn2006,

 

Can you use this tool to debug LabVIEW2012 and make it better?  then you can re-brand it as LabVIEW2013

 

I don't know what you're getting at. Are you joking? No offense if you're not.

Share this post


Link to post
Share on other sites
I don't know what you're getting at. Are you joking? No offense if you're not.

He's joking (I assume).  We really need to implement the sarcasm font

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.