none
Visual Studio freezes trying to execute c++ program

    Question

  • Hello,

    Since yesterday some of my newly created projects in Visual Studio 2013 in c++ will build without any errors but as soon as I execute them from Visual Studio,  MSVC freezes. If I try to execute them from the explorer my cursor shows the loading symbol but nothing will happen.

    Older projects(older than 2 days) will succesfully execute and run. The problem even happens with something as simple as a hello world example.

    I get no further Errors from Visual Studio or anything else, so I really dont know where to start to troubleshoot this(Im just about to reinstall MSVC). The problem also occurs on my Laptop thats also running MSVC 2013

    Things I tried:
    - As im normally using the "Empty Project" template I created a new project with "Console Application" which worked for the Hello world example but with other code the same as described above happened again.
    - I resetted all my settings with "Export/Import Settings"

    Tuesday, November 10, 2015 3:04 PM

Answers

All replies

  • Hi _sro5h,

    According to your description, is this problem happens with a specific C++ project (specific code)? Please try to delete the .suo file in solution folder which saves user settings for current solution.

    >>If I try to execute them from the explorer my cursor shows the loading symbol but nothing will happen.

    How do you execute them from the explorer? From the solution explorer and through right-click -> Debug?

    >>As im normally using the "Empty Project" template I created a new project with "Console Application" which worked for the Hello world example but with other code the same as described above happened again.

    It seems related to the other code you added after the Hello world example. Please try add the code line by line to make sure which line of code causes this problem. In addition, please check the Output window whether there any information for this problem.

    If possible, please provide a sample project to OneDrive and share the link here, which can help us reproduce your problem.

    Best Regards,
    Weiwei

    Wednesday, November 11, 2015 5:34 AM
    Moderator
  • No not really with specific code, thats the strange thing, I think you didnt understand me correctly :)

    It started with a specific Project(I was trying to implement a QuadTree), but now it happens with every new Solution/Project(Old ones work though)

    I mean if I launch the .exe from the Windows Explorer.

    So let me explain it: I had that Problem, then I thought why do I not make sure its not code related? So I created a new 'Empty Solution' and added some Hello Wolrd sample code to it. And the same thing happened(totally new & clean Solution with just the Hello Wolrd code). Then I thought why dont I try a different Solution template, so I made a new clean 'Console Application' and added the same Hello World code. And it worked... Then I made another new 'Console Application' and the error occurred again. (I just cant find a scenerio its always happening in so I cant be sure what exactly causes the problem :/)

    I thought it was related to my QuadTree code, because after I removed it from the first solution it worked Once. But after it happened again with just the sample code im leaning more towards it has sth todo with Windows or MSVC. (And I feel like it started happening after I opened an older Project from github that was targeted for MSVC 2012 or 2010 )

    Is DropBox ok too?

    Thanks for the answer, my biggest Problem is that im so confused and dont know where to start to solve the problem.

    PS: I couldnt find a .suo file 

    EDIT: Found the file, its hidden

    EDIT2: Deleting the suo file didnt help

    EDIT3: I managed to upload a project that causes the problem to onedrive(The simplest Code I could think of, just some Hello World stuff): http://1drv.ms/1OG4pDN

    I Also compared the not working Project to older, working Projects and couldnt make out a difference :/

    EDIT4: Did a reinstall of MSVC 2013, didnt help

    Should I maybe just switch to MSVC 2015?


    • Edited by _sro5h Thursday, November 12, 2015 3:17 PM
    Thursday, November 12, 2015 9:24 AM
  • SOLVED! - My AntiVirus (Avast) was causing this problem
    Thursday, November 12, 2015 5:07 PM
  • SOLVED! - My AntiVirus (Avast) was causing this problem

    I used to use Avast.

    It caused havoc with any project I ran outside Visual Studio.

    Luckily it told me it was having a problem with it and I could get Avast to ignore it.

    I had a word with Avast and they say any program occurring that is new and has had few users is automatically flagged as suspicious.

    Now before I send software off to customers I get my programs whitelisted with AVG and Norton etc etc


    n.Wright


    Saturday, November 14, 2015 10:02 PM