To add a condition to your watchpoint:
In the Breakpoints window, right-click the After Write breakpoint and choose Customize.
Verify that After is selected in the When field.
Selecting After enables you to see what the value of err_silent was changed to.
Set the Condition field to err_silent == -1.
Run the program again.
You stop in checkThings(), which is the first time err_silent is set to -1. As you look for the matching err_silent++ you see what looks like a bug: err_silent is incremented only in the else portion of the function.
Could this be the bug you've been looking for?