Sometimes you can get fake XP orbs that are flying around you, but you can't collect. Reconnecting fixes it.
Video (by DocM77): http://www.youtube.com/watch?feature=player_detailpage&v=XQNtBD1jMQE#t=1375s (until about 24:00)
How to reproduce:
1) Download DocM77's world: http://www.mediafire.com/?sbnqqj7481onfdc
2) Go to the endermen farm.
3) Kill some endermen.
Here is one of the comments on that video, that might explain why this happens:
i had that glitch with xp orbs and i resolved it putting non-transparent block under my mob farm. I think the glowstone is holding the orbs underneath, blocking only the real orbs, but not the animation that will keep go until you get the real orbs or relog 😛
Related issues
Comments


There is already a issue related to this specifically.

Sorry, didn't saw that.

I had this happen with quite specific circumstances:
1. Abandoned mineshaft had a tunnel full of spiderwebs, and I digged the side of the tunnel open (widened it by 1 block to skip all the spiderwebs).
2. Small spiders attacked me from the webbed part of the corridor.
3. I killed small spiders, they dropped XP orbs within the web blocks.
4. Standing outside the web block but next to it pulls the XP orb out of the web and awards me with a minor increase visible in my XP level bar, but without sound and the orb graphic gets stuck in the "magnetism towards player" behaviour, forever circling my head until I dis/reconnect (and the glitchy, floaty, magnety orbs are finally gone).
Seemed to me as if the orbs were getting picked up, but their visual representation and some collision trigger never happened after they were bugged from their time in the web.
I have had this happen before in older builds, cannot confirm or deny for 1.4.2 yet.
This may also be related to MC-15