Thanks for the bug report. I can't reproduce the problem on my Fedora 20 x86-64 desktop, but in reviewing xgselect.c I see some glitches that could explain things. Please try the attached patch and let us know whether it helps with your problem. Please compile with -DENABLE_CHECKING so that the patch's 'eassert' calls have teeth. Thanks.