Northern Ireland has a classic example; Bobby Sands was elected as MP in a 1981 by-elections for Fermanagh and South Tyrone while in prison for IRA activity - and on hunger strike. Sands died as a result and a second by-election was held.
Yes, but Sands couldn't actually vote himself, and I'm not sure from an electoral perspective what his residency was (if anything).
And, of course, the British government, disapproving of the people's decision, soon decided that
the law should be changed such that prisoners like Sands couldn't be candidates in elections.
It seems Westminster is, by the by, going
to consider defying the European Court of Human Rights ruling on prisoner voting.
I'm not sure if any signatory to the ECHR has ever went so far in explicitly rebuking a court decision before as to have its parliament declare a decision to be wrong.