I guess i will tell you a basics of dealing with crashes
C++ is compiled directly to bindery machine code which is executed directly by your CPU, because of that if something goes wrong it won’t pop friendly message but crashes. There to ways to deal with them in UE4 easier and harder.
1.Sometimes UE4 on last breath before crash logs if something going wrong which might direcly tell you what cause may crash or at least give you some clues what may happen wrong. Engine also dumps the stack when crash happens to the log. You can find logs in your project directory Saved/Logs/ProjectName.log
2.If logs does not give you out any information you will need to use debugger. In VS start the editor by Debug->Start Debugging, when VS and crash will happen insted of closing editor, VS will jump in and break the code right before the crash and analyze it. It will show expect line where it happens which is already huge help (thru you can read code line from stack dump in logs too :p), i will also show you state of variables in memory (sometimes i buggy), you may see if something is not set etc. If you still can’t figure whats wrong you can put a breakpoint (by clicking on left edge of code editor) on begining of function tha cause a crash and then execute code step by step (F11 Step Into or F10 Step Over) it might give you more clues.
Most common cause of crash is null or wrongly set pointer, for exemple if GetWorld()->SpawnActor<ADCDH_Spell>(SpellBlueprint); fail to spawn the actor for some reason it will return Null pointer instead of pointer to actor, then on spell->Cast() you gonna have a crash because you trying to call function from null pointer, object that does not exist. So when you discover on which line you have a crash, check if whole varable chain leading to function call have pointers set correctly. Other common cause is invalid cast, when you try to cast object to incompatible type.
as i heard static ConstructorHelpers::FObjectFinder<UBlueprint> ItemBluePrint(TEXT(“Blueprint’/Game/Blueprints/BP_Spell_Fireball.BP_Spell_Fireball’”)); will cause you crash when you gonna package the game as UBlueprint exist only in editor (it as anwser from UE4 dev on AndwerHub, it had solution can’t find it now :p). Best is to avoid referencing Blueprint from C++ and design your code so it can handle things just by using base class and send blueprint objects from game/editor side. For example it seems you want to make Fire spell a default spell for character, insted of doing that in C++ you can make property in which you set default spell (or whole inventory) in your extended AWorldSettings class (which controls level settings, when you click “World Settings” editor you see exposed properties of that class which are saved to the level files), you can also do that in you base character class which you then extend from blueprint and set default inventory there. You can also handle giving spells via blueprint by making spell giving nodes (thats easiest way :p)