I'm working on a project from three machines, using one machine most of the time.
Yesterday, after adding a new member variable to a class, the project compiled but then crashed.
Usually, I wouldn't hesitate to take the blame.
It's very-very rare I make the compiler or environment behave wrong.
I code stupid, make things easy for myself when possible.
I tried debugging to find the source of the segfault. I found that it seemingly occurred in std::map::insert(val, key), and traced upwards. Everything had been initialized. Val referenced something created elsewhere, I thought it looked good. Key was a copy since the parameter. I hadn't touched this area of my code for over two months...
There were no dangling pointers (no pointers, even) to be found in my main units, so I thought it had something to do with the member variable. (Being the last change I committed, this should be the prime suspect)
The class that I added the variable to contained an object which in turn contained the std::map, so I thought to myself, that maybe the change in the header file didn't trigger a build of new .os that should depend on it. When I created my own build tool, I didn't check the headers for modifications, and unless I changed the implementation file too, I'd often end up with having to clean build, or everything would crash.
Sure enough, a clean build fixed the error. But is Netbeans supposed to miss a significant change like a new member variable, without recompiling the unit+dependent units?
Do you guys experience this too from time to time? It's been weeks since I last encountered a segfault,
and now I'm worried that perhaps I'm doing something wrong.