none
First-chance exception at in program.exe: 0xC00000FD: Stack overflow.

    Question

  • Hi Guys,
    as they say, there is a first time for everything. 

    I have some software that runs as C++ (not dot net as it runs on unix/lunix as well) and has been working fine for 12 years.

    I split it and created a new version of it for a client and that runs on Windows Server 2008 and SQL Server 2008 just fine for that customer.

    Now we are deploying it on windows server 2012R2 and SQL Server 2014 and I get the following message in VS 2010 when I try to start one of the programs. The biggest one which is a scheduler.

    Now yes, I do know what an exception and a stack overflow is. I have been writing code since 1982.

    What I am at a bit of a loss to understand is how I could possibly be getting a stack overflow when I have an 8GB test machine I am running on which is 2x the machine I usually develop on. I have been hunting around looking for ways of finding what might be the culprit and how to find it and fix it. Other programs that allocate pretty much the same space at startup are working on the new dev machine.

    And another version of the scheduler which is very similar starts ok.

    So I guess my real question is if I have a piece of code that works on other platforms and it suddenly gets a stack overflow on SQL Server 2012R2 with SQL Server 2014 when run inside VS 2010? 

    Where to start looking to solve this problem?

    Also....I have tried running it in both x64 and win32 outside VS2010 and in these cases is it getting an APPCRASH when it tries to connect to the ODBC driver. But another program that uses all the same classes that links to the database can unload tables ok.

    These are the messages the IDE is giving me....and, if course, the program does not start, it gets a stack overflow on the call to main.

    First-chance exception at 0x00007ff7bcceea97 in BIDAU008.exe: 0xC00000FD: Stack overflow.
    Unhandled exception at 0x00007ff7bcceea97 in BIDAU008.exe: 0xC00000FD: Stack overflow.
    The program '[10212] BIDAU008.exe: Native' has exited with code 0 (0x0).

    So, this just goes to prove even at my age and even after all these years us old programmers can be a bit stumped and ask if anyone has seen this before and knows how to fix it.

    Thanks in advance

    Peter 


    Peter Nolan

    Friday, May 27, 2016 3:00 PM

All replies

  • Hi Peter,

    So you mean that it is the same project, you use the same VS version, just changed the Windows system and the SQL Server version, am I right?

    No sample is hard for us to repro this issue, but my idea is that you could test it using one different condition,so we could narrow down this issue one by one, for example, using the different windows system, but use the same SQL Server version(SQL Server 2008).

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 30, 2016 11:34 AM
    Moderator
  • Jack you are right.
    Monday, May 30, 2016 11:46 AM
  • Hi Jack,
    I get the same error on 3 different dev machines, yes.

    The minus 1 version does not get the error on any of the machines.

    I am now guessing a piece of source code got damaged in the current version and I will have to hunt it down and find it or apply the changes again to the minus 1 version.

    As far as I am aware stack overflows can only be caused by asking for too much memory...and that has got to be a piece of damaged code as far as I can tell.

    I know its kind of hard without a solid example...but its 80KLOC all up and I think it is damaged code. I was wondering if anyone else had seen something like it. 

    Thanks for your reply. It is appreciated.

    Best Regards 

    Peter 



    Peter Nolan

    Tuesday, June 7, 2016 2:38 PM
  • Hi Peter,

    >>I am now guessing a piece of source code got damaged in the current version and I will have to hunt it down and find it or apply the changes again to the minus 1 version.

    >>As far as I am aware stack overflows can only be caused by asking for too much memory...and that has got to be a piece of damaged code as far as I can tell.

    >>but its 80KLOC all up and I think it is damaged code.

    Not very sure that whether it is related to the 80 KLOC unless you could comment out the specific line code, and then debug it again.

    Or you could use certain tool like the VS profiler to analyze the code performance, so we could know that whether certain function takes high memory or others.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 8, 2016 11:46 AM
    Moderator