Try seeing if it happens when you go into SAFE MODE (tap F8 as the computer is booting up and then select SAFE MODE from the Windows XP Startup Menu).
How many memory modules do you have? If it's a memory error you could "try" removing all but one module and see if it's bad memory.
Another possibility is a virus and/or XP corruption.