Visual Studio 2012 Update 3 Debug Problem...!

Hi,
I have a problem after installing CIS,
When i want to debug my projects (all) in Visual Studio 2012 U3, it show me this alert…


System.AccessViolationException was unhandled
HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=System.Windows.Forms
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, IntPtr lparam)
at System.Windows.Forms.Form.UpdateWindowIcon(Boolean redrawFrame)
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at Microsoft.VisualStudio.HostingProcess.HostProc.RunParkingWindowThread()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

http://i44.tinypic.com/11bhxe8.jpg

how can i fix that by confining CIS??
i used exceptions for antivirus and sandbox but not solved …
and even i disabled them and exit the comodo but again not thing happen…
thanks guys.

Welcome to the Forum netfa :slight_smile:

Please try here, No 2

https://forums.comodo.com/defense-sandbox-faq-cis/hips-faq-cis-6-t92886.0.html

Please Give me an easy method…
that article is complex and i dont understand anything…
after installing COMODO this happen… why!!!
i added many files in exceptions list but again i have this error even VS 2013!!!

Hi. I Have same or very simmilar problem.
When i try to debug my project in VS (2013/2015) if i have installed COMODO Internet Security Premium, i experienced problems.
Well, it happen only when i change Target CPU to x64, (when it x32, there is no problems)

For example, it just blank project, (vs or c#), without my custom code, just one blank win. form.
I change Target CPU to x64, and start project, and randomly (most time i think) i get this error

System.AccessViolationException was unhandled
Message: An unhandled exception of type 'System.AccessViolationException' occurred in System.Windows.Forms.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I’m tried to disable all COMODO modules (antivirus, firewall, hips, etc), one by one - gave nothing - still error.
I’m tried to add VS folder, project folder and ms folder from pf(86)/common files to exclusion of any modules (to antivirus, to firewall, to hips, etc) - gave nothing - still error.
I’m tried to uninstall COMODO at all, now error is gone.

Can you help me? (and i think many other people, who try code in VS)
I watched link above, Comodo Forum
but i think, my brain is tired, i mean, too many english language for one day (because it not my native language)
i was not able to understand what was a problem in that thread, and how they found solution
and also, they had some CODE, but my case there is no custom code at all (only code, which created by studio, and hidden from me by default)

I like this security complex, but this is just fatal flow. I want use VS for debuging my x64 projects, without such obstacles that I can not handle myself.

ps
I think COMODO isn’t block VS or my projects, if he did, then error would always. But error appear randomly. I think this is some bug, some interference/conflict.

[attachment deleted by admin]

Try giving the VS debugger the Installer/Updater policy in HIPS rules. In case you are using the Internet Security configuration you first need to activate the HIPS under HIPS Settings.

Hi EricJH, thx for answer.
Yes, i’m using Internet Security config., and yes HIPS is activated.

I’m tried add ruleset install/update for all .exe from visual studio, that i found in task manager

from visual studio folder
like devenv.exe

from common files/microsoft shader
like
Microsoft.VsHub.Server.HttpHost.exe
Microsoft.VsHub.Server.HttpHostx64.exe

i dont know what is it, but it started when studio is started

and from
C:\Program Files (x86)\MSBuild
like
MSBuild.exe and MSBuild.exe from amd64 folder

i think this is responsible for compiling project.

also i found .exe from “remote debug” folder. and added ruleset for it as well.

And added for other .exe from VS

And this is not helped, error is still randomly occurring when i am trying to start my project

In addition to that, i tried to add entire folders (of studio and others) and set rule as install/update - same result, still error.

Also i tried to change very bottom rule - all aplications - and set install/update ruleset for it, after that i move this role to top of all rules.
Then i checked compiling, - still random errors, like before.

And i tried to switch off all modules as well (like i said before) - this is also not helped.

In my humble opinion, there is no connections with rules, because error appears randomly, only when i “start” project as x64 application.
But i don’t know, how, even switched off, comodo interfere in debugging/compilation process of visual studio.

Can you post a screenshot of the D+ logs of around the time you are starting the debugger? I want to see if blocked memory access is playing a role; I noticed that VS reports " Additional information: Attempted to read or write protected memory." in the error message.

Ok, i attached log (this is right log? or should be another one?)

and here is, i recorded video with this error.

[attachment deleted by admin]

The logs show no activity of VS or ur form1.vb or trying to access memory.

Could you try adding the VS installation folder to the Exclusions of Detect Shellcode Injections and see if that makes a difference?

I tried to add all sorts of VS folders, and it isn’t work.
But then, i tried to add to exclusion entire disc C:, after that errors gone!
It remains only to find out which folder I should exclude.
Then i figured out. I removed disc C:\ from exclusions, and tried to add project folder (folder with compiled exe’s, and other stuff) - and this is works! No more errors!
Thanks you for help EricJH !!!

Last VS I used was 2010, so correct me if I’m wrong but don’t your projects by default end up under Documents/Visual Studio/My Projects/* and run from the /Debug sub folder? You should just need to exclude that Projects folder.

That’s what I did.
Exclude from documents, and my custom project folder.

Congratulations with finding the solution. This will surely help others in the future.