Correct way to initalize SentrySubsystem? #248
-
Hi everyone, so after deploying a packaged build I noticed, that after a while there were a lot of crashpad_handler.exe's popping up in the task manager attached to our application. I figured out the reason for this was, that I was using a blueprint to initialize the SentrySubsystem on BeginPlay. I placed this blueprint in my world. So everytime the world would get reloaded a new SentrySubsystem would be initialized and subsequently a new crashpad_handler.exe would be started. Since I was initalizing it in a blueprint I thought the Subsytem would only be alive as long as the blueprint/level was loaded. So am I correct that in this case my only way of initalizing the Subsystem would be in the Game Instance? I don't want to use the option in the plugin settings, since I want to set the settings programmatically. Side question - I still don't quite understand how crashpad works with Sentry in Unreal. I'm on Windows, so the plugin is using the Native SDK - so as far as I understand I don't need to further configure crashpad, correct? Thanks for your time & help! Best |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes, Note that while working in the UE editor seeing multiple Regarding the second question - |
Beta Was this translation helpful? Give feedback.
-
Hi @tustanivsky, thank you so much for helping :) I tried moving the initalization to the GameInstance and indeed it works fine! What I've noticed regarding Packaged Build behaviour: Don't know if this has any relevance or not - because initially I would've expected one crashpad_handler.exe to be running constantly, but since it works fine I guess thats not the case? Best |
Beta Was this translation helpful? Give feedback.
Hi @ChristianBehrendt,
Yes,
SentrySubsystem
shares the lifetime of the game instance so placing its initialization logic there sounds reasonable. I like the idea to add a separate method allowing you to check whether Sentry is initialized though, so thanks for the tip!Note that while working in the UE editor seeing multiple
crashpad_handler.exe
entries in the task manager after a while is an expected thing. There is no way to de-initialize crashpad and it remains alive until terminating the process by which it was started (UE4Editor.exe in this case). In packaged builds there is no such behavior since the crashpad shuts down when user exits the game.Regarding the second question -
sentr…