You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have written a C++ addon and compile it into *.node file, somtimes it crashes, so i want to catch the exception, what i do now is tring to write dump file with windows API in my C++ file, but when i run my program, the exception-catch callback function never be triggered. What confuses me is that when i use the same code to catch exception and write dump file in *.dll file, it works well, what should i do if i want to write dump file correctly when my C++ addon crashes? Thanks!
What I understand from your explanation is: when you tested your code (that is shown in the linked issues) in a stand alone program it works (able to catch signals and produce valid minidumps), but does not work when built as a node.js addon.
---Original---
From: "Gireesh Punathil"<notifications@github.com>
Date: Mon, Dec 23, 2019 22:03 PM
To: "nodejs/help"<help@noreply.github.com>;
Cc: "Mention"<mention@noreply.github.com>;"Andy"<502742203@qq.com>;
Subject: Re: [nodejs/help] nodejs C++ addon exception catch (#2169)
@AndyWangGo - is this still an issue?
What I understand from your explanation is: when you tested your code (that is shown in the linked issues) in a stand alone program it works (able to catch signals and produce valid minidumps), but does not work when built as a node.js addon.
Is my understanding right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
I think it has to do with this setting in libuv, which tells windows to not take the normal route for structured exception handling. cc @nodejs/libuv for an expert opinion.
@AndyWangGo - alternatively, if you are / can build node from source, can you comment out the line mentioned above and see what happens?
Thanks for your kind reply. I see what you mean in the last reply, but i do not build libuv to use it, so i can not modify the libuv source code. Is there any other way to change the setting in libuv such as calling API?
Activity
gireeshpunathil commentedon Dec 23, 2019
@AndyWangGo - is this still an issue?
What I understand from your explanation is: when you tested your code (that is shown in the linked issues) in a stand alone program it works (able to catch signals and produce valid minidumps), but does not work when built as a node.js addon.
Is my understanding right?
wanghui-andy commentedon Dec 31, 2019
gireeshpunathil commentedon Dec 31, 2019
https://github.com/libuv/libuv/blob/2c279504f92a7ab1fc54c85ec36272722198a77e/src/win/core.c#L178-L179
I think it has to do with this setting in
libuv, which tells windows to not take the normal route for structured exception handling. cc @nodejs/libuv for an expert opinion.gireeshpunathil commentedon Jan 2, 2020
@AndyWangGo - alternatively, if you are / can build node from source, can you comment out the line mentioned above and see what happens?
wanghui-andy commentedon Jan 2, 2020
Thanks for your kind reply. I see what you mean in the last reply, but i do not build libuv to use it, so i can not modify the libuv source code. Is there any other way to change the setting in libuv such as calling API?
gireeshpunathil commentedon Jan 2, 2020
@AndyWangGo - I don't think so (i.e, an API call to suppress this setting).
Can you do:
in your addon's entry point function (the module registration entry point) and see what happens?
wanghui-andy commentedon Jan 2, 2020
ok, i'll try and see what will happen.
PoojaDurgad commentedon Sep 25, 2020
@AndyWangGo - is this still outstanding?
PoojaDurgad commentedon Oct 26, 2020
inactive. closing!!