04-16-2012 05:31 PM - edited 04-16-2012 05:32 PM
Sometimes there is a very clear cause to a problem but it is so obvious that I just don't see it. Sort of like looking all over the place for your glasses when they are on top of your head.
Let's put our boneheaded mistakes in this thread. Don't give away the problem and let others report how long it took to spot the issue with a fresh pair of eyes.
I have a large project with many classes and many queues. I spent an hour trying to debug an "issue" where one of my loops would keep iterating after a dequeue operation. I tried to find what was enqueuing to it by running the Desktop Execution Trace Toolkit. The strangest thing - DETT reported a single enqueue yet the loop kept initializing my device over and over again. I closed LabVIEW and rebooted. Same problem. I was just about to file a bug report (could it have to do with the large number of queues in my application?) when I spotted the problem.
How long does it take you to see the problem in this example which demonstrates the nature of the problem? It took me an hour - Doh! And my application has dozens of queues so it's not like I don't know how to use them.
04-16-2012 05:50 PM
Dequeue Element should be placed inside of while loop (I mean second loop). Isn't?
04-16-2012 06:03 PM
Yup. And I'll bet it just jumped right out at you too. What's the LabVIEW word for typo?
This one got me a long time ago.
04-17-2012 01:43 AM
The dequeue and the fact that you're sending "Init" instead of "Initialize" as a command string.....
04-17-2012 03:38 AM
@Steve Chandler wrote:
How long does it take you to see the problem in this example which demonstrates the nature of the problem?
15 seconds. But knowing the problem is obvious means you look for the obvious. I spent a large amount of time on a bug that was staring at me just recently. I had a polymorphic VI that I removed one instance from, and LabVIEW automatically substituted another instance with the same connector pattern. Obviously different icon, but I stared and stared at it and didn't notice. The original VI was "Wait till this actor (loop) receives the shutdown message" and the replacement was "Send this actor the shutdowm message", which has a rather different effect. I spent over an hour trying to track down who was sending the shutdown message to my actor before noticing.
04-17-2012 07:59 AM
04-17-2012 09:46 AM - edited 04-17-2012 09:47 AM
@Intaris wrote:
The dequeue and the fact that you're sending "Init" instead of "Initialize" as a command string.....
How ironic. I whipped up an example to show my "loop invariant init" and the example had another.... what's the word for typo in LabVIEW... (Although in this case it is in fact just a typo)
04-17-2012 12:44 PM
@Steve Chandler wrote:
@Intaris wrote:
The dequeue and the fact that you're sending "Init" instead of "Initialize" as a command string.....
How ironic. I whipped up an example to show my "loop invariant init" and the example had another.... what's the word for typo in LabVIEW... (Although in this case it is in fact just a typo)
I had just assumed that was one of your space-saving strings---- go with that That's your story- stick to it
04-17-2012 03:45 PM
I wanted to come back and thatnk you for posting this. I was a great opportunity to show around the shop! EVERYONE now has show constant folding of wires ON, they know what the squiggly wires mean and they realize how useful that info can be.
Aside- I've had those squiggly lines on for so long that I usually know which wires will squiggle as I sling them- so when I look at other code ("Hey! Jeff! What's going on with my code?") It looks funny without the constant wires squggled. Guess what would have saved you an hour?
04-18-2012 07:34 AM
Oh boy!
A thread comparing boneheaded code developers. I think i can compete in that sandbox.
In this thread, Dennis helped me figure out why* I could not increment a control at run-time.
"I got better" since then.
Ben
*
Yes, it was disabled.