This question already has an answer here:
Which are the crimes in which people becomes ghost I got this part here thanks and for how much time (references will be surly better then personal openion)?
I asked about suicide but looks like if someone kills you and you die with some desires...lol, actually I think then everyone will become ghost, who don't have desires till there last breath? then also you will become ghost.
I read a story in which the person steals some food for some family with which he don't have any relations and then since his intension was good so INDRA himself came to take him to Swarg. So I think reasons should also be seen for anything you do,since there are reasons for everything we do. Main thing is ..those reasons matters alot..if someone steals something, then rules are same but in God's eye by above story I think there must be something like "even someone commit any of those crimes for "___" reasons then it's okk and they don't become ghosts.