I don't know how to search this error. I'm new to Visual Studio and as I'm trying the "Hello World" example on Visual Basic, I cannot seems to see the form running. The error is this:
'WindowsApp1.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[3492] WindowsApp1.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.
Then I tried to create new project without any code just a form and when I start, the error still occurred.
I'm sorry if there's already a post about this. Just don't know what to search about this.
I managed to find the solution for this if anyone encounter this problem. What I did was change the "Any CPU" to x64(in my case) and it seems my problems have been solved.
Related
I was launching and stopping debug in visual studio really quick as I was testing something in a DLL entry point and at some point I clicked by error on "cancel" in the loading symbols window. Since then, when I launch debug, I keep having an access violation because of a "ntdll.pdb" missing.
I tried to load the symbols from Microsoft servers, but it takes ages. I would simply like to return everything back to normal, as it was before my miss-click.
I am having trouble simply getting VS2017 to run my program in debug mode. The program is a Windows Form Application. I was using it this morning to try to debug the code and it was working fine, except for the bug i was trying to track down, where the code exited without much warning. I was able to step through until the program exited.
The next time i tried to run the code in debug, the screen froze. When it finally recovered, i had this error:
'TRAP.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
The program '[10804] TRAP.exe' has exited with code -1073741818 (0xc0000006) 'In page error'.
It will work fine without debugging and other similar programs work fine with and without debugging.
I have tried:
Restarting the computer so there is nothing unexpected running in the background.
Re-installing VS2017 community Ed
Selecting "Microsoft Symbol Servers" from Tools->Options->Debugging->Symbols
This resulted in this message box that seemed to freeze as well. I never saw any progress made on the progress bar. I cancelled it after about 20 min.
Setting <Optimize>false</Optimize> in the project file as suggested by Liam
Restarting the computer and trying again.
I was able to debug when i created another local repo on my home computer, so i tried re-cloning the repo at work and it has resolved the issue.
I did get an "Alert warning" message box:
Revocation information for the security certificate for this site is not available. Do you want to proceed?
After accepting the warning and proceeding, the application seemed to load the necessary PDB files and is working fine now.
My find and replace has stopped working.
Background:
I have a paid version Visual Studio 2010 installed. I also was running a trial version of Ultimate. However, the trial expired so I un-installed Ultimate. After the un-install of Ultimate, I can no longer do a global search in VS Professional.
Anyone have any ideas? Where should Microsoft.VisualStudio.Progression.GraphModel reside and why is it causing my search to fail? I tried running a repair on VS Professional without luck.
Error Message:
In the find results, I get the following:
Find all "test", Subfolders, Find Results 1, "Current Project"
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) Could not load file or assembly 'Microsoft.VisualStudio.Progression.GraphModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Resulting in: An exception occurred while trying to create an instance of type 'Microsoft.VisualStudio.Fragments.LanguageContext'.
Resulting in: Cannot activate part 'Microsoft.VisualStudio.Fragments.LanguageContext'.
Element: Microsoft.VisualStudio.Fragments.LanguageContext --> Microsoft.VisualStudio.Fragments.LanguageContext
Resulting in: Cannot get export 'Microsoft.VisualStudio.Fragments.LanguageContext (ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext")' from part 'Microsoft.VisualStudio.Fragments.LanguageContext'.
Element: Microsoft.VisualStudio.Fragments.LanguageContext (ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext") --> Microsoft.VisualStudio.Fragments.LanguageContext
Resulting in: Cannot set import 'Microsoft.VisualStudio.Fragments.EventsManager..ctor (Parameter="languageContext", ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext")' on part 'Microsoft.VisualStudio.Fragments.EventsManager'.
Element: Microsoft.VisualStudio.Fragments.EventsManager..ctor (Parameter="languageContext", ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext") --> Microsoft.VisualStudio.Fragments.EventsManager
Resulting in: Cannot get export 'Microsoft.VisualStudio.Fragments.EventsManager (ContractName="Microsoft.VisualStudio.Fragments.IEventsManager")' from part 'Microsoft.VisualStudio.Fragments.EventsManager'.
Element: Microsoft.VisualStudio.Fragments.EventsManager (ContractName="Microsoft.VisualStudio.Fragments.IEventsManager") --> Microsoft.VisualStudio.Fragments.EventsManager
Found out what was wrong. The reason I switched to Ultimate to begin with was to use this plugin called Code Bubbles (which required Ultimate). When I switched back to Professional after my trial expired, the plugin got into a strange state that was causing other parts of Visual Studio to fail. Once I fully uninstalled the plugin, search returned to normal.
Strange. Have you tried using ctrl + break? As suggested here:
Search stops working for "Entire Solution"
... you should click inside the Find Results window, not the Output window. Once the
blinking text cursor is visible, hit ctrl-break four or five times. That should do the
trick.
- DJ Couchy Couch
UPDATE: navigating to the process via menu:DEBUG / Attach Process / iexplore.exe shows "Automatic: Silverlight code". i.e. VS 2010 already attached to the process. Why doesn't it go to debug view?
I have a frustrating debug behaviour going on on my laptop which I'd like to fix. I was following along with the demo called Silverlight TV 46: What's Wrong with my WCF Service?
On my computer, I noticed that putting throw new ArithmeticException() in the RIA service causes the just-in-time debugger to get involved (a bad thing -- I want VS). I can put a break point on the the throw new ArithmeticExpression() line, and VS stops as it normally does. Press F10, and I still get the just-in-time debugger kicking in.
On Yvor's computer (the presenter in the Ch 8 link above), the visual studio debugger kicks in instead of the just-in-time one. What am I doing wrong? Could having Redgate Reflector installed previously have caused this (it is gone now).
ERROR:
Visual Studio Just-In-Time Debugger
Code: 4004
Category: ManagedRuntimeError
Message: System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.
Check ...
Possible Debuggers:
New instance of MS VS 2010,
New instance of VS 2008.
[checked] Set currently selected debugger as the default.
[unchecked] Manually choose the debugging engines
Action: Hit Yes.
2nd ERROR:
Unable to attach to the crashing process. A debugger is already attached.
I've spent several hours looking for a way to solve this.
Browser is IE9 / Silverlight 4.
Previously, I started starting the silverlight app directly via the VS2010 environment... but then decided to get more deployment compliant (again).
http://msdn.microsoft.com/en-us/library/cc838267(VS.95).aspx
Down the bottom they mention repairing from control panel / VS2010. Did that. Waited for ages, made coffee, did something else. Finally complete. Problem sill there. Included this step just-in-case the fix is cumulative (you get superstitious after a while with these things).
I then deleted zap files, switched startup page from html to the aspx one. Wired aspx to the xap (it wasn't pointing to the /debug/ folder). [note: looks like you can remove the debug via Silverlight Project / build / Output path: Replace Bin\Debug\ with Bin. With Silverlight I feel that the relative Uri path should match up to your html / aspx files no matter what -- wheather you are in Debug or Release.
project properties / Web / Specific Page
debugging works again!
Did .html stop debugging? Casual inspection reveals the same javascript stuff firing up Silverlight. On the surface it looks the same. hmmm. I guess it isn't.
... here are a few extra things to look at for those who still have issues (I may as well list them
while they are fresh in my mind).
project / properties / Web / Debuggers: I now only have Silverlight checked. ASP.Net is not checked any more. (Not sure if this influences my result at this stage)
make sure your web project points to the silverlight project in project / properties / Silverlight Applications. This ensures that the silverlight project's binary "xap" is copied to a folder within the Web Site / Web App. Note: hitting the add button reveals a destination folder (should be ClientBin).
Your build configuration will add an additional sub foler e.g. debug.
Make sure your .aspx or .html files have the right path. For me, I just included the .ClientBin/debug/ folder. I don't think this is deploy friendly, so I will search for a better way later.
IE9 settings.
[X] Disable script debugging.
[X] Disable script debugging (Other)
[ ] Display notification about a script error
[ ] Show friendly HTTP error message
Again, unsure if these later setting have an impact.
Lastly, there's something that I forget about sometimes. Be sure to check Debug VS2010 / Exceptions / Common language Runtime. This ups the ability to catch exceptions.
I had a similar problem, but the above did not resolve it. However, starting the application without debugging (Ctrl-F5) and triggering the exception would allow me to select the Visual Studio instance that I started the application from. Amazingly, I got a sensible stack trace and resolve the problem within a few minutes.
I've installed Visual Studio 15.9.0, Preview 3 and created a project using the new platform support for C++/winrt. The project runs fine until I set a breakpoint. When the break is hit VS tells me "You need to find debuggerutils.h to view the source for the current call stack frame" It tells me this file was originally at onecore\com\combase\inc\debuggerutils.h, though it doesn't tell me the path to onecore. Search can't find such a file. Does anyone know how to find that file or install it? I had just assumed that VS would automatically include debugging capability.
[Update] Appears it is not the setting of a breakpoint but a bug causing a break before that. But I'm still mystified by the error message.
Someone asked this question on github's WinObjC issues:
https://github.com/microsoft/WinObjC/issues/2931
From the discussion:
edvv commented on Nov 22, 2019
Ah, now I remember what this means: "This is a false message. What really happened is that your app silently terminated (maybe by a console abort(), i.e.: crashed ) and when the app failed to launch (aborted) the front end gave that message. You need to look at the Windows Console window in VS while in debug mode."