With whatever code you have provided, it seems it is a clear case of memory corruption
First
if(firstInstance == 0){
m_posRead = 0;//only on first instance
m_posWrite = 0;//only on first instance
firstInstance++;//check to see if multiple threads entered at the same time and look at the count
}
Above code initializes m_posRead and m_posWrite to 0 only for first instance. FOr all other instances, it is undefined.
Secondly, in the constructor you are doing
m_nBufferLength = sizeof(char); //short int
static char *cMessageCB = new char[m_nBufferLength];
m_cMessageCB = cMessageCB;
Now, this makes m_cMessageCB only 1 byte wide. While, in CMem::Write you are doing
m_cMessageCB[m_posWrite] = m_cMessageWrite;
m_dTimeCB[m_posWrite] = m_dTimeWrite;
m_posWrite = (unsigned char)(m_posWrite + 1);
Here m_posWrite has been incremented. First time it will write on 0th index. Next time you call CMem:Write and it will try to write on 1st index which is "Array Out Of Bound Write" (because m_cMessageCB is only 1 byte wide)and it's behaviour is undefined. It may terminate on the next write or any other future writes.