Scientists get gruesome look at how stars like our sun eat their own planets