Have you checked that _ply_pnt_ids.size() > 0 somewhere before? _ply_pnt_ids[0] could be invalid.