Daklu Posted June 4, 2010 Report Share Posted June 4, 2010 Chris' post here mentioned an NI internal debugging tool called Heap Peek that I hadn't known about. So of course after reading the wiki I immediately enabled it and started poking around. I can't find any other useful information online about it. Is there any other tribal knowledge on this tool or are there other things you have used Heap Peek for? I also discovered Ned (Ctrl-Shift d, Ctrl-Shift n) and a combo to show buffer allocation (d, q.) One key combo (d, ,) causes some BDs to be grayed out. I don't know what purpose it serves though. Any other known gems? 1 Quote Link to comment
jgcode Posted June 4, 2010 Report Share Posted June 4, 2010 Chris' post here mentioned an NI internal debugging tool called Heap Peek that I hadn't known about. So of course after reading the wiki I immediately enabled it and started poking around. I can't find any other useful information online about it. Is there any other tribal knowledge on this tool or are there other things you have used Heap Peek for? I also discovered Ned (Ctrl-Shift d, Ctrl-Shift n) and a combo to show buffer allocation (d, q.) One key combo (d, ,) causes some BDs to be grayed out. I don't know what purpose it serves though. Any other known gems? Darren also recently posted about the Heap Peak, there may be some more info there or in his links too that you may be helpful? Quote Link to comment
Daklu Posted June 5, 2010 Author Report Share Posted June 5, 2010 Darren also recently posted about the Heap Peak, there may be some more info there or in his links too that you may be helpful? Yeah, I saw that but there wasn't anything new there that wasn't already in the wiki. Shortly after I posted the original message I opened task manager and found ~25 Excel processes running. I suspect some button I was mashing caused it, but I haven't pursued it at all yet. Quote Link to comment
Popular Post Mefistotelis Posted May 30, 2020 Popular Post Report Share Posted May 30, 2020 A perfect moment to dig out a thread , just a few days before its 10th birthday. I made dis: https://labviewwiki.org/wiki/Heap_Peek And happy birthday, thread! 1 2 Quote Link to comment
Popular Post dadreamer Posted May 31, 2020 Popular Post Report Share Posted May 31, 2020 Hi! Great article, indeed. I'd like to add some little notes, that I've known of. - I saw Heap Peek in LabVIEW 2.5 already. I could propose, that it was always in LabVIEW, in any version maybe, but I can't check it right now, because I don't have LabVIEW 1.0 or 2.0 distros. - There exists another way to get Heap Peek window visible. You could use some utility to deal with applications windows, like WinSpy++ or Window Detective or any similar tool. Heap Peek is hidden window by default, but it may be displayed easily. - Those hex numbers in the upper right section of Heap Peek are the objects' addresses in LabVIEW memory, so they could be used to explore (or even modify) a single object's properties or any related data in your favourite debugger (of course, if you know, what you're looking for). - I believe, DCO stands for Data Controller Object and there's DDO also, that should be Data Display Object. I didn't study DDOs much (it's either a control or an indicator), but a DCO controls how and which data is passed through a single terminal (on BD) or control/indicator (on FP). You may find any SubVI's/node's terminal w/ Heap Peek and in its properties you should find an address of DCO assigned to it. The same is doable with controls and indicators on Front Panel. On BD DCOs are called Parameters or EFN Parameters (for CLFNs) or somehow else. On FP they're called FrontPanelDataControllers. It's easy to find them using "F" button of Heap Peek. Going to the original topic, there's "Window monitor" debugging tool also, which could be viewed with CTRL+SHIFT+D+W. It's able to display LV windows handles (HWNDs), positions, names and some other info's. Oddly nobody ever mentioned it on the forums, maybe because its use cases are very limited. It's not so convenient to use also, because its interface is very ascetic. WinSpy++ or the analogs do the similar work a way better. 3 Quote Link to comment
hooovahh Posted June 1, 2020 Report Share Posted June 1, 2020 I do remember discovering the Window Monitor and Ned windows semi-independently. Someone posted a way to show the Heap Peak window, with CTRL+Shift+D+H and I thought that was likely for Debug, and Heap. So why not try D+<every letter combination>. At the time I think only H, N, and W did anything. Most of the time I care to find a window's HWND I use a private function which lets me do what I want. I have never had a need for knowing the HWND of any of the other windows so that Window Monitor wasn't all that useful for me. The Ned windows unlocked more useful information, but just for curiosity sake really. Also I find it really interesting that Heap Peak has been in LabVIEW for such a long time and with seemly no or little updates to it. 1 Quote Link to comment
dadreamer Posted June 2, 2020 Report Share Posted June 2, 2020 (edited) On 6/1/2020 at 9:38 PM, hooovahh said: Most of the time I care to find a window's HWND I use a private function which lets me do what I want. I used that FP.NativeWindow property for years and it never failed for me. I was using it on Windows only though. Maybe I could test it on other platforms as well, but I never needed that. Oh, and here's one more way to invoke Heap Peek and Window Monitor (absolutely forgot about it). Another way to view Heap Peek window - NCGLaunchHeapPeek internal function. Doesn't need any parameters and returns nothing. But must be invoked in UI Thread only, else LV goes crash. Starting from LV 2015. N.B.: Both methods do not work in RTE (compiled app). Edited September 23, 2020 by dadreamer one more way to toggle HP Quote Link to comment
Stagg54 Posted June 15, 2020 Report Share Posted June 15, 2020 (edited) You must have missed out on the joy of insane objects. https://labviewwiki.org/wiki/Insane_Objects Edited June 15, 2020 by Stagg54 Quote Link to comment
ensegre Posted June 15, 2020 Report Share Posted June 15, 2020 (edited) On 6/2/2020 at 8:09 AM, dadreamer said: Oh, and here's one more way to invoke Heap Peek and Window Monitor (absolutely forgot about it). I'm curious to see if that exists in linux too. LVdebugKeys=True + Ctrl-shift-D-H don't seem to apply. Could someone attach the snippet saved as VI for LV<=2019?? Edited June 15, 2020 by ensegre Quote Link to comment
dadreamer Posted June 15, 2020 Report Share Posted June 15, 2020 (edited) 2 hours ago, ensegre said: Could someone attach the snippet saved as VI for LV<=2019?? Here's the version back-saved for LV 2011: HeapPeek_WinMonitor.vi Heap Peek and Window Monitor are both available on Linux and macOS. And if one wishes to recreate these brown nodes manually, then (s)he should put SuperSecretPrivateSpecialStuff=True into LabVIEW.ini and restart LabVIEW; when done, a number of hidden private nodes appears. Edited June 15, 2020 by dadreamer Quote Link to comment
hooovahh Posted June 15, 2020 Report Share Posted June 15, 2020 2 hours ago, Stagg54 said: You must have missed out on the joy of insane objects. I had my share of insane objects, but I'd just clear the compile cache, and revert with SCC. I don't ever remember seeing insane objects in the installed LabVIEW functions, but if that happened it would be a bit more of a pain to resolve. Quote Link to comment
Stagg54 Posted June 15, 2020 Report Share Posted June 15, 2020 unfortunately I had inherited a giant project. The main VI had a 17 frame deep stacked sequence structure. Frame 17 was the main logic but it needed 16 frames to initialize all the global variables in the correct order. It was written in LabVIEW 5 and upgraded to 6.1 with no SCC. It was my introduction to all things LabVIEW. It was a fun project. Quote Link to comment
ensegre Posted June 15, 2020 Report Share Posted June 15, 2020 (edited) 37 minutes ago, dadreamer said: Here's the version back-saved for LV 2011: HeapPeek_WinMonitor.vi Heap Peek and Window Monitor are both available on Linux and macOS. And if one wishes to recreate these brown nodes manually, then (s)he should put SuperSecretPrivateSpecialStuff=True into LabVIEW.ini and restart LabVIEW; when done, a number of hidden private nodes appears. I see, thx. Still don't think my LV19 can toggle it with Ctrl-shift-DH, nor I seem to be able to create the brown nodes (it's ~/.labviewrc), but whatever. i was just curious.... thx for the conversion. Edited June 15, 2020 by ensegre Quote Link to comment
dadreamer Posted June 15, 2020 Report Share Posted June 15, 2020 40 minutes ago, ensegre said: Still don't think my LV19 can toggle it with Ctrl-shift-DH, nor I seem to be able to create the brown nodes (it's ~/.labviewrc) I'm unable to invoke Heap Peek with the keys combination on VM with Ubuntu. I would check on a common installation, but don't have one ATM. But adding various tokens to the config file (/home/<username>/natinst/.config/LabVIEW-x/labview.conf) works fine for me. Quote Link to comment
ensegre Posted June 15, 2020 Report Share Posted June 15, 2020 35 minutes ago, dadreamer said: But adding various tokens to the config file (/home/<username>/natinst/.config/LabVIEW-x/labview.conf) works fine for me. Right, if I put it there I get all the brown and light blue bonanza. I was mislead by http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/customizing_your_work_environment/#How_LabVIEW_Stores_Options which is pointed at https://labviewwiki.org/wiki/LabVIEW_configuration_file. But uh, that is the help page for 8.2. Still, it is at odd with https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PA7rSAG&l=en-IL Quote Link to comment
Popular Post Mefistotelis Posted June 15, 2020 Popular Post Report Share Posted June 15, 2020 5 minutes ago, ensegre said: which is pointed at https://labviewwiki.org/wiki/LabVIEW_configuration_file You can edit that wiki if you have more info. or write your comments in "Discussion" page if you're unsure about editing it directly. I created a whole category of articles there: https://labviewwiki.org/wiki/Category:LabVIEW_internals 4 Quote Link to comment
LogMAN Posted June 15, 2020 Report Share Posted June 15, 2020 (edited) 1 hour ago, ensegre said: But uh, that is the help page for 8.2. It's now updated to https://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/customizing_your_work_environment/#How_LabVIEW_Stores_Option Don't hesitate to update the Wiki if the information is outdated. Edited June 15, 2020 by LogMAN Pressed Save before post was finished Quote Link to comment
Sparkette Posted October 1, 2020 Report Share Posted October 1, 2020 (edited) If you use Ctrl+Shift+D,|, it will enable logging DPrintf messages. Then you can do Ctrl+Shift+D,P to display a list with most of them: LabVIEW internal debug keys - Ctrl + Shift + D + one of the following | toggle DPrintfs. Currently on. : print global font table A check app heap B print TD dictionary stats D PrintDSStats E toggle QElement checking G toggle StripChart scroll/copybits H show/hide heap peek. I print heap text info J rebuild all malleable instance VIs in current VI's context L prints linker graph viz info M toggle memory checking. N show Ned, the friendly debug options dialog O toggle drawing on/offscreen P prints out this list Q toggle show nonIP terms. currently off R print VI Server info S print net connection table T toggle print compile stats. currently off U toggle sanity checking. currently on for compile/save V print all OLE Variants W show window monitor X toggle new Preferences dialog Z print execution and eventQ status { compact DS now. } toggle gUseNativeFontSizing currently %s " print HeapTextRec line table. ~ toggle unattended mode < toggle clump display (use ctrl-shift arrow keys to cycle thru clumps) & print heap text font runs _ wireframe 3D controls > ActiveX Control Property Browser **** NOTE **** Debug keys are preceded by Ctrl+Shift+D !!!!! **** e.g. Ctrl+Shift+D+N shows the debug options dialog. **** You have 3/4 of a second after hitting the D to hit the N There's a few missing, however. Pressing Ctrl+Shift+D,C makes LabVIEW check the "HedgesSpecialCrash" INI key, and presumably if it's set to some specific value (not True) it'll crash. (Edit: the value is 1, and yes, it crashes with "Hedges Special gDAbort".) Ctrl+Shift+D,+ checks the "FakeInsanity" key; I tried setting that to True but there wasn't any visible effect there either. (Edit: I set it to 1, and Ctrl+Shift+D,+ made it crash when I right click a terminal.) For me, Ctrl+Shift+D,: didn't display the font table, but it checked "HedgesSpecialDWarn". I think the options for this key are "single", "singleLots", "multiLots", and "multi100", though I only tried the first. As expected, it triggered an internal warning. There's also Ctrl+Shift+D,!, which DPrintf's output like this: DPrintfVIObjRefList: [VI "GSW.lvlibp:GettingStartedWindow.vi" (0x0000000006d107d0)] objRefList has 7 obj refs ....[00] (787480577) obroFlags=0x200c0000, viRefFlags=0x00000000, h/objID={h=0x0000000006996480,o=0x0000000006ce0318}, subKind=0, subIdx=-1 ....[01] (882901084) obroFlags=0x200c0000, viRefFlags=0x00000000, h/objID={h=0x0000000006996480,o=0x0000000006ce0408}, subKind=0, subIdx=-1 ....[02] (881852507) obroFlags=0x200c0000, viRefFlags=0x00000000, h/objID={h=0x0000000006996480,o=0x0000000006c89dc8}, subKind=0, subIdx=-1 ....[03] (880803930) obroFlags=0x200c0000, viRefFlags=0x00000000, h/objID={h=0x0000000006996480,o=0x0000000006c7c598}, subKind=0, subIdx=-1 ....[04] (883949661) obroFlags=0x200c0000, viRefFlags=0x00000000, h/objID={h=0x0000000006996480,o=0x0000000006cdfaf8}, subKind=0, subIdx=-1 ....[05] (879755353) obroFlags=0x200c0000, viRefFlags=0x00000000, h/objID={h=0x0000000006996480,o=0x0000000006cde5e8}, subKind=0, subIdx=-1 ....[06] (884998238) obroFlags=0x200c0000, viRefFlags=0x00000000, h/objID={h=0x0000000006996480,o=0x0000000006cde008}, subKind=0, subIdx=-1 Edited October 2, 2020 by flarn2006 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.