I found a problem with a compass and a magnet, as diagrammed below.
The needle of the compass was oscillating in an uniform magnetic field, but when a soft iron bar was placed near the needle, then the needle came to rest after some time. Why did this occur?