Expanding on this advice: never assume that the libraries or programs you use are bug-free.
Before digging deep into your own code, make sure the bug actually is in it, and not somewhere else.
I have seen problems where a particular program didn't work, due to the other side - which I had nearly no information about - had a bad optimisation, which made it crash. Or another, recent case, where a particular third party library was abusing a cache, and stored freed objects in it, which resulted in interesting crashes all over the place.
Before digging deep into your own code, make sure the bug actually is in it, and not somewhere else.
I have seen problems where a particular program didn't work, due to the other side - which I had nearly no information about - had a bad optimisation, which made it crash. Or another, recent case, where a particular third party library was abusing a cache, and stored freed objects in it, which resulted in interesting crashes all over the place.