Got Nailed on a Mis-Matched Library
I just got finished fixing a problem that I should have seen coming. Yesterday, due to some chat server issues, I needed to update an app of mine to get a little fix for a socket problem so I did a standard deployment. Problem there... the development codebase has been moved to a different version of a data provider's API, and so the deployment to production totally hosed the installation. Yikes!
OK, time to be clever... checkout everything on the last good build of the server, rebuild it and ship it out. Whew! it worked. That is... until this morning.
This morning a user came by saying they could not get data from the server, and I checked and he was partly right. Some data could be obtained, and some couldn't. After a few tries, it seemed that the tables-of-tables data was the thing that was causing the server to crash. Not good. But what could it be?
The code hadn't been touched in ages (before the move to the new API), so that wasn't it. Then I thought it had to be in the libraries - there had to be something that was causing the shared library to mess up - maybe a bad header file. So I took the time to get all the headers up to date and then rebuilt everything again.
This time it was fine - and it makes perfect sense. There must have been a change in the CKTable's header that was in the shared library version that wasn't in the header file I was using and they two were causing the crash when the code hit it. I should have seen this coming and been much more careful about the updating of the libraries in the build the night before. Yes, it's not a mistake I'll make again.