torkell: (Default)
[personal profile] torkell
At work today I was debugging a problem in a bit of code, where somewhere between two systems a string was being truncated. There's three units and multiple programs involved in this, so to try and narrow it down I decided to add some debug to one program. The particular system on that unit uses a flowchart-like execution structure, separating actual code from the flowchart diagram. So, add in a debug node to print out the string when one flowchart has grabbed it from the other, rebuild the chart and transfer it to the unit, run it and it's still truncating the string. But that debug node was rather unhelpful and only printed out the first few characters, so I still don't know where the truncation is occuring. Not to be defeated I dug out a better debug node from the depths of the source control, compiled it, transfered it to the unit and plonked it into the flowchart.

At which point it stops truncating the string and sends the full text all the way through the system. Ah-hah, I think, this must be a heisenbug (adding debugging code can have very subtle effects on program behaviour). I'll remove my debug node from the flowchart, rejoin the original pair of nodes together, and upload the chart.

And it's still working. Ok, I think, the act of converting the chart for the unit must have changed it slightly from the original. It shouldn't do so as that implies non-deterministic code somewhere, but that'd at least explain what's going on. So I dug out the original already-converted chart and transfer that, thinking that this'll now restore the broken behaviour (when debugging it's always helpful to be able to reproduce the original bug - if you can reliably reproduce it, you can use a debugger to see every step involved and often quickly spot the actual problem).

Except it's still working!
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 8th, 2026 07:55 am
Powered by Dreamwidth Studios