Udostępnij za pośrednictwem


Junfeng Zhang's Musing

things about the world, world of things

When access a symbolic link on a file server, sometimes you may see the following error: "The...

Date: 05/07/2012

Getting where the exception is thrown in Windows Error Report for managed application without a dump

A while ago, an internal thread shows how to get where the exception is thrown in Windows Error...

Date: 07/27/2009

Internal Manifest vs External Manifest

Internal manifest is the RT_MANIFEST resource in the executable. External manifest is...

Date: 05/11/2009

CLR HRESULT

CLR HRESULT’ facility code is 0x13. If an HRESULT error is 0x8013xxxx, it is likely a CLR error. All...

Date: 03/02/2009

Be careful about exception after resource allocation

The following is a common code pattern Resource resource = GetResource(); DoWork(); return resource;...

Date: 02/02/2009

Exception Filter

C# does not support exception filter. However, VB and IL support it. To add exception filter to C#,...

Date: 12/08/2008

ThreadPool.BindHandle

I mentioned that we can use ThreadPool.BindHandle to implement asynchronous IO. Here are roughly the...

Date: 12/01/2008

ThreadPool.UnsafeQueueNativeOverlapped

CLR’s thread pool has two pools of threads. The first pool is used by ThreadPool.QueueUserWorkItem....

Date: 11/24/2008

Conversion between System.String and char *

We can convert a char * to System.String with System.String’s constructor string str = new...

Date: 08/11/2008

XXX is not a valid Win32 application

If you have used your Vista SP1-based computer for extended period, you may experience some problems...

Date: 08/04/2008

Managed ThreadPool vs Win32 ThreadPool (pre-Vista)

The following is a conversation between me and a CLR dev. The conversation is very informative so I...

Date: 07/21/2008

Managed Watson Dump

From .Net Framework 2.0, Dr. Watson is able to generate dump compatible with .Net framework. This...

Date: 07/14/2008

Inspect a 32 bit Process Dump Generated by a 64 bit Debugger

64 bit Windows can run both 32 bit process and 64 bit process. For debugging though, you want to use...

Date: 06/30/2008

Getting a Full Memory Dump for a Process

To diagnose a problem for a remote customer, sometimes the easiest way is to have the customer...

Date: 06/19/2008

Event Handles “leak”

On our stress run, we saw our process’ handle count steadily increases until certain point, then it...

Date: 04/28/2008

Use !htrace to debug handle leak

Windbg Debugger’s !htrace extension is very handy to debug handle leak. The process essentially...

Date: 04/21/2008

Consider Creating a new class for locking

C# provides keyword lock for synchronized access. A good practice is to create a private object for...

Date: 04/14/2008

A case study of a NullReferenceException

We are seeing a NullReferenceException in our stress program. The investigation process may be...

Date: 04/07/2008

App Config’s root element should be namespace-less

The root element for Application config file is <configuration> <?xml...

Date: 03/24/2008

Getting the right exception context from a memory dump

When debug a memory dump, the dump may not in the right exception context when it is first loaded in...

Date: 03/03/2008

Calculating the size of each GC generation

Sos.dll does not have a command to tell the size of each GC generation. However, you can calculate...

Date: 02/25/2008

Figuring out object allocation graph from a managed memory dump

when debugging a managed memory dump, we can use Sos.dll to inspect managed objects inside the dump....

Date: 02/21/2008

Windows Update Error 0x800A0030

The other day my Windows XP machine suddenly can not use Windows Update. Internet Explorer went to...

Date: 02/18/2008

Windows Performance Tools Kit

Windows Performance Team has released Windows Performance Tools Kit to the Windows SDK for Windows...

Date: 02/11/2008

Reverse P/Invoke and exception

P/Invoke is managed code executing a native function pointer. And Reverse P/Invoke is native code...

Date: 01/28/2008

From Unhandled Exception to Debugger Attach

I was always wondering what is happening between an application throws an unhandled exception, and a...

Date: 11/19/2007

