this problem happen when the camera or lens were not properly taken care of. fungus can grow in lens and also camera, especially during rainy season. when cameras or lens were store in damp and dark area, this will favor the growth of fungus in them. this happen to me to as i keep my cameras and lens in beg, and keep it for long time. fungus infect my 18-55mm, 55-200mm and 35mm. i sent it to third party for cleaning, and they only managed to clean only the 35mm for the price of Rs 500 or USD 10. so i send it to nikon service center, they say the cost will the the same price for 55-200mm. really expensive one. fortunately the fungus doesnt affect my camera body.
my friend got her camera and lens infected badly, here is the photo.
fungus on the sensor, this causes black line when taking photo and more prominent when using narrow aperture.
to view the fungus, just take the lens and direct it toward light source such as lamp, and your eye should focus on the glass, not the image behind it.
there are some ways of avoiding this, i read some articles from net, to prevent this, the camera and lens should be kept in tight container with damp absorber such as silica gel to reduce moisture. for me, i just put it under table lamp to give some heat and light to the lens, hopefully the fungus wont grow again.