update: sorry, following function results error, not the previous one. It construct uobjects and adds them to a map, then delete some element, then crash.