Flash memory corruption due to electricals?
This is probably a software bug.  However, you did say "vehicle", which implies unusually nasty power.  If this is a normal car, then the "12V" power is about as bad as such things get electrically.  You definitely can NOT just connect the 12V car power directly to your single board computer (or whatever your hardware is) unless it is specifically rated for "automotive power", even if it has a 12V or so power input.

Car power can be nearly 14V in normal operation, and can have 10s of volts of short term spikes.  These can confuse or destroy electronics not specifically designed with them in mind.

You didn't say what voltage and current your computer needs, but the easiest solution is to get a "automotive rated" power supply that makes the right DC voltages.  There must be such things available off the shelf somewhere.