-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Stack overflow exception when using '()' chars with .net framwork 4.8 #136
Comments
Update -> even if I delete Poly sharp from the project, and not its just a .NET Framework 4.8 project, it still doesn't work. so it have nothing to do with Poly sharp. |
So just these 3 lines, a reference to NCalc, and it crashes? Or is it after adding a lot more code that you wrote for your app? Either way you should create a GH repository with the project as it is failing. Then at least there is a way for me to easily make it fail locally so I can debug it. Even better, once it's failing, remove some code (like you did with poly), if it still fails remove some more, until it doesn't fail anymore. At that point we know what is triggering the problem. If you had to add more code than just these 3 lines then you need to share the stack trace showing the cyclic code. This will help show where the stackoverflow is originating from. |
I don't know why, but this simple expression evaluates in .NET Framework almost 10x time slower than with .NET 6. My app is not crashing, but it can be due environment. |
@Bykiev I do have Mcfee but I turned it off and I still got stack overflow. |
@sebastienros These 3 lines are the only code that I have a part of the surrounding code of the AngularJS and .NET framework application. |
@Beckdotan I'll be waiting for your simple app on GH. I tried myself with a console app (since it should be the same) on 4.7.2 and it worked. @Bykiev The first evaluation seems outrageously slow, which is probably because of the time it takes to compile the parser on the first use. Then it's fast. |
@sebastienros @Bykiev Here is a very minimalistic app that is failing when entering the expression "(1+2)*3" |
I installed .net framework 4.8 (only had 4.7.2 before that), cloned and opened your solution, ran it, can't repro any issue. Also I don't see why you would not create a console app instead since it would be simpler to implement than a web one. Screen.Recording.2024-07-10.000904.mp4 |
Hi, @sebastienros I ran my code on different computer, and it failed. So I decided to download Ncalc and Parlot and debug, and run the Angular&.net app and now I have some more information. Here are 2 screenshots that shows where exactly in parlot I get the error and the call stack and the parameters avaliable at that point. Please let me know if I can help even more. |
@sebastienros Is there any more information do you want me to supply? Thanks again! |
My last comment was that the application you provided to repro the issue doesn't fail on my computer. I am still waiting for a repro case to debug it. In parallel, on this screen shot you shared Can you show (the text is fine) what is behind "Show Call Stack", it would be interesting what is the call stack if this is so "big" that it overflows. The goal being to identify an infinite recursive call. Showing what triggers it (Line 22) is not sufficient. |
Optionally if you have it failing in VS with all the source code, please Skype me (sebastienros) and I can spend some time guiding you on how to get more information and identifying the issue. |
Hi All,
In my project that is using Ncalc and parlot in a complicated way, I got some weird error (stack overflow) since Ncalc 4.0 where they started using parlot as their parser.
Since when I delete the .complie call from their repository it work, they suggested its problem in here.
So, to cancel all other attributes, I just created a new Angular and .NET framework 4.8 project, just like my main project is, and created API to run these commands only!
And I get the stack overflow, but when running it with: question = "1+2*3"; is doing just fine!
It seems like the combination of my framework + the '()' cars are causing problems, that are being solved when I delete the .compile command.
some addition information that might be useful:
Since framework 4.8 is only working with c#6, I have polysharp set to 'latest' c# version.
I'm using NCalc version 4.3.3
Maybe its the combination between old framework with the latest version of c# with polysharp?
Because just before the .compile there is this function:
When my code enters the else part, but since I am using Poly sharp my c# is in the newest version, so it might need to get into the if section?
@sebastienros
Is there any more information I can add to help?
The text was updated successfully, but these errors were encountered: