How to fix repeated crash when loading Project?

What’s the full source of the constructor?