The Azurill gender glitch is a recurring glitch; first existing in Generation III of the main series Pokémon games and later appearing in Generation IV and Generation V.
When a female Azurill evolves into a Marill there is a 1 in 3 chance that it will evolve into a male Marill. This can be explained by the fact that the gender rate of Marill is different to that of Azurill, but that the PID must remain the same throughout any legal modification to a Pokémon, including evolution. Variables such as nature and gender are extrapolated from the PID, hence the possibility of this glitch occurring. While Azurill is 25% male and 75% female, Marill is 50% male and female. Thus, upon evolution, the gender of the Marill may differ from that of the Azurill.
-  - A video of the Azurill gender glitch on Pokémon Ruby.
-  - A video of the Azurill gender glitch on Pokémon Diamond and Pearl.