I am working on a project where I have source files I can edit (.cpp, .h) and object files that I cannot (.obj). I am trying to add a variable to one of the source file's classes. It compiles and links fine, but it causes a random crash somewhere in the application's life cycle.
My question is this: Is there any way I can add member variables to a class residing within a source file being linked to and used by OBJ files (without recompiling the OBJ files)?
I understand that it's entirely possible I am misunderstanding what the actual issue is, but this is my best guess as I've encountered it before and would appreciate answers in response to my question. That is of course unless you are absolutely sure my issue is something else.
Here is some background: I am working with another programmer's code. They have set up multiple singletons used everywhere in the code base. I am trying to decouple a particular group of systems from all the singletons using messages so that I can manage, modify, and build upon the systems more easily. Upon adding a variable to one of the singletons, it crashes the application in the same place every time (of which I cannot see the source code of). Depending upon what type of variable I add, that crash will happen at some different point in the application. I have considered that there is a buffer overflow somewhere in the code base, but I do not have the time to deal with that issue and am looking at other more concrete possible causes first.
Of course the "simple" solution would be to have the programmer who is dishing out the OBJ files recompile them with my new variable added (which they've had to do once before), but I am still working out the best way to decouple the systems, and the turn-around of doing and undoing that would be too time consuming due to the other programmer working an opposite schedule of mine.
I would have posted some source code or debug call stacks if they were relevant, but they aren't. The issue is exactly as stated. I added a variable to a class. It now crashes the program in some random OBJ file's routine.
Thanks for your time.