The old code has been working without any problems for over 10 months, and the new code (which is now reverted again) effectively differed in one thing:
if(0)
delete some_pointer;
Technically, it's not
if(0) but
if(delted), but that variable is initialised to
0 in the class constructor and never changed. Only if you mix revisions, then obviously the old code would not know about initialising that member, which would obviously not work.
This can be by compiling with "old" precompiled headers or by using an "old" plugin with a "new" application, or whatever. Any kind of "old+new" mix is bad.
I've been saying this for almost a week, but people would insist... and they got their will, the old version is back.
Now we have the same identical code that has been working fine for 10 months again, and oh surprise... it crashes in the same location. This proves that the modifications were really harmless.