I've noticed that MZ/MV/NWJS does not catch access violation errors

If the program throws an access violation error mz shuts down with no errors, try{}catch{} does not catch these errors and you can only see them if you have the console open with the debug SDK. On live builds the player will only ever see the program shut down with no errors.
One way to generate access violation is for the gc to clean up a promise before it is processed, I've also noticed that the steam api also sometimes generates and throws these errors.

Is there anything that can be done to prevent these errors from silently closing rpg maker apps with no feedback to the user/dev. It's especially difficult to find/debug or fix these errors since we can never see a stack trace.
Well, it's an interesting find but I wonder how often this type of error occurs. From all of my time game making, and all of the many RM games I have played, I don't think I ever once experienced a spontaneous crash like you describe.
The lack of information is debug information itself, as I am sure there are only a limited number of crashes that can occur that don't generate an error message.
Most access violations are not internal errors, but external interactions - like the game being placed into a restricted folder or an interaction with a protection program.
There are very few development errors that could result in an access violation.

Additionally redirecting those would interfere with said protection programs, which is a high price for minor information - I don't know about you, but I would be very put off if something messes with my antivirus program's ability to scan HTML pages.

Don't forget: MV and MZ create HTML5-based games, and that already creates a problem for an heuristic antivirus search against HTML-websites that might be infected because there are too many similarities.
Even the "independent" exe of MV/MZ games is nothing but a chromium based browser internally...
Most access violations are not internal errors, but external interactions - like the game being placed into a restricted folder or an interaction with a protection program.
There are very few development errors that could result in an access violation.

Additionally redirecting those would interfere with said protection programs, which is a high price for minor information - I don't know about you, but I would be very put off if something messes with my antivirus program's ability to scan HTML pages.

Don't forget: MV and MZ create HTML5-based games, and that already creates a problem for an heuristic antivirus search against HTML-websites that might be infected because there are too many similarities.
Even the "independent" exe of MV/MZ games is nothing but a chromium based browser internally...
That's not true. I can get it to easily throw these errors internally with steam api. Stepping into this function will throw an access violation:
1697036107780.png

1697036166386.png

From what I can tell the callback is being GC before it can access it, but I cannot debug because I cannot catch the error.
That's not true.
you yourself just gave proof to my point, because the steam interaction IS an external interaction.
As I said you cannot get an access violation without an external interaction...
you yourself just gave proof to my point, because the steam interaction IS an external interaction.
As I said you cannot get an access violation without an external interaction...
Ok so if the steam API has an error, were just suppost to accept that our program will crash? There has to be a better way to handle this situation.
No, the Steam API does not have an error - the API caused an access violation.

That is something entirely different, because it means that the API access to Steam's servers was forbidden, most likely due to the wrong identification or failed passwords or something like that.
No, the Steam API does not have an error - the API caused an access violation.

That is something entirely different, because it means that the API access to Steam's servers was forbidden, most likely due to the wrong identification or failed passwords or something like that.
Well the steam API works 99% of the time, but players have said that sometimes when it goes to unlock an Achievement it just shuts down the client instead. So again I ask how to handle it? I don't know why a small % of the time it doesn't work, I just want to handle the case where it fails.

Original thread: https://forums.rpgmakerweb.com/threads/ive-noticed-that-mz-mv-nwjs-does-not-catch-access-violation-errors.161898/