-
-
Notifications
You must be signed in to change notification settings - Fork 52
Fix stack overflow when calling beforeSend during object post-loading on mobile
#782
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
Conversation
|
|
||
| return handler->HandleBeforeSend(EventToProcess, HintToProcess) ? event : nullptr; | ||
| USentryEvent* ProcessedEvent = EventToProcess; | ||
| if (!FUObjectThreadContext::Get().IsRoutingPostLoad) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we skip the whole method in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, I've updated beforeSend handlers across all platforms accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick but I'd probably invert the check, bail early and print some debug logs. So users have a way to follow why their beforeSend is not getting called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, the check is now inverted and prints a log message explaining why custom beforeSend handling was skipped.
bitsandfoxes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR applies the fix introduced in #589 to mobile platforms.