I don’t understand why to debug something so simple.
Because you dont know why it crashes and neither do we - until you/we test ourselves and read the crashlog or debug.
Debugging and crash logs are only avaliable with debuggers or debug compiles, so you have to debug compile at minimum.
Getting a crashlog on windows requires compiling in debug and on linux it requires using the gdb debugger in the way said in the link I sent.
Any fix suggestions are exactly that. suggestions. They are guesses at what might be wrong with your code. And do note that all suggestions so far have not been helping according to your statements.
By debugging or creating a crash log (basically debug call stack to point of crash) you can show us what exactly goes wrong and why and better yet you can see yourself. (debugging is better than logs)
nothing is simple -
Do you know if it is the Talk or the SetBossState crashing?
Do you know what in SetBossState crashes? Is instance null or is it something going wrong inside the SetBossState function?
Could be the error is in your instance script and not in the code you show here at all.