You didn't give a lot of info. However, as someone who does real-time programming for a living the most likely culprits I look for when such things happen is:
- Using uninitialized memory.
- A race condition.
- Some obscure combination of the above.
For instance, one such trouble I had once came down to shared library not being as "shared" as I thought, and trying to use a handle from one process to index a table that was as yet uninitialized in a second process. Depending on how things started up that may or may not have caused important data in yet a third process to get trashed.