Today, I debugged a tricky issue, a bug related to a 3rd-party library. When I used gdb
to check a structure’s values, found the last member was missed compared to the definitions in header file. I began to suspect this might be caused by 3rd-party library. I checked the upgrade log, then found the root cause: when I compiled the code, the 3rd-party library’s version is v1.1
, but when I run the program, the library was upgraded to v1.2
by others, which caused this mysterious bug. The solution is simple: rebuild the code. But the debugging process is exhausting.