Handmade Hero»Forums»Code
5 posts
Just starting out...running into issues
Hello everyone,

I just started the "Intro to C" video and am having issues with either Visual Studio or my Compiler. I had the simple example of the WinMain entry point calling a function that simply print to the debug output, but when I hit "start debugging" Visual Studio freezes and I have to force quit and re-open the project to resume work.

I have tried Visual Studio 2013 and 2015. I am running this on Windows 10. Any help would be greatly appreciated.
Mārtiņš Možeiko
2562 posts / 2 projects
Just starting out...running into issues
What do you mean by "Visual Studio freezes"? Can you access any menu in IDE? Or is all the GUI frozen and you cannot click anything?
5 posts
Just starting out...running into issues
The entire application (including GUI) is frozen. I cannot click anything, that is correct.
Mārtiņš Možeiko
2562 posts / 2 projects
Just starting out...running into issues
That's a strange issue.
Do you have multiple monitors? Maybe VS is showing you popup somewhere where you don't notice it?
Can you launch another Visual Studio instance and attach to first Visual Studio process and check call stack to see what it is doing?
5 posts
Just starting out...running into issues
I do not have multiple monitors, but I double checked and did not see any additional windows. I attached a separate instance of VS to the original process and received output that I pasted here: http://pastebin.com/r2rBmpU4

I have experience primarily in the Unix world, so it does not make much sense to me.
Mārtiņš Možeiko
2562 posts / 2 projects
Just starting out...running into issues
That's a debug output from debugger itself which doesn't help much.

You need to interrupt process ("Break All" debug menu item) and look at call stack. To get symbols for dll/exe files in call stack, press right mouse button on unknown items and select "Load symbols".
5 posts
Just starting out...running into issues
I attempted to attach to the process and "break all" but got the following call stack (nothing was shown): http://imgur.com/7qV8LsY

Not sure what I am doing wrong here. Appreciate all the help you have provided so far.
Mārtiņš Možeiko
2562 posts / 2 projects
Just starting out...running into issues
Well I think that means VS can not decide what to debug native or managed code...
Anyways, I'm not sure what to do. Most likely call stack wont help anyways, it will be some weird function nobody knows what it does.

Reinstallation most likely is for you a best option to try. But if that doesn't help, I don't know...
Timothy McCarthy
52 posts
Just starting out...running into issues
Start with the basics.

Create a generic Win32 project and let AppWizard generate all the files and settings. Build the project in Debug mode and verify that you can run it under the debugger. If that fails then the setup is probably befouled; you should then uninstall and reinstall Visual Studio.

If it works then the "broken" project is probably not configured correctly.

HTH

- tim
Mārtiņš Možeiko
2562 posts / 2 projects
Just starting out...running into issues
I seriously doubt you can configure project so incorrectly that whole VS GUI will freeze and become nonresponsive.
Timothy McCarthy
52 posts
Just starting out...running into issues
If a generated Win32 app works I wouldn't think "hello world" code would freeze the system either. I want to see if the system can debug a Win32 C/C++ app with generated project and code.
andrew
3 posts
Just starting out...running into issues
I had this same problem due to my virus protection (avast). Add an exclusion rule re: the folder in which your code is.

I have this problem every time I try to code pretty much anything on windows.
5 posts
Just starting out...running into issues
nonplussed
Add an exclusion rule re: the folder in which your code is.


This 100% did it for me. Thanks a ton. Now I can get to the hacking finally :)
Robert Toth
12 posts
Just starting out...running into issues
Oh for <insert curse here> sake! I've spent sooo much time troubleshooting this. It created 3 processes that only showed up with tasklist and I couldn't even kill them and the window never showed up and I couldn't attach the debugger to the process and I was soo confused. Added the exclusion rule, works perfectly.

Thanks! :D