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 was unable to identify exact culprit in the NppShell code, partly due to the current nature of Microsoft's way of dealing with such crashes (instead of a direct crash where the app callstack leading to a crash is preserved, they decided to invoke their CRT func handlers like abort(), which then make it impossible to reveal the callstack from the dump, thus making the dumps useless).
Anyway, I reviewed the NppShell code and found several issues, some of which are fundamental and need a major revision of the code design.
Most importantly, the code uses throwing (of unhandled exceptions) when detecting a problem - this is unacceptable in a shell extension because of it then leads to the entire Explorer shell crashing!
Furthermore, the code does not assume at all that an unexpected situation could occur when handling inputs (e.g. reading from the Registry, i.e. invalid or corrupted key data), while using WINAPIs or CRT funcs, which will generate an exception itself in such a situation...
I will try to do some PRs to fix this and hopefully that will solve these crash issues reported.
The text was updated successfully, but these errors were encountered:
Some reports of the Explorer shell crashes caused by this extension:
https://community.notepad-plus-plus.org/topic/26565/notepad-v8-7-1-32-bit-nppshell-dll-is-intermittently-crashing-windows-explorer
notepad-plus-plus/notepad-plus-plus#15683
notepad-plus-plus/notepad-plus-plus#15788
notepad-plus-plus/notepad-plus-plus#12448
I was unable to identify exact culprit in the NppShell code, partly due to the current nature of Microsoft's way of dealing with such crashes (instead of a direct crash where the app callstack leading to a crash is preserved, they decided to invoke their CRT func handlers like abort(), which then make it impossible to reveal the callstack from the dump, thus making the dumps useless).
Anyway, I reviewed the NppShell code and found several issues, some of which are fundamental and need a major revision of the code design.
Most importantly, the code uses throwing (of unhandled exceptions) when detecting a problem - this is unacceptable in a shell extension because of it then leads to the entire Explorer shell crashing!
Furthermore, the code does not assume at all that an unexpected situation could occur when handling inputs (e.g. reading from the Registry, i.e. invalid or corrupted key data), while using WINAPIs or CRT funcs, which will generate an exception itself in such a situation...
I will try to do some PRs to fix this and hopefully that will solve these crash issues reported.
The text was updated successfully, but these errors were encountered: