Taritsyn/MsieJavaScriptEngine

crash in windows 8 / VS 2015

d-kirsanov opened this issue · 9 comments

I have an asp.net site that uses JavaScriptEngineSwitcher.MSIE and MsieJavaScriptEngine. Versions 2.0.0 worked fine but after upgrade to JavaScriptEngineSwitcher.MSIE 2.4.11 and MsieJavaScriptEngine 2.2.5, it crashes IIS express on starting the site. VS 2015 reports:

System.AccessViolationException was unhandled
Message: An unhandled exception of type 'System.AccessViolationException' occurred in MsieJavaScriptEngine.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I also tried 3.0.0 beta 3, same error. In Windows 10 it seems to work. I realize it's not much info to debug this - if I can do something to get more info, let me know.

Hello, Dmitry!

In Windows 10 it seems to work.

I think, that if you switch to the ChakraIeJsRt mode, you will get the same error as in Windows 8.

I realize it's not much info to debug this - if I can do something to get more info, let me know.

I need a full error message with stack trace.

Andrey,

Can you please point me to how I can switch it to the ChakraIeJsRt mode? And how can I get stack trace - VS does not show anything for this exception except [External Code]. Will I need a build of the library with debug info?

Sorry I'm new to this.

Can you please point me to how I can switch it to the ChakraIeJsRt mode?

See the “Registration of JS engines” and “JS Engine Switcher: MSIE” sections of documentation.

And how can I get stack trace - VS does not show anything for this exception except [External Code].

Just copy the full text of error message.

Will I need a build of the library with debug info?

No.

Here's what I found:

ChakraIeJsRt on Win 10: still works, no crash

ChakraActiveScript or Auto on Win 8: crash, anything below that (Classic) doesn't work (can't find entry points or something), anything above (ChakraIeJsRt, ChakraEdgeJsRt) doesn't work (can't load DLL).

This is Win 8, not 8.1, so MSIE is version 10, not 11 and cannot be upgraded without upgrading windows which I can't do at the time.

Stack trace: can't see how I can get it, copying just gives what I quoted above:

System.AccessViolationException was unhandled
Message: An unhandled exception of type 'System.AccessViolationException' occurred in MsieJavaScriptEngine.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

See screenshot:

crash

Sorry for the trouble, I know it's no fun hunting down ancient microsoft stuff, but if you could maybe guess up a fix I would really appreciate that.

ChakraActiveScript or Auto on Win 8: crash, anything below that (Classic) doesn't work (can't find entry points or something), …

Check the C:\Windows\System32 directory on existence of the following assemblies: jscript.dll and jscript9.dll.

Directory of C:\Windows\System32

12/14/2015 08:00 PM 857,600 jscript.dll
12/14/2015 08:00 PM 3,805,696 jscript9.dll
2 File(s) 4,663,296 bytes

I tested the MSIE JavaScript Engine version 2.2.5 on Windows 8 x64 (Build 9200) by using the TestMsieModes console application. Everything is working correctly.

OK, I finally made it work in Classic mode, it was just a matter of some unsupported stuff in LESS processing, after simplifying it now works. Thanks!

OK, I finally made it work in Classic mode, …

It is strange, that the ChakraActiveScript mode does not work with Internet Explorer 10. It is possible, that your operating system has errors in the registry.

… it was just a matter of some unsupported stuff in LESS processing, after simplifying it now works. Thanks!

I do not recommend you to use the Classic mode to work with the BundleTransformer.Less, because it is slow and sooner or later can cause stack overflow.

Better install the JavaScriptEngineSwitcher.ChakraCore. You will not be able to debug scripts, but you will get a high-performance analog of the ChakraEdgeJsRt mode. Just do not forget to install the Visual C++ Redistributable for Visual Studio 2015.