Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.AccessViolationException occurs the first time after I rebuild and restart a debug session in visual studio 2015 #399

Closed
MonkeyJumps opened this issue Mar 10, 2016 · 11 comments

Comments

@MonkeyJumps
Copy link

It happens in my following Asp.Net MVC 5 Controller class.

private static Func<object, Task<object>> render = Edge.Func(@"
        var app=require('../../Scripts/DocumentQueue.js');
        var ReactDOMServer = require('react-dom/server');

        return function(documentList, callback){
        var list= app.getDocumentList(documentList);
        callback(null, ReactDOMServer.renderToString(list));
        }
    ");
        // GET: Queue
        [SessionExpireFilter]        
        public async Task<ActionResult> Index()
        {
.......             var queueDocuments = (from DB);
                    ViewBag.List = (string)await render(queueDocuments);
                    ViewBag.QueueDocuments = queueDocuments;                   
                    return View();
                }
@drgrieve
Copy link

drgrieve commented May 4, 2016

Ditto

@MonkeyJumps
Copy link
Author

Does this also happen to you in production or only when you are recompiling?

@Zache
Copy link

Zache commented May 6, 2016

I also have had this problem, and because of it haven't dared to deploy to production. But what did solve it for me was changing the user running the ApplicationPool from a local user to ApplicationPoolIdentity.

@MonkeyJumps
Copy link
Author

@Zache what did you use as an alternative to Edge?

@tjanczuk
Copy link
Owner

tjanczuk commented May 7, 2016

Note: this may be related to #383

@Zache
Copy link

Zache commented May 11, 2016

@MonkeyJumps nothing, we wanted it for server-side rendering of React but just had to manage without.

@MonkeyJumps
Copy link
Author

@Zache Have you looked at ReactJs.Net? I started with that but then moved to Edge, but now am at a fork whether to go back, proceed or like you remove Edge.

@MonkeyJumps
Copy link
Author

@tjanczuk what are the secondary effects of this error? How do you suggest I proceed?

This example of using Edge is pretty standard. I took it from the Edge site.

@onethread
Copy link

@MonkeyJumps I've been using reactjs.net for several months and am now looking at edge. Rjn is pretty stable but we've been getting performance issues with it (it adds about 100-150 ms per request if you turn off engine pooling, but with pooling it has memory management issues).

@zenglo
Copy link

zenglo commented Nov 14, 2017

I also encountered this problem, it encountered in the asp.net mvc, I indirectly through a console program calls the edge, to circumvent the AccessViolationException, I wrote a demo, if you want to know, can see EdgeJsDemo. Of course, the hope is that author can fundamentally solve the problem.

@agracio
Copy link
Collaborator

agracio commented Nov 14, 2017

The fix requires #573, I have merged it to my fork at https://github.com/agracio/edge-js, take a look at #586 for reference.

@agracio agracio closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants