try to trace clear method, maybe somewhere invalid pointer is used.