SegFault caused by *In and *Ip, even tough In and Ip are not NULL