[Modify] modify str gen fun

delete crash