Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've gotten a bug report from one of my users in a section of the software. The scenario is basically a databinding scenario where the user enters info, and that info is printed to pdf.

The problem is, that the functionality:

  • Is used frequently (about 40 times a week)
  • Hasn't been updated/modified in months
  • The area of code is relatively simple to walk through
  • The validation appears fine (ie, if the information wasn't filled out in the app, validation fires indicating it with a msgbox before the pdf is generated)

But this one user claims that in the past 2 weeks it's happened about 3 times out of 50 and I just can't reproduce it.

So what do you do in the case of a heisenbug?

share|improve this question
    
similar question to programmers.stackexchange.com/questions/1376/… –  Bill Oct 26 '10 at 22:44

5 Answers 5

up vote 23 down vote accepted

Add some logging to this users code.

share|improve this answer
4  
What if deployment is a bit of a heavyweight process? (it's not, and I'm going to take your suggestion, but for the sake of argument...) –  Steve Evers Oct 26 '10 at 22:42
    
give the user a specific debug version for them only perhaps? –  Bill Oct 26 '10 at 22:46
3  
@SnOrfus: in that case you could perhaps try to arrange some sort of screen sharing session with the user. During that session he would only try to reproduce the issue. Depending on how long it actually takes for a single usage of the functionality it may take a while but would give you a chance of seeing the bug "live in action". Also, if the bug reports are missing some details you could ask for more detailed reports - perhaps the user is doing something he thinks has nothing to do with the bug but that is actually important. –  Baelnorn Oct 26 '10 at 22:52
    
@SnOrfus: we try to include some logging in our application with the capability to add more details. Perhaps using MS' Enterprise Library for logging; one can configure what gets logged by level, so by changing a number in the config file, one can turn on/off debug code (off for deployment and general shipping code, with tech support telling the customer what entry to change to turn on the level of logging needed). –  Tangurena Oct 27 '10 at 18:51
    
Definitely. I've only had one heisenbug in my life that didn't fall to logging code and that one never got proper scrutiny as it was too disruptive to hunt. (It would only show on the production server and only when it was actually in use and when it showed it put all the work in the factory on hold.) –  Loren Pechtel Mar 2 '11 at 3:14

I've seen things like this on an embedded system take 6 months to find. Really frustrating.

However in desktop land, it's amazing what happens if you go an actually watch what the user does. They may be doing things in some order / manner that had not been expected and this in turn causes the trouble.

share|improve this answer
1  
This. Sitting down beside the user and having him walk through what he does. Often things are not as straight forward as the users think they are. –  Vetle Oct 27 '10 at 8:08
    
If you can't get to sit beside them, desktop sharing is a good alternative so you can watch them work and see what happens. Users often do things that seem totally unlikely to us as developers. –  glenatron Oct 27 '10 at 10:48
    
If you use desktop sharing, make sure to be on the phone to them as well so you can listen to what they are saying! –  quickly_now Oct 27 '10 at 23:44

depending on your situation you might have success with:

  • Monitor the user's machine (perfmon, eventlog, etc)
  • Monitor the user (sit with them until they have the issue again)
  • Replace the user's machine temporarily (get them on another desktop to see if it is a hardware/os thing)

kasterma's suggestion of logging is still good, give them a debug build or use injectable logging if the full deploy is too troublesome.

share|improve this answer

The best thing to do is to add logging and try to catch it in the act. If that is impractical, then the only thing left is to do a very thorough code review. Going through the change log would be a reasonable way to begin.

share|improve this answer

Check the hardware.

Run a memory test on the machine showing the problem. Run a heavy CPU load and verify it. Something like Prime95.

Hardware isn't perfect and if the hardware is bad a programmer can waste a lot of time looking for bugs that just don't exist.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.