Author Topic: Behavior Shield causes Visual C++ 2010 compiler to hang  (Read 6815 times)

0 Members and 1 Guest are viewing this topic.

Dragaan

  • Guest
Behavior Shield causes Visual C++ 2010 compiler to hang
« on: September 26, 2011, 01:18:35 AM »
I installed Microsoft Visual C++ 2010 Express on my laptop recently so I could work on school projects.  Whenever I try and compile something, it just sits there "compiling" but never finishes.  When this happens, I open Process Explorer (sysinternals) and notice that multiple versions of "MSBuild.exe" keep opening as well.  FINALLY, after an ungodly amount of trial and error, I narrowed it down to Avast 6's Behavior Shield.  The rest of the program/shields can be running and everything seems to work fine (at least when compiling super-simple programs), but if the Behavior shield is running I cannot build/compile any projects.  I tried adding VCExpress.exe, MSBuild.exe, and every other executable I see running while VC++ compiles to the "Trusted Files" under Behavior shield options, but that doesn't work.  I also tried unchecking each of the 3 options individually, but that doesn't work either.  The shield HAS to be completely disabled for VC++ 2010 to build a project.  Is there a fix for this?  Do I need to find a new anti-virus after 13 years?

Any help would be greatly appreciated.  Thank you.

Offline Cast

  • Sr. Member
  • ****
  • Posts: 302
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #1 on: September 26, 2011, 05:42:33 AM »
I dont use C++, but it do use visual basic. Have you tried setting the shield to ask instead of auto decide, that way you get a warning instead of nothing happening?

Dragaan

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #2 on: September 27, 2011, 06:35:12 PM »
Yes, I have.  Doesn't help.  I've exhausted myself trying every little tweak to the settings (even going so far as to reboot after each change), and nothing works except disabling that shield.  It seems like a simple solution - just disable the shield when I want to compile something.  Over time tho, that's just not something I'm willing to put up with.  Oh well.  :/

Dragaan

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #3 on: September 27, 2011, 06:38:52 PM »
You said you use Visual Basic.  Is it Visual Basic.NET 2010?

Dragaan

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #4 on: September 27, 2011, 07:47:13 PM »
Ok, I have some new information.  I just installed a new IDE to try out, called "Geany".  First test compilation (tiny "hello, world" app) worked fine, but when I tried to execute the test program (from within Geany), it stalled my comp so bad that I needed to hit the power button to shut down.  This rarely (if ever...) happens.  Usually Process Explorer or the windows equivalent can kill a problematic application.  I did, however, notice something in Process Explorer before it totally froze.  AvastSvc.exe had opened a new program beneath it (in it's tree) called "Sf.bin", although it showed up as using none of the cpu.  In fact, this time nothing was showing any load on the cpu (under visual c++ it was a constant 100% when stalled), as if Avast was just in a wait state.  I rebooted and tried disabling the behavior shield, thinking this would solve the issue again, but it did not.  With this new program, the only way I can execute a program I compiled is by completely shutting down Avast.  I'm sure it has something to do with "sf.bin".

One thing to note - this computer I'm using to do my programming work is NOT hooked up to the internet (or any network) right now.  It was not yesterday (when I made the first post) either.  Later today, I'll try everything out again after connecting to the internet, although I'm not sure WHY that would have anything to do with this problem.  Avast shouldn't need a computer to be hooked up to the net in order to allow it to function properly.  Anyway, I'll update again later with any news.


EDIT:  If anyone out there has any info to share about problems related to ANY development software conflicting with Avast, I'd like to hear how you fixed it.  I'm pretty sure it's not some bug that only occurs with these few IDEs.  Obviously, it's just that Avast (and maybe most other AVs as well) are finicky when it comes to batch files, fresh console applications, and dev software in general (although Comodo seems to work just fine after editing my security policies, as annoying as that is to do).
« Last Edit: September 27, 2011, 08:01:56 PM by Dragaan »

ady4um

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #5 on: September 27, 2011, 10:05:11 PM »
Please try:

Avast main GUI -> web shield -> EXPERT settings -> "...well known browsers only".

Then stop behaviour shield.

If this is not enough to improve it, do the following:

First, go to "Add/Remove programs" -> Avast -> change avast installation so to EXCLUDE behaviour shield". After the re-installation finishes, reboot.

Then go to Avast -> settings -> troubleshooting -> "load Avast service only after other system services" Save and reboot.

Test and please report back.

ArtemisF0wl

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #6 on: September 28, 2011, 03:03:08 PM »
strange problem.  ??? i use visual c++ 2010 professional and i have no such problem compiling or running programs. i dont use any exclusions either, it seems unlikely that a program as small as a "hello world" would be enough to stall the whole machine.
i didnt see any mention in your original post about whether you have a 3rd party firewall or hips application installed that may be contributing to the problem. its worth asking though for sure.

have you run a full scan on the machine so that the persistent cache is populated?

ill do some testing and see if i can reproduce this , but like i said i havent seen any problems whatsoever

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11849
    • AVAST Software
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #7 on: September 28, 2011, 08:44:40 PM »
Dragaan, would you be able/willing to create a full memory dump of the machine - taken at the moment the compilation process got frozen - and upload it to our FTP? It might tell us what's going on there...

The description on how to do that is here (PS/2 keyboard needed; USB keyboard can be used on Vista and higher, but the registry key is different).

gg-tf

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #8 on: February 26, 2012, 10:14:43 PM »
I am experiencing exactly the same problem with visual C++ 2010, be it Express or Professional edition.
This problem is by the way explained here:
 http://connect.microsoft.com/VisualStudio/feedback/details/535129/error-msb4014-when-building-any-visual-c-project
It is still an open issue at Microsoft.
Disabling the Behavior Shield immediately resumes the hung build and I too found no more exclude or other more specific way to work out this problem.
My PC is running a fresh install of Windows 7 x86 with 3GB. I have only Avast running (was version 6.0.1047 and now 7.0.1407, same behaviour in both cases) no other firewall, spyware buster, etc.
I will try to upload a memory dump for you.
Hope this helps.

Note: I didn't get what ArtemisF0wl meant by "have you run a full scan on the machine so that the persistent cache is populated?". I did a full disk scan right after having formatted my hard disk, installed Windows, and Avast. But I don't think this could be connected to this issue. Or, explain me about this 'persistent cache' thing... Thanks.

Memory dump uploaded as "Behavior-Shield-causes-VisualCpp-2010-compiler-to-hang.memory.gg-tf--DMP.zip" (79,393,512 bytes expanding to 301,350,245 bytes)
« Last Edit: February 26, 2012, 11:08:53 PM by gg-tf »

MarkS

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #9 on: March 10, 2012, 06:54:36 AM »
I can also confirm this.

I am running VS Express on XP 32-bit. This is a fresh install of XP, VS and Avast as I have recently changed out the hard drive. It is the first time I installed VS on this computer.

The only solution is to disable the Behavior Shield. Nothing else seems to work.

akama1

  • Guest
Re: Behavior Shield causes Visual C++ 2010 compiler to hang
« Reply #10 on: March 10, 2012, 12:33:57 PM »
try putting the C++ 2012 into the trusted processes list in the behaviour shield