Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calling beforeSend handler during post-loading #589

Merged
merged 8 commits into from
Jul 16, 2024

Conversation

tustanivsky
Copy link
Collaborator

Related to #505 (comment)

@tustanivsky tustanivsky marked this pull request as ready for review July 8, 2024 12:02
@tustanivsky tustanivsky changed the title Fix error output device threading issue Fix calling beforeSend handler during post-loading Jul 8, 2024
@tustanivsky tustanivsky requested a review from bitsandfoxes July 9, 2024 07:08
USentryEvent* ProcessedEvent = EventToProcess;
if(!FUObjectThreadContext::Get().IsRoutingPostLoad)
{
// Executing UFUNCTION is allowed only when not post-loading
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide some context what this means?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-loading is a part of an actor lifecycle that goes right after finishing loading it from disk (i.e. when a game map opened in editor). Typically at this point some related actor's versioning or fixup behavior should be called. It's unsafe to use any blueprint-implemented functions (like HandleBeforeSend in our case) during this stage so we've added an extra check here to avoid triggering a corresponding assertion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation!

# Conflicts:
#	CHANGELOG.md
#	plugin-dev/Source/Sentry/Private/SentrySubsystem.cpp
@tustanivsky tustanivsky requested a review from bitsandfoxes July 10, 2024 13:07
@tustanivsky tustanivsky merged commit 0412e56 into main Jul 16, 2024
17 checks passed
@tustanivsky tustanivsky deleted the fix/assert-del-threading branch July 16, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants