ClientPerfCountersInstaller.exe stopped working, now can't run Azure solution - windows

I use Visual Studio 2013 with Windows Azure SDK 2.3.
Out of nowhere, after clicking Start without Debugging, my solution took awhile to start, then an error popped up that said that ClientPerfCountersInstaller.exe stopped working. I clicked the Send Information button to send the error to MS, then it exited. "That's weird," I thought. I closed VS, reopened, and tried again. Same thing. Restarted computer, reopened VS, but now, it just hangs while starting the solution (with or without debugging). Azure Compute and Storage Emulators both get started (I can see in the system tray), but nothing else happens. I eventually get the "this is taking longer than expected" message from VS.
I tried uninstalling Windows Azure SDK 2.3, then reinstalling it. That didn't work.
I looked in Windows Event Viewer and noticed the following four errors every time I try to start my solution:
Application: ClientPerfCountersInstaller.exe Framework Version:
v4.0.30319 Description: The process was terminated due to an unhandled
exception. Exception Info: System.ComponentModel.Win32Exception Stack:
at
System.Diagnostics.PerformanceCounterLib.RegisterFiles(System.String,
Boolean) at
System.Diagnostics.PerformanceCounterCategory.Delete(System.String)
at
ClientPerfCountersInstaller.CounterInstaller.ReadConfigAndInstallCounters()
at ClientPerfCountersInstaller.CounterInstaller.Main(System.String[])
|
Faulting application name: ClientPerfCountersInstaller.exe, version:
1.0.5287.0, time stamp: 0x533b317f Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x5315a05a
Exception code: 0xe0434352 Fault offset: 0x000000000000940d Faulting
process id: 0x1918 Faulting application start time: 0x01cf9c5d685efbcd
Faulting application path:
C:\Path-To-Solution\Dealers.Web.WindowsAzure.Local\csx\Debug\roles\Dealers.Web\approot\bin\Microsoft.WindowsAzure.Caching\ClientPerfCountersInstaller.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll Report Id:
a64bfba7-0850-11e4-bd03-b8ca3ac71182
|
The performance strings in the Performance registry value is corrupted
when process Performance extension counter provider. The BaseIndex
value from the Performance registry is the first DWORD in the Data
section, LastCounter value is the second DWORD in the Data section,
and LastHelp value is the third DWORD in the Data section.
|
Unloading the performance counter strings for service windows azure
caching:client (windows azure caching:client) failed. The first DWORD
in the Data section contains the error code.
How did this happen? Does it sound like a file or entry or something just got randomly corrupted?

After Googling, I started to find some articles about rebuilding performance counters. It seems that others have experienced these counters getting corrupted.
This article from MS gives all kinds of detailed information about rebuilding performance counters. I didn't want to do the entire manual process, so I just tried rebuilding all counters with the lodctr /R command first.
I went to Run and typed cmd to open a Command Prompt, then tried the lodctr /R command. It said it rebuilt successfully, but in the Event Viewer, two errors appeared, and one was specifically that it couldn't rebuild Windows Azure's counters.
But then I realized I hadn't opened the Command Prompt as an Administrator, as the article instructed. After doing that, I tried the command again, and no errors appeared in the Event Viewer.
And finally, my solutions would run again, both with and without debugging. Whew! Hope this helps someone else.

when I had error 2, just type lodctr.exe /R from the Windows command prompt C:\windows\system32>
(win 10)

Related

Windows c++ service faulting on ucrtbase.dll when starting

So I've been developing this program for a while now... Its meant to act as an asset manager (and potentially more in the future) for our IT team. I have 2 services which we'll refer to as "Manager" and "IAM" for right now. The "Manager" does all things managerial for all services (currently only the inventory asset manager known as "IAM") such as automatic updates, etc., while the asset manager does its job.
Anyways, its been working great for a while now. Recently I implemented an automatic updating feature (actually still needing to be tested and likely debugged). While doing this, I needed to get my naming consistent (for example, renaming my service from "Updater" and "CppWindowsService" to the software's actual name).
Before this, it had been working great! Started, stopped, installed, and uninstalled with no hiccups. I change the name for everything, and make sure it all compiles ok. Looks good. Install works great for both "Manager" and "IAM" now, but as soon as I try to start it, I get:
StartService failed (1053)
Also, when I try to start it from services.msc, then I get the following error message:
Windows could not start the service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion
The strange thing about this though is that it doesn't wait for any sort of timeout. It just instantly spits out the message. That message comes from the code called from my wmain() (windows entry point. main() otherwise.) function.
if (!StartService(
schService, // handle to service
0, // number of arguments
NULL)) // no arguments
{
printf("StartService failed (%d)\n", GetLastError());
CloseServiceHandle(schService);
CloseServiceHandle(schSCManager);
return;
}
else printf("Service start pending...\n");
In Windows Event Log, I get an application error containing the following details after fault.
Faulting application name: InITManager.exe, version: 0.0.0.0, time stamp: 0x59e11e44
Faulting module name: ucrtbase.dll, version: 10.0.15063.674, time stamp: 0x8ac9f9d4
Exception code: 0xc0000409
Fault offset: 0x000000000007350e
Faulting process id: 0x3008
Faulting application start time: 0x01d346915918e17d
Faulting application path:
C:\Users\collin.walker\Desktop\InITService\C++\x64\Release\Manager.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: 7fcbdcc4-be8e-476a-960f-4fa1fb21f892
Faulting package full name:
Faulting package-relative application ID:
Other info: ucrtbase.dll is used by Visual Studio and is associated with the Release build, where as ucrtbased.dll is associated with the debugger build. I am building in Release mode.
Now, I've already been told the issue isn't my code, but if anyone feels as though they need to see it, I will include it then. Its very straightforward c++ winapi stuff though.
If anyone has any further suggestions on how to troubleshoot this, please let me know, and thanks for all help in advance!
Kind of forgot about this post during my troubleshooting... Anyways, I figured it out. Comments above were spot on!
For me the buffer overflow came from me changing my service names, which also changed the program directory names. The error was happening when I was initializing my logging object in my service's constructor. I only have like 2 lines of code in the constructor, so I totally forgot to look there. Changed the hardcoded directory location where the log was being created, and it all started working great! Thanks guys for the helpful info!

Windows error on program start-up

I have an application written in Delphi XE3 (Originally Delphi 7) with a MySQL database. It was running on 5 computers on a network. Two of the computers were on windows 7 while 3 were still windows XP. The client recently upgraded the 3 windows XP computers to windows 7 x64 (3 brand-new identical machines). The program is running fine on one of the new computers but on the other 2 I get the error message "A problem caused the program to stop working. Windows will close the program and notify you if a solution is available". The program seems to crash at the end of the FormActivate procedure after it had verified the password and connected to the database. The MySQL server is up and running. I can access the database on the problem machines locally and remotely successfully.
I have searched the Internet and some websites suggest that this error is a protective mechanism from Windows triggered by a thread to system files, indefinite loops or memory problems – none of which are applicable to my program.
I have since reformatted the 2 problem computers and reinstalled Windows 7 again but it did not solve the problem.
The DependencyWalker output on both problem and working machines (and on my development machine) are identical :
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
With regard to different CPU types - in all instances the application is x86 and the rest of the modules are x64. This could be a 32-bit-64-bit problem but the program is running on all the machines except for 2 problem machines.
The Windows Event Viewer reports the following error:
Faulting application name: February_2014.exe, version: 1.0.0.0, time stamp: 0x52fa3b19
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18229, time stamp: 0x51fb1116
Exception code: 0x0eedfade
Fault offset: 0x0000c41f
Faulting process id: 0x1510
Faulting application start time: 0x01cf28a57840f88d
Faulting application path: C:\dgpa dgr\February_2014.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: bd26ca27-9498-11e3-9479-7c050710b013
I have searched the Internet (and Stackoverflow) for KERNELBASE.dll but could not find anything useful.
I have asked for help on Windows Technet without success
http://social.technet.microsoft.com/Forums/windows/en-US/ef52b2e1-237d-436f-952f-7cdecdb48337/a-problem-caused-the-program-to-stop-working-windows-will-close-the-program-and-notify-you-if-a?forum=w7itprogeneral
The program is running without the hitch on my Windows 7 x64 development machine so I cannot replicate the problem/error that I am experiencing at my client. Has anybody had a similar problem? Any suggestions for the cause/trigger of the Error and how to solve it?
UPDATE
I got the following report from madExcept but I have no idea what it means
If you include a ClientDataSet in your application you need to deploy midas.dll with your application, or you have to manually add the MidasLib unit to your project's uses clause (for example)
program Project1;
uses
MidasLib,
Forms,
Unit1 in 'Unit1.pas' {Form1};
For a detailed explanation see the article of Cary Jensen on the topic.
The screenshot from madExcept is telling you that your program is raising an exception at startup, before you call Application.Run. The root of the exception is in the call to Application.CreateForm made in your project file.
The top-level exception handler is contained in the main application message loop that is implemented in Application.Run. Because you have not yet started the main application message loop, there is no exception handler.
This means that the exception leaks out of your application and the system has to handle it as best it can.
I don't know how to fix your specific problem, but the madExcept diagnostics tell you where to start looking. Ideally you would like to be able to debug this scenario in the IDE. Once you can do that it will be much easier to track down.
Fundamentally, if you leak exceptions out of your startup code, you will encounter such error dialogs.
I know of a few things that could be potential sources of the issue. First is the space (blank) in the path name where the application is running. Trying moving app to a subdirectory with no spaces in the path name. Second try running in Admin mode if you are not already. The answer that references "midas.dll" is another one. With the additional warning that Delphi used to install a copy of midas.dll in the Windows\System32 directory. Make sure that your version of midas.dll came with the version of Delphi you wrote the code in (and make sure that there isn't another older copy being found before the one you intended. Depends.exe can help show the path to the dll it loaded. Also have you tried running the app using "XP Compatibility"? Does the issue go away? Also have problems with DB components on a DataModule form in Delphi before. If you have a DB component with a AutoConenct on (or Streamed connection), it can cause unusual errors. Best to leave it disconnected and connect it in your source code at runtime. Last thing to try, look at the Windows services and see if the Performance Logs are running prior to launching your app. A weird one, but I've seen it.

VB6 Crystal Reports 8.5.0.217 - Access Violation Application Crash

Background:
Our company uses Crystal Reports in our legacy product written in VB6 which I'm performing some maintenance duties for.
Its using version 8.5.0.217 [RTM] with no service packs.
The Problem:
Has worked perfectly on Windows XP x86 to date.
In Windows 7 [x86 and x64] we get an Access Violation followed by an application crash and no further usable error information.
The Details:
The application crashes with a large datasets for any report using the active x viewer.
Visual Studio will crash whilst debugging.
The offending code is here:
Crv_Obj(0).ReportSource = ReportParametersFrm.Report
Crv_Obj(0).EnablePopupMenu = True
Crv_Obj(0).ViewReport
I have checked that:
Crv_Obj(0) is a valid object reference.
ReportParametersFrm.Report is a valid reference.
The only information I have is from the event viewer:
Faulting application name: Pyramid.exe, version: 2.2.0.8, time stamp: 0x51e53053
Faulting module name: craxdrt.dll, version: 8.5.0.217, time stamp: 0x3a849e1a
Exception code: 0xc0000005
Fault offset: 0x002ac3d1
Faulting process id: 0x15a8
Faulting application start time: 0x01ce8228a295c8c8
Faulting application path: C:\Program Files\Pyramid\Pyramid.exe
Faulting module path: C:\Program Files\Pyramid\CrystalSys\craxdrt.dll
I have also tried:
Disabling the DEP to no effect.
Changing Compatibility to Windows XP and below.
Running as both privileged and nonprivileged users.
Tried adding in new error handlers to catch the error
[Fruitlessly] searching on Google and this site.
Contacting SAP [to then be ignored].
What I need help with:
Have you seen this before?
Are there any workarounds or something I should be looking for that is obviously wrong?
Is there more recent version of Crystal that supports VB6 or at least
an upgrade path that you know of that I can attempt?
Any and all help would be most appreciated.
After quite a lot of research and digging around it seems that a slightly newer version of craxdrt.dll crviewer.dll fixes the problem.
Simply a case of replacing these libraries in the application lib folder and in C:\Windows\System32\
I've put a copy of the libs here in the event anyone else has this problem as there was very little consistent help/information out there on the internet.

The Just-In-Time debugger was launched without necessary security permission

We are working on vs 2010 windows 7, 32 bit and the project is running under target framework 3.5.
Now we are implementing credit card process in the website project in signup page.
It's running fine when running from VS IDE, but after publishing to the local IIS when clicked on signup button, it's showing this error:
An unhandled win32 exception occured in w3wp.exe The Just-In-Time
debugger was launched without necessary security permissions. To debug
this proces, the JIT debugger must be run as an administrator. Would
you like to debug the proces?
In Application error log im seeing this
Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bcd2b
Faulting module name: ntdll.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdadb
Exception code: 0xc0000374
Fault offset: 0x000c283b
Faulting process id: 0x3e4
Faulting application start time: 0x01cca60dbfd76d52
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 126cc4b9-1201-11e1-b3db-003018a9eb5e
It was working fine three days ago from IIS. I do not understand what change caused this issue.
Edited
if i select debug this process.. app working fine. The real problem is after publishing same build to the live server(win 2k8, 64 bit), in sign up page i used captcha even i entered correct code its saying you are not entered correct code. which is working fine in local system.
I don't know if your problem had the same cause, but I got this error when trying to debug my app (just pressing F5).
We got crazy trying to figure why the w3wp.exe was failing with this error when minutes before it was running fine.
After some investigation we realized that the real problem was in the code of the global.asax: it was throwing an stack overflow exception (pretty ironic for answering here) and that was crashing the w3wp.exe process before VS could attach it to begin debug.
Fixing the buggy code made the VS to run nicely again.
I see the question is from long ago, but I hope it helps somebody.
To solve this issue, let the dialog help you. Agree to launch an elevated debugger and debug your problem. You probably have some sort of configuration problem. Your real problem isn't whether or not the debugger is elevated, it's the fact you need a debugger at all. In other words the first sentence on the dialog is "you have a problem." All the other sentences are "I would like to help you with that problem; is that cool with you?"
I believe an update to the latest version of VS and .NET Core 2.1 is what caused this for me.
Then for the first time, I noticed this setting. Setting it to 'Enabled' fixed it for me.
If you usually attach to process and debug but you can't (because you can't get the app to successfully run), run the app via Visual Studio and it'll break and show you the exception cause in some detail.
Please check for System.Diagnostics.Debugger.Launch(); or Debugger.Launch(); in the cs file. Commenting the code, starting the application worked fine for me.!
I was experiencing this error because of the AppPool that was associated with my site. Originally, I was using DefaultAppPool. The fix was to use a different app pool (custom, from our app) that had NetworkService as the identity.
In my case it was stackoverflow due to circular dependency injection
public class ServiceA : IServiceA
{
public ServiceA(IServiceB serviceB){...}
}
public class ServiceB : IServiceB
{
public ServiceB(IServiceA serviceA){...}
}

.Net 4.0 Windows Application crashes in clr.dll under Windows Server 2008

I have a Windows application scheduled to run on a daily basis and fails intermittently as per the following log in EventViewer.
Faulting application name: MyApplication.exe, version: 1.0.0.0, time stamp: 0x4d54829a
Faulting module name: clr.dll, version: 4.0.30319.1, time stamp: 0x4ba21eeb
Exception code: 0xc0000005
Fault offset: 0x00000000000029e1
Faulting process id: 0xbb1c
Faulting application start time: 0x01cbd99223d8b4eb
Faulting application path: E:\MyApplication\MyApplication.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: 7e74ec7e-45a5-11e0-a95d-003048de380d
And in the second EventViewer log it says:
The process was terminated due to an internal error in the .NET Runtime at IP 000007FEF97329E1 (000007FEF9730000) with exit code 80131506.
The server is Win Server 2008 R2 and the application uses .Net 4.0 (as you can see in the error log too).
The application uses multi-threading intensively and reads from a remote database and writes to local hard disk.
Any guesses on what causes this issue and any suggestions on how to investigate? I have no idea where it fails in the life of the application which is about 5-10 hours.
I'm having the same issue. At approximately 8-10 hours of application life CLR error rises. I suspected my unmanaged code generating exception in the background thread. However I could not really find out why. You can give the following a try however:
If you are using unmanaged code review exception handling statements
while executig it.
Make sure you have the latest fixes of .NET4.
(https://connect.microsoft.com/VisualStudio/Downloads)
Please let me know if you have already found a solution.
I had a similar problem, so this can help future user to find a solution :
We use Apache log4net for application log.
After an update to DLL version 1.2.15, for dotnet Framwork 4.5 it starts to fire this exact exception once the log file reach the maximal size (10MB)
The hot-fix has mostly vanished and I faced a similar issue, so I'll share my answer here.
My solution revolved around the fact that I was passing a Lamda to a P/Invoke:
https://stackoverflow.com/a/52360307/4700841

Resources