'Stackoverflow for IIS website and not console app?

I have a "third party" dll that went from C com -> C++ com -> to C# .net assembly. "Yes. it was basically a copy paste to convert to c#". One project uses com (VB6). Another .net framework console App. Another is a framework API.

My problem is for the api, the new .dll is getting a Stackoverflow exception that I am able to track down (debug) inside of "thier" project. We all used the old version COM fine. but converting over to the new .net assembly causes problems for the api. The api project's Code didn't change just the params needed updated. We did upgrade from framework 4.6 to 4.7.2 because of the new assembly. So everyone converted the call the same way.

I can't debug the api without the error. It just has the one error for one piece of functionality that does this, everything else works fine. I tried deploying locally to IIS and testing to see if it was my runtime environment. My last try is waiting to push it to app services or VM to see if that resolves the stackoverflow error.

It seems like the version of framework 4.7.2/runtime/C#8.0 is causing the issue under IIS. So it doesn't happen when its a console app, don't know if i mentioned that. I'm actually questioning if any other project is using it as a .net assembly and not still com/interop/tlb. But asking that question to other developers is like sacrileg. The API project will be upgraded to .Core and pushed to app services in the future, just 'not yet'.

Is it true that 4.7.2 doesn't build for c#8.0? They expicility have languageversion set as 8 for thier project! "c-sharp-version-history"

Of course I get blamed for causing the stackoverflow and can't find much facts with versioning issues with stackoverflow bugs.

My unit test work for the api but running it as an api doesn't.

Here is a snippet where the stackoverflow error occurrs:

partial class CActuatorModelStandardBenchSet : CActuatorModelBase, IStandardBenchSetSizingDataAccess
    {
        static ActuatorStandardBenchSetEntry[] m_objActuatorStandardBenchSet6Entry = new ActuatorStandardBenchSetEntry[76]
        {
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2000, 8800, 55, 18372, SPR_1R6760, 860, 70, 150),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 4000, 8800, 55, 16279, SPR_1R6760, 860, 60, 220),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 3750, 8800, 55, 16221, SPR_1R6760, 860, 60, 210),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 3000, 8800, 55, 16047, SPR_1R6760, 860, 60, 180),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2750, 8800, 55, 15988, SPR_1R6760, 860, 60, 170),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2250, 8800, 55, 15872, SPR_1R6760, 860, 60, 150),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2000, 8800, 55, 15814, SPR_1R6760, 860, 60, 140),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2125, 8800, 55, 14564, SPR_1R6760, 860, 60, 140)
etc...

etc... this is one variable in this class that does this, there are 4 other variables that have larger elements up to 2000k.

Is this code just bad or do i need to run the correct runtime? I do think, yes that there maybe a circlular reference I just haven't found it in their code yet. We only hold one object from the assembly (dll) and just call procedures and its only created once.

my first time, asking a question!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source