Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
440 stars 49 forks source link

Fix crash during finalization. #24

Closed dustinsoftware closed 7 years ago

dustinsoftware commented 7 years ago

.NET does not guarantee the order which objects will be finalized. A crash would occur if ScriptDispatcher has already been finalized.

This crash can be repo'd under IIS Express by trying to quit gracefully from the console.

Taritsyn commented 7 years ago

Hello, Dustin!

_disposedFlag.Set() already prevents such errors.

Do you really have this error? Give an example of full error message.

Taritsyn commented 7 years ago

I was able to reproduce this error for the JavaScriptEngineSwitcher.ChakraCore and JavaScriptEngineSwitcher.Msie modules. Your PR fixes this error, but causes another error (during finalization unmanaged resources are not released).

Thanks for the information! I will look for another way to fix this error.

Taritsyn commented 7 years ago

In JavaScript Engine Switcher 2.3.2 fixed this error.

dustinsoftware commented 7 years ago

🎉 On Sun, Feb 12, 2017 at 08:01 Andrey Taritsyn notifications@github.com wrote:

In JavaScript Engine Switcher 2.3.2 https://github.com/Taritsyn/JavaScriptEngineSwitcher/releases/tag/v2.3.2 fixed this error.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Taritsyn/JavaScriptEngineSwitcher/pull/24#issuecomment-279227913, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5hFo8k80vP96fZG8a7MYZ8Q-JP9Uhnks5rbyzWgaJpZM4L-Rtj .