-
Notifications
You must be signed in to change notification settings - Fork 640
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
StackOverFlowException thrown and process terminated #253
Comments
I wan to know what the thread model like when Edgejs calling .net codes at run time. when edge call a function, it will create one instance of that .net type and call the method of that instance? and is this call working on a separated thread? then if concurrent calls happens, will multiple managed threads working in .NET CLR? |
nobody else met this kind of issue? why no any response or I posted in wrong place? |
I am having a similar issue when using edge-sql. I've been able to debug inside of the edge-sql C# code, and the StackOverflowException is happening from inside the edge compiled code (nativeclr or native_clr namespace, but that's all I can figure out). It's easy to trigger with edge-sql. Simply try to run an SQL command with a connection string that fails authentication. |
I rewrote my SQL access to be via a DLL, and still have the StackOverflowException happening when I attempt "Connection.Open" using invalid authentication details. So my issue is not something introduced by edge-sql. I hope this makes it easy for the developers to identify and resolve the problem! |
I have the the same issue when trying to setup a basic example of pulling in a dll.
Here is the reference code
Compiled Code:
Project.json:
|
Just for others who is running into similar problems, to address the issues of "terminated with stack overflow": just add an environment variable you'll see the full trace and debug information on initializing edge and invoking your assembly. |
I have created PR to fix it #566, but it never got merged. |
As per my previous comment, #566 addresses StackOverflow issue but was not merged to the repo. Use |
For a pointer for others in my case I had a cyclical object reference in my object and this caused issues marshalling across the boundaries. I removed my property and everything worked as expected. |
I'm not sure this is the issue from Edgejs, I just hope anyone meet the same issue with this, and give some suggestions how to figure out the reason. anyway, 'process is terminated due to StackOverflowException' should be happened from .net runtime, right?
![image](https://cloud.githubusercontent.com/assets/3276369/6654669/ffea43f4-cb0d-11e4-8010-35a10c37717b.png)
My Nodejs codes are tcp server, whenever data received, it will call the .net code and the .net code is just responsible for storing data in sql server.
Nodejs code which define the edge function as below:
below is the .net code for the updateStation function:
ConnectString is read from config file of the Dll, like below:
I just use Entity Framework to access sql server, not more complex codes there. I'm confused that I looked through my codes, didn't find any recursion calling.
And the point is StachOverflowException happens after the program running for a while, not always occurred at the same place or same time, it 's so strange to me, looks like it is random, but exception always happen after a while, it is about no more than 1 minute.
The text was updated successfully, but these errors were encountered: