I get the following exception when trying to load an ASP.NET MVC website:
Unhandled exception at 0x07070a91 in w3wp.exe: 0xC0000005: Access
violation reading location 0x00000000.
The Visual Studio Just-In-Time Debugger opens and the only information I can see in the debugger is this:
Call stack location:
msvbvm60.dll!06c00a91()
The website uses some COM objects and everything worked fine until last week. This problem appeared out of the blue.
This is the error log from Windows Event Viewer:
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
Faulting module name: MSVBVM60.DLL, version: 6.0.98.15, time stamp: 0x4a5bda6c
Exception code: 0xc0000005
Fault offset: 0x00030a91
Faulting process id: 0x1a0
Faulting application start time: 0x01cd31fcb47f66d8
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\MSVBVM60.DLL
Report Id: f5db0ae3-9def-11e1-ad79-005056c00008
Do you have any suggestions to help troubleshoot this problem?
Edit: I managed to solve the problem and now everything works. The solution involved tweaking some registry settings that the custom dlls need in order to function properly. So the problem didn't actually appear out of the blue, I just didn't realize some registry values were modified, which caused a com dll to crash.
Open the Advanced settings dialog of the Application pool that is serving the application in IIS Manager, and set: Enable 32-Bit Applications to True
The information you provided above is not enough to provide a root cause however if you can provide more info about the exception you might get exact reason for this failure. You asked for suggestion to troubleshoot this problem so here they are:
You can use either any one of the 3 tools to troubleshoot this issue:
IIS Debug Diagnostics Tool v1.2
Here is more info about how to use this tool:
http://support.microsoft.com/kb/919790
DebugDiag
Use the link below to understand how you can hook your w3wp process (it is user mode proces) with DebugDiag and collect more info about the crash:
http://msdn.microsoft.com/en-us/library/ff420662.aspx
WinDBG
Here is a link which will help you to load W3WP process in WinDBG and use some commands to extract more info about the crash:
http://blog.whitesites.com/Debugging-Faulting-Application-w3wp-exe-Crashes__634424707278896484_blog.htm
Once you have more info about the exception, you can add above and will get prompt help.
Do the Following,
1) Give full rights to Temp & %temp% folders
2) Go to application pool properties & Change " Enable 32 bit application " to true
You may start by capturing a crash dump when this issue happens again,
http://support.microsoft.com/kb/2580960
Use Debug Diag 1.2 to set up a crash rule properly is step 1.
Once you have the dump, you can use WinDbg (part of Debugging Tools for Windows) to analyze it if you are familiar with dump analysis.
If you are not capable of analyzing that, my suggestion is that you open a support case via http://support.microsoft.com and share the dumps with Microsoft support engineers.
In my case, a program called "Web Companion" was installed.
After uninstalling it, the problem was fixed.
My Solution is if you want to build it on 64bit:
Debug ==> Options ==> Search for iis ==> enable using of 64bit Version of IIS Express
This was the fix that worked for me while publishing WebAPI 7.0 to IIS on Windows 10 Enterprise Edition:
Open IIS.
Go to your Application Pool.
Right-click on it -> Advanced Settings...
Under Process Model, change Identify from "ApplicationPoolIndentity" to "LocalSystem".
Restart your IIS.
In my case, It was occurring because there was an infinite loop over the code.
Related
First I enabled saving of dump files on a Windows 10 Mobile phone:
Settings > Update & Security > For developers > Save this many crash dumps: 3
Then I debugged an app which throwed an exception. I continued the debugging after stop. After disconnecting and connecting the mobile phone again, I was able to access the dump file stored under Windows phone\Phone\Documents\Debug directory. The file is called
FPCL.WIndows - a736c773-c105-4b30-a799-4bf317872f5e with exception C000027B on 5-03-2016 12.11.dmp
and has about 140 MB!
I copied the file to the bin directory of my UWP app. Afterwards I opened it as file in Visual Studio 2015 (in the same project). Now I can see the Dump Summary and I have the following buttons:
Debug with Managed Only
Debug with Mixed
Debug with Native Only
Set symbol paths
Copy all to clipboard
If I run Debug with Managed Only I get
A fatal exception was caught by the runtime. See $stowedexception in the Watch window to view the original exception information.
and on clicking Break I get
No compatible code running. The selected debug engine does not support any code executing on the current thread (e.g. only native runtime code is executing).
In the Watch 1 window I see the following
Name: {CLR}$stowedexception
Value: {"The method or operation is not implemented."}
Type: System.NotImplementedException
This should be the exception I have thrown in my app. When I open this node and look under StackTrace I can get a line number. On pressing Continue I get
The debugger cannot continue running the process. This operation is not supported when debugging dump files.
So I can only stop it.
If I run Debug with Mixed I get again
A fatal exception was caught by the runtime. See $stowedexception in the Watch window to view the original exception information.
and on clicking Break I get
kernelbase.pdb not loaded
kernelbase.pdb contains the debug information required to find the source for the module KERNELBASE.dll
Module Information: Version: 10.0.10586.218 (th2_release.160401-1800) Original Location: KERNELBASE.dll
Try one of the following options: Change existing PDB and binary search paths and retry: Microsoft Symbol Servers
Here I can either press Load or New. So the kernelbase.pdb isn't found under the given location. Should it exists? Where should I find it?
In the Watch 1 window I see the same as above and I can only stop it.
If I run Debug with Native Only I get
Unhandled exception at 0x76ECDF95 (combase.dll) in FPCL.WIndows - f736c883-f105-4d30-a719-4bf328872f5e with exception C000027B on 5-03-2016 12.11.dmp: 0xC000027B: Anwendungsinterne Ausnahme (parameters: 0x075C6838, 0x00000002).
and on clicking Break I get the same missing kernelbase error as above, but here in the Watch 1 window the Value is Unable to evaluate the expression. So I can only stop it.
According to this post I should be able to inspect the source code and find the cause. But how is such a UWP dump file inspected correctly?
You mention
[...] 0xC000027B [...]
[...] $stowedexception [...]
which are both indicators that there is a Stowed Exception inside the dump.
To analyze such exceptions, first watch Channel 9 Defrag Tools, episode 136 where Andrew Richards explains and then analyzes them (at 3:28).
Then download the PDE extension from the Defrag Tools OnDrive and analyze your dump in windbg instead of Visual Studio.
Regarding the symbols of kernelbase, they should be downloaded from the Microsoft symbol server. To set that up in WinDbg, use .symfix;.reload. If you want to give it another try in Visual Studio, go to Debug / Options and choose Debugging / Symbols, then check "Microsoft Symbol Servers".
Regarding the button to press in Visual Studio, choose "Managed only" when debugging the debug build, because your app will run on CoreCLR and choose "Native Only" when debugging the release build, because your app will use .NET native runtime support. (This applies if you didn't change the default settings; otherwise choose according to your compilation settings)
Description
When launching any Console Application, the code stops running immediately on an AccessViolationException (Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt). More info included in the next section.
Technical Symptoms
The Call Stack only contains external code:
Exception:Thrown: "The message filter indicated that the application is busy. >(Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))" (System.Runtime.InteropServices.COMException)
A System.Runtime.InteropServices.COMException was thrown: "The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))"
Time: 12/10/2015 10:59:55 AM
Thread:vshost.NotifyLoad[15344]
I created a new Console Application, containing only Console.WriteLine("Hello world!");
Running the new Hello world app results in the same exception and an identical
call stack.
Background
I suspect this has nothing to do with the issue, as I will explain, but I feel it is important to answer the obvious question, "what were you doing when the issue happend?" The last change I made was adding an extension to my Selenium Driver to hotkey logout from an application:
public static void logout(this IWebDriver Driver)
{
Driver.FindElement(By.TagName("body")).Click();
new Actions(Driver)
.SendKeys(Keys.Control + Keys.Shift + "x")
.Perform();
}
I also made a change in my App.Config file for one of my projects, but reverting this had no impact either.
Removing this code (the Driver extension and/or the App.Config change) does not resolve this issue. Retrieving a previous check-in does not resolve the issue. I am the only person currently working on this solution.
Discoveries
As mentioned, this is happening for an empty Console Application. Windows Form Applications launch fine. Unit Test Projects launch fine as well.
Research
I've spent hours looking into this. It seems like every similar issue I have looked into is pertinent to debugging only or a .NET version. For me, the issue occurs with a Release as well. Additionally, I have been using .NET 4.5 without any issues or changes on that front. I can't find any articles that seem worth posting, but I might be overlooking something.
Visual Studio Info
Microsoft Visual Studio Ultimate 2013
Version 12.0.30501.00 Update 2
.NET Version 4.6.00081 (just noticed it says 4.5 in my project properties, though)
Running as Administrator
Feedback
When Running from devenv.exe /SafeMode, Visual Studio loaded with:
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".
Exception details:
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
Additionally, when trying to run, I get an error message of "Error while trying to run project: Invalid Pointer" (again, VS in devenv.exe /SafeMode - see how to run visual studio without plugin and all third party feature if unfamiliar)
Please let me know if I can provide any additional information.
It may be because when you name the project you can't put spaces, I put them and it gave me a AccessViolationException aswell, try using capitals to separate your words, but only use letters and no spaces to be sure.
I also faced this issue with Visual Studio 2010. More interestingly I had several projects in my solution (Console application, WPF application, Windows Forms application) but it was failing only when, I was setting the project which was of type "Console Application" as start up project. Following change finally helped me nail down the issue: Go to project properties of the console application project -> Go to "Debug" tab -> Go to "Enable Debuggers" section in right pane -> Check the "Enable unmanaged code debugging" check box as shown in the snapshot below. Root cause of why it happened is still not known to me. Only thing which I observed as fishy was that there were lot of windows updates which had got installed on my machine the previous night which mostly constituted of office updates and OS updates (More than a dozen KB articles).
I am using Window 7 pro x64. I had istalled VS 2010 pro. After that, I uninstalled it and replaced with VS 2012 ulti. Now, I need the VS 2010 but i can't install it. I try to install both pro and ulti version from .iso file but i get the same error. The installer quit suddenly after a few second and the window log records two error:
-The first:
Faulting application name: setup.exe_Microsoft® Visual Studio® 2010, version: 10.0.30319.1, time stamp: 0x4ba20d29
Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58
Exception code: 0xc0000006
Fault offset: 0x0003dccf
Faulting process id: 0x1170
Faulting application start time: 0x01cf728abd52e628
Faulting application path: F:\setup\setup.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
Report Id: fb6a8ef5-de7d-11e3-ada9-70f39529732e
-And the second:
Windows cannot access the file F:\setup\sqmapi.dll for one of the following reasons: there is a problem with the network connection, the disk that the
file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program Suite Integration Toolkit
Executable because of this error.
Program: Suite Integration Toolkit Executable
File: F:\setup\sqmapi.dll
The error value is listed in the Additional Data section.
User Action
1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
2. If the file still cannot be accessed and
- It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be
contacted.
- It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.
3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt,
type CHKDSK /F, and then press ENTER.
4. If the problem persists, restore the file from a backup copy.
5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or
computer hardware vendor for further assistance.
Additional Data
Error value: C0000023
Disk type: 5
I try to uninstall .Net 4.5 and install .Net 4.0 but it not help. I run the system file checker and hard drive checker but no error. Then i download the ntdll.dll and sqmapi.dll to replace these files in my computer but it also not help.
I think the .iso file still good because it still run in my friend computer.
So anyone suggest a solution ?
After i scan my computer with avira and delete some file buildlog in D drive(in my computer, C drive for OS and software, D drive for data), the installer work normally!
But i don't understand why some file buildlog in D drive can make VS can't install?
Background:
.NET Framework 2.0, C#
ESRI ArcGis 10.1
64-bit Windows Server 2008 R2.
We have a thirdparty program (System A for simplicity) using ESRI-components running a custom Model-system for Maps.
System A also uses it own licensing system.
We are pulling data from System A to the web for users to view.
The system as it follows:
Web <-> WebService (using .NET-Remoting 2.0) <-> WindowsService.exe <-> DataFetcherStub.dll <-> DataFetcher.dll <-> System A
Problem:
Running this on ArcGIS 9.3 up to ArcGIS 10.0 have been no problem and earlier version of System A.
The providers of System A currently upgraded this to ArcGIS 10.1, using .NET-interop from 10.0.
We did that also, but now it will not work using the .NET-Remoting -> WindowsService any more.
Running an EXE using the DataFetcherStub everything is ok.
Running the windows service it crashes within the System A.
Faulting application name: windows_service.exe, version: 1.0.4802.40962, time stamp: 0x51293874
Faulting module name: AfCore_libFNP.dll_unloaded, version: 0.0.0.0, time stamp: 0x4f920360
Exception code: 0xc0000005
Fault offset: 0x619fe9b0
Faulting process id: 0x14c0
Faulting application start time: 0x01ce120f632c1f0e
Faulting application path: D:\path\windows_service.exe
Faulting module path: AfCore_libFNP.dll
Report Id: a41b42dc-7e02-11e2-8e56-00155d0a11a9
Have anyone come up with this error when having licensing with ArcGIS and running through a windows service?
There is a thread on ESRI-forums, but it wont leave me any clues how to solve this?
http://forums.arcgis.com/threads/74546-Product-Licensing-in-Scheduled-Batch
Approaching the vendor is not an option as it took them nearly a year to fix the last problem we discovered. Pointing the finger at us for 9 months before they finally got the proof that it was their bug, and i am pretty sure they will fight this also. It is quicker if we can do a work-around.
I have tried doing this from the windows-service.
1) System.Threading.ThreadPool.QueueUserWorkItem(o => FireAndForgetProcess()); NO LUCK
2) Process.Start("FireAndForgetMe.exe") NO LUCK
Anyone can give another approach to get external exe to "release itself" from the windows service and act as if it started by it own?
The Esri development team gave me a fix without having to run using an admin account.
The issue here is that the FLEXnet Licensing Service (which Esri now uses at 10.1, but was not used in 10.0) doesn’t have the proper execution permissions set to it such that the “Network Service” account can start it.
Esri working on a patch, but in the meantime, there is a manual workaround:
Ensure that you are logged in as a user with administration privileges on the machine.
From the windows Start menu, select run and enter ‘cmd’. Right-click on “cmd.exe” and select “Run as Administrator.”
In the command prompt, run the following command:
sc sdshow "FLEXnet Licensing Service"
This will print out the DACL permissions that are registered with that service:
D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;NU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCLCSWRPLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
We need to insert “(A;;CCLCSWRPWPDTLOCRRC;;;WD)” into the permission string, such that it becomes:
D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;NU)(A;;CCLCSWRPWPDTLOCRRC;;;WD)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCLCSWRPLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
NOTE: The user’s DACL string may vary, and edits to the string should be done carefully.
To register the DACL with the service run the command:
sc sdset "FLEXnet Licensing Service" ${your original DACL string with the new permission string inserted}
For the example above you would enter:
sc sdset "FLEXnet Licensing Service" D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;NU)(A;;CCLCSWRPWPDTLOCRRC;;;WD)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCLCSWRPLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
You should see a [SC] SetServiceObjectSecurity SUCCESS. That's it. Network Service should now run without error.
Solution
I changed the account that are running the windows-service to my admin-account, and now it works. Either 10.1 demands more of the windows-account running the service, or they have downgraded the account.
I guess i have to check that in the morning. Problem solved however.
EDIT: It is the rights of the accounts that need to be raised after 10.1.
My c# windows application is crashing abruptly and following application exception was logged by the DR.watson
Application exception occurred:
App: C:\Program Files\InstalltionFolder\Application.exe (pid=296)
When: 5/24/2012 # 11:13:00.141
Exception number: e0434f4d
()
Your help would be much appreciated.
Rgds
P
You need to debug your application inside Visual Studio. Load it up, build it in Debug mode, and press F5 or select Debug -> Start Debugging from the menu.
Then do what you did before to get the exception. Visual Studio will 'trap' the exception and hopefully display more information to you regarding the problem.
Without knowing the exception code, not much more help can be given.
You can check your register base
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
and you must have permission