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

"SetUnhandledExceptionFilter" is not working on win32 platform #155

Open
longhun12346 opened this issue Apr 24, 2024 · 3 comments
Open

"SetUnhandledExceptionFilter" is not working on win32 platform #155

longhun12346 opened this issue Apr 24, 2024 · 3 comments

Comments

@longhun12346
Copy link

longhun12346 commented Apr 24, 2024

@Koromix after i fix the seh issue on win32, i found another problem which SetUnhandledExceptionFilter is not working either. I guess it's because empty exceptionlist when swith to koffi's own stack. it's bypass the windows check exception chain but break the link to default exception chain. i also check the vector exception handle tec but it's not what i need here.i think to fix this problem here is to add a toplevel exception handler in the exception chain after swith to koffi's own stack as the windows do in default stack.I will research on that. do u have a better idea?

@Koromix
Copy link
Owner

Koromix commented Apr 26, 2024

Hi,

Mmmmh, I don't know. Is that a big problem?

How does SetUnhandledExceptionFilter() fail: does it work but the filter is never called (which is expected given that we truncate the handler chain). Or does SetUnhandledExceptionFilter() fail with an error code?

@longhun12346
Copy link
Author

longhun12346 commented Apr 26, 2024

SetUnhandledExceptionFilter can work. the problem is the filter is never called. my app use the UnhandledExceptionFilter to detect the native library runtime crash problem to report. it's a pretty normal solution on windows platform. it's not working now. I have wrote some code to add a toplevel seh frame when switch to koffi's own stack, as i tested it can make UnhandledExceptionFilter work. I'll push my changes in 2days.

@Koromix
Copy link
Owner

Koromix commented Apr 26, 2024

Okay then, nice :)

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

No branches or pull requests

2 participants