Diagnosing CLR errors in Windows Event Viewer - exception

We have an .NET desktop application that crashed in production. How do we diagnose the error? I'd like to know the type of exception that occurred, the error message, and the stack trace.
Because the exception wasn't handled by our code, we received the "This application has encountered a problem and needs to close" Windows message box. The only option was to close, there was no debug button.
This MSDN article suggested looking in the Windows Event registry. I checked there, and here's the information inside it:
Faulting application Initect.Server.UI.exe,
version 0.12.9084.90,
time stamp 0x49cac472,
faulting module KERNEL32.dll,
version 6.0.6001.18000,
time stamp 0x4791a81d,
exception code 0xe0434f4d,
fault offset 0x0002f35f,
process id 0x44c,
application start time 0x01c9ada7f320cab0
How can this information tell me the exception type, the stack trace, and the error message?

That information isn't enough to get you a stack trace, exception type, error message, etc.
You can configure Windows Error Reporting (which showed you the problem & needs to close UI) on Windows Server 2008 to always collect a dump file that you can then debug. This doesn't require you to install Visual Studio or any other debugger in your production environment.
http://blogs.technet.com/askperf/archive/2008/02/05/ws2008-windows-error-reporting.aspx shows the proper registry settings to do this.

Related

Castle Windsor container.Resolve produces null reference exception

In my Visual Studio environment my project that uses Castle Windsor dependency injection runs correctly.
When deployed to a target environment however, it fails to start. Capturing exceptions has show this issue:
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at My.MyService..ctor()
at My.Program.Main(System.String[])
I checked registrations but everything seems OK.
Any ideas?
It turned out that my installer failed to deploy some of the dll's. Once that was fixed, the above exception disappeared.
Takeaway: when a type fails to load dependency resolution, you receive a NullReferenceExecption. It'd be more friendly to get a TypeLoadException as the framework does when a library is not available.

Azure pipeline getting error: [error]The read operation failed, see inner exception on mac hosted agent

im getting this error, which i try to find why and what happened Suddenly:
and more importantly how to debug such an error .
what this line means :
Error The read operation failed, see inner exception.
where is this : inner exception?
020-09-30T18:47:22.0199830Z ##[section]Starting: Initialize job
2020-09-30T18:47:22.0201330Z Agent name: 'Hosted Agent'
2020-09-30T18:47:22.0201750Z Agent machine name: 'Mac-1601490664598'
2020-09-30T18:47:22.0202040Z Current agent version: '2.175.2'
2020-09-30T18:47:22.0219900Z Current image version: '20200904.1'
2020-09-30T18:47:22.0229850Z Agent running as: 'runner'
2020-09-30T18:47:22.0293150Z Prepare build directory.
2020-09-30T18:47:22.0595770Z Set build variables.
2020-09-30T18:47:22.0631220Z Download all required tasks.
2020-09-30T18:47:22.0751440Z Downloading task: CmdLine (2.164.2)
2020-09-30T18:48:02.2372880Z Downloading task: UseRubyVersion (0.165.2)
2020-09-30T18:48:48.2651220Z Downloading task: DownloadBuildArtifacts (0.167.2)
2020-09-30T18:51:03.2405560Z ##[warning]Failed to download task 'DownloadBuildArtifacts'. Error The read operation failed, see inner exception.
2020-09-30T18:51:03.2423990Z ##[warning]Inner Exception: {ex.InnerException.Message}
2020-09-30T18:51:03.2428450Z ##[warning]Back off 23.799 seconds before retry.
2020-09-30T18:53:07.4698560Z ##[warning]Failed to download task 'DownloadBuildArtifacts'. Error The read operation failed, see inner exception.
2020-09-30T18:53:07.4701220Z ##[warning]Inner Exception: {ex.InnerException.Message}
2020-09-30T18:53:07.4704340Z ##[warning]Back off 13.329 seconds before retry.
2020-09-30T18:57:08.7191850Z ##[error]The read operation failed, see inner exception.
2020-09-30T18:57:08.7198800Z ##[section]Finishing: Initialize job
You are not the only one who encountered this interruption, see this post.
I reviewed our internal service telemetry log, the issue you encountered should caused by our service event. https://status.dev.azure.com/_history
There were some exception occurred on our backend start from 15:23:27 CST, which make you encountered pipeline interruption.
how to debug such an error
As normal, it's hard for users to check the inner exception if you are using hosted pool. The detailed exception messages are recorded in our backend telemetry log. You can contact our team by clicking on Report outage button mentioned below if you are blocked again in the future and would like to know the details message about it:
Since the event has been mitigated now, I'm sure your pipelines will work fine if you re-run the pipeline now.

Brokered Component not working when deploying to client

