When a smart object is created, it gets the file reference property from the name of the top layer, which is then used to create a temporary file (when edited). If such a name contains characters that are not supported by the file system, then an error will occur when trying to edit a smart object, for example:
activeDocument.activeLayer.name = activeDocument.activeLayer.name +"\n"
executeAction( stringIDToTypeID('newPlacedLayer'), undefined, DialogModes.NO );
executeAction( stringIDToTypeID('placedLayerEditContents'), undefined, DialogModes.NO ); //error
Please help, error when placedLayerEditContents.