Hallo every body.

I need help.,
I have a program to read gps and accelerometer data from port. The programm work like this : when I send 'a' pros will receive gps data and send to database, when I send 'b', prog will send accelerometer data and save to database. But when I runn the proggram, gps data success to received and send to databse but accelerometer data canot receive and error is "segmentati on fault.
Could you...