This message was posted on behalf of Intel Corporation
Thank you for your interest in the Intel RealSense Technology.
We have run the same example as you and we did not encounter this issue.
Could you please let us know if the 1.ply file generated is empty? Are you using the code as it is or did you make any changes on it? Could you please let us know what is the camera that you have used?
Another option to save a .ply file is from RealSense Viewer. You have to go to 3D view, have both Depth and RGB camera streams opened, and save it as .ply.
Looking forward to your reply!