Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

$
0
0
Hi,

Thank you for reply. I implemented engine pool as as you suggested using ClearScript.Manager and exception is still happens and application gets crashed. this happens when script file list grows to 100-300 scripts. it executes success fully when we have few scripts files to execute. My script contains winform object,threads task and many other 3rd party component objects. Is it better to use multi process architecture for this kind of problems. so that only child process appdomain gets killed.
public async Task PlayProject(string projectData) 
{
       var engineInstance= new V8ScriptEngine();

       jsScript = File.ReadAllText(projectData);   
   
      Task.Factory.StartNew(() => {

                //__Start new child process from here__

                 var compiledScript = engineInstance.Compile(jsScript);
                engineInstance.Execute(compiledScript);     
       });    
}
Thanks
Praveen

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>