Intermittent bugs are amongst the most frustrating ones to track down to the root. Why? They don't crash your program consistently — they just occasionally make things stop working, and restarting usually fixes them... for a while though. And this is exactly the kind of ghost that was haunting the JNI-for-NI-Drivers library, an open-source Java wrapper for National Instruments (NI) hardware drivers, also used in a train cab simulator at the Birmingham Centre for Railway Research and Education (BCRRE), University of Birmingham . — 10 min read Open Source Contribution · JNI / NI-DAQ · Pull Request #2 This post walks you through the root cause of a bug, how it was diagnosed, and its fix contributed via Pull Request #2 . What is JNI-for-NI-Drivers? National Instruments, officially, does not provide Java language bindings for its hardware drivers. There, JNI-for-NI-Drivers library fills that gap. In essence, it is a wrapper ar...