How to create component Dynamicly in 4.8?

what line is causing the crash , what debug error you get?