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

Add a callback after handling the crash #545

Closed
tamwei opened this issue Aug 22, 2024 · 6 comments
Closed

Add a callback after handling the crash #545

tamwei opened this issue Aug 22, 2024 · 6 comments

Comments

@tamwei
Copy link

tamwei commented Aug 22, 2024

Is it possible to add a callback here?

I tried kscrash_setReportWrittenCallback, but this callback is before ksmc_resumeEnvironment, so I want to ask if it is possible to provide a callback after ksmc_resumeEnvironment.

@GLinnik21
Copy link
Collaborator

Hi!
Interesting question. What are you trying to achieve with a callback after ksmc_resumeEnvironment? Are you facing any specific issues?

The current design ensures consistent process state for custom crash report additions. But I'm curious about your use case – maybe we can find a solution or consider an enhancement. Can you share more details?

@tamwei
Copy link
Author

tamwei commented Aug 23, 2024

@GLinnik21
Hi, thanks for getting back to me.

Since we are going to migrate from PLcrashReporter to KSCrash, and the callback of PLcrashReporter is called after thread_resume(https://github.com/microsoft/plcrashreporter/blob/master/Source/PLCrashReporter.m#L232-L237). So I'm thinking that if KSCrash can also provide such a callBack, then we don't need to adjust the codes in the callback too much.

@GLinnik21
Copy link
Collaborator

Thanks for providing that context. I'm curious – what specific functionality are you concerned might not work properly in the suspended environment with KSCrash? Are there particular operations or data you need to access that you think might be affected?

@tamwei
Copy link
Author

tamwei commented Aug 27, 2024

Because I want to call a specific thread in the callback, but this thread is suspended at this time.

By the way, I have added the callback in the local repository and tested it after integration, it works fine.

@GLinnik21
Copy link
Collaborator

By the way, I have added the callback in the local repository and tested it after integration, it works fine.

This is great that you have some work! Feel free to make a PR with what you need and then we can discuss further.

@GLinnik21
Copy link
Collaborator

Since there's been no activity for 3 weeks, I'm closing this issue. Feel free to open a PR if you'd like to contribute this enhancement.

@GLinnik21 GLinnik21 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants