When I promote a variable to a specific C++ class the engine crashes is there a way around the problem

Anything I could temporarily change so that it would work

we need more information like screenshots, and error messages

I found out what the problem was there was an array that was too large in the class that I was trying to promote the variable in.