I created a test App with brokered copmonent and it runs smooth on my machine, but when moved it to a tablet and did all the required settings (regsvr32, icacls), it throws an exception. then I went and downloaded the Microsoft Northwind sample and it act the same. works fine on my machine but not on the other tablet. Am I missing any thing here? here is the exception, it's casting exception and Access denied exception:
Unable to cast COM object of type 'NorthwindRT.DAL.FileWatcher' to interface type 'NorthwindRT.DAL.IFileWatcherClass'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{23F40340-AEB1-5774-5705-64488C9BDD3A}' failed due to the following error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
but I did on the tablet the same things I did on the developing machine!
I moved the required files to the correct directory and enabled read/execute to all applications and I registered the proxy using regsvr32. Also the user can access the directory where the implementation dll is located so Access is denied exception is weird.
I did my research about brokered comp and I am doing exactly like the available documentations!
Any Ideas? Am I missing anything here? Is there extra settings I need to do? is my system missing any required dlls?
The App does not have access to msvcr120d.dll
add "ALL APPLICATION PACKAGES" to this dll and it will solve the issue.
I am also working on brokered component, so far I did had some success in development as well as deployment.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
You need to run icacls in the folder where you have the proxystub.dll and the winmd implementation.
icacls . /T /grant "ALL APPLICATION PACKAGES":RX
Now if you're deploying to a device that does not have a dev environment (i.e. Visual studio), you need to install Visual C++ Redistributable for Visual Studio 2015 (you can use whatever VS version you have, it just happend that i am using VS2015). You can download it here. And one more thing, since you don't have a development environment in the device, you would like to deploy Release assemblies not Debug so that the assemblies won't be referencing libraries or dll that is for debug (i.e. msvcr120.dll instead of msvcr120d.dll) because it won't be found in a clean device.
Lastly, I have a blog about brokered component. You might want to check it out.

Calling createEntityManager in CORBA program causes exception: org.omg.CORBA.OBJECT_NOT_EXIST

I have a CORBA client-server program that is working perfectly. The client can get a servant and call methods remotely.
I would now like to make the server interact with a database using JPA. However everything goes wrong when I add this one line to the server code:
emf.createEntityManager();
The server builds, and it registers to the orbd without error. However when I run the client which tries to connect with the server I get the following exception:
Exception: org.omg.CORBA.OBJECT_NOT_EXIST:
Full exception and stack trace are:
Exception: org.omg.CORBA.OBJECT_NOT_EXIST: ----------BEGIN server-side stack trace----------
org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: SUN minor code: 401 completed: No
at com.sun.corba.se.impl.logging.ActivationSystemException.errorInBadServerIdHandler(ActivationSystemException.java:239)
at com.sun.corba.se.impl.logging.ActivationSystemException.errorInBadServerIdHandler(ActivationSystemException.java:257)
at com.sun.corba.se.impl.activation.ServerManagerImpl.handle(ServerManagerImpl.java:604)
at com.sun.corba.se.impl.orb.ORBImpl.handleBadServerId(ORBImpl.java:1602)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.checkServerId(CorbaServerRequestDispatcherImpl.java:407)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:182)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940)
at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:471)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519)
Caused by: com.sun.corba.se.spi.activation.ServerNotRegistered: IDL:activation/ServerNotRegistered:1.0
at com.sun.corba.se.impl.activation.RepositoryImpl.getDBServerDef(RepositoryImpl.java:221)
at com.sun.corba.se.impl.activation.RepositoryImpl.getServer(RepositoryImpl.java:228)
at com.sun.corba.se.impl.activation.ServerManagerImpl.getEntry(ServerManagerImpl.java:350)
at com.sun.corba.se.impl.activation.ServerManagerImpl.handle(ServerManagerImpl.java:566)
... 12 more
To my mind, a call to createEntityManager is logically completely separate from the CORBA networking functionality, so I can't see how this could possible have an impact on the client connecting to the server.
The exception was coming from my EntityManagerFactory. It had nothing to do with the networking, but because I never ran the server until a client connected, no exception occurred until that point.
The exception output was not particularly useful. I found it helpful to comment out all the networking code and just run the server as a stand-alone program from development (much more useful error messages when something goes wrong).

I Cant Launch LoadRunner 11.5

I'm having a problem launching the trial version of LoadRunner 11.5. It says:
An unhandled exception has occurred in your application. If you click continue, the application will ignore this error and attempt to continue. If you click quit, the application will close immediately.
Retrieving the COM class factory component with CLSID
{CF405F74-4814-AD81-525877D8C9A0} Failed due to the following
error: 80040154 class not registered (Exception from HRESULT:
0x80040154(REGDB_E_CLASSNOTREG)).
Which component is failing? VUGEN? Controller? Analysis? Other?
Did this component ever work on this host? If not, then this is an installation or rights issue
Have you contacted vendor support? This assumes that you are under maintenance for your 11.5 version of LoadRunner.