Skip to content

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
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