Assembly Loading and Authorization

CLR does not do anything special regarding authorization during assembly loading. It will try to...

Date: 11/12/2007

Mismatched PDBs --- Why?

If you are developing software, most likely you have encountered the "mismatched pdbs" debugger...

Date: 11/05/2007

Windows Vista Sxs Activation Context Cache

Sxs activation model is built on top of Actication Context. To create an activation context, use the...

Date: 10/01/2007

Configuring IIS to Run 32-bit or 64 bit Applications on 64-bit Windows (IIS 6.0)

I was trying VMWare Server on a 64 bit Windows Server 2003 machine to see if I can use it to create...

Date: 09/03/2007

MiniDumpAuxiliaryDlls and KnownManagedDebuggingDlls

I accidentally stumble on these two registry keys. And the expert in Windows Debugger team answers...

Date: 08/20/2007

Loading CLR DAC dll from a different path

From .Net framework 2.0, CLR creates a debugger helper dll mscordacwks.dll. The dll is used by...

Date: 08/13/2007

The Unusual Ref/Def Mismatch FileLoadException

One of my colleagues has experienced a very strange Ref/Def Mismatch FileLoadException (The located...

Date: 08/06/2007

The sequence of interactions between CLR loader and fusion during Assembly.Load

The following describes roughly the sequence of interactions between CLR loader and fusion during...

Date: 08/06/2007

advantages and disadvantages of delay load (LoadLibrary)

Some knowledgeable people posted the following wisdom about delay load. Archived here to share. The...

Date: 08/01/2007

Lock(object) and ThreadAbortException

We have experience some weird deadlock using managed code. We have a class with some shared...

Date: 07/30/2007

Don't catch all exceptions

One of the best practices on exception is don't catch all exceptions. There are many reasons why...

Date: 07/25/2007

Finding Memory leaks

MSDN and Microsoft support web site have some great information on how to find memory leaks, both...

Date: 07/23/2007

Questions and Suggestions -- July 20th Edition

This is the re-occuring post for questions and suggestions. I will not be able to provide any...

Date: 07/20/2007

64 bit gacutil.exe

32 bit gacutil.exe can install/uninstall/enumerate 64 bit assemblies for GAC, so there is really no...

Date: 07/19/2007

Unknown exception 0xe0434f4e

If you attach windows debugger to a .Net framework application, occasionally you may see debug spew...

Date: 07/16/2007

BadImageFormatException maybe thrown when loading a valid assembly

We saw some cases when loading a perfect valid assembly, CLR may throw BadImageFormatException...

Date: 07/11/2007

Reverse P/Invoke Marshaling Performance

Platform Invoke allows managed code to call unmanaged functions exported by an DLL. While the...

Date: 07/09/2007

Break on exception in Windows Debugger

In Windows Debugger, we can break on C++ exception by doing "sxe eh". We can also break on CLR...

Date: 07/05/2007

RT_MANIFEST resource, and ISOLATION_AWARE_ENABLED

RT_MANIFEST Since Windows XP, Windows reserves a new type of resource RT_MANIFEST for SxS manifests....

Date: 06/26/2007

Diagnose SideBySide failures in Windows XP/Windows Server 2003

Since I published my article on how to diagnose SideBySide failures, I have received many feedbacks...

Date: 06/12/2007

Activation Context Creation flow

The following describes how activation context is created currently in Windows XP/Windows Server...

Date: 06/12/2007

Genman32 – A tool to generate Sxs manifest for managed assembly for Registration Free COM/.Net Interop

Attached to this article is GenMan32, a tool to generate sxs manifest for managed assembly to use in...

Date: 04/14/2007

Connect Kernel Debugger to a Virtual PC/Virtual Server virtual machine

Virtual Machine completely changes how people test software (Well, definitely me.). Create a virtual...

Date: 04/04/2007

Understand why your computer restarted unexpectedly

Many people have experienced unexpected computer restarts. Unexpected restarts can be caused by bugs...

Date: 03/23/2007

Next>