Question: I am attempting to troubleshoot a problem with our application that only occurs on a particular server belonging to one of our customers.

The application sometimes crashes, and the core files are showing an illegal memory access. I suspect the reason for that is some kind of failure with the malloc function. It is probably returning a NULL pointer, but when this occurs the machine still has plenty of free memory. My theory is that the memory was too fragmented, and when it tried to allocate some more memory (18MB), it may have failed.

What steps can I take to troubleshoot this problem? For example, does Windows log any information when a memory allocation fails? Or does it just ignore it?

The server in question is running Windows Server 2008 R2 and the Windows Event Log service is running.

At this point I can't include any code, because I don't know what part of the application is causing the problem. How can I narrow this down?

Answer: 
Thanks to [JaredPar](https://social.msdn.microsoft.com/profile/jaredpar%20msft/) for the work around 

<http://blogs.msdn.com/b/bharry/archive/2015/11/30/vs-2015-update-1-and-tfs-2015-update-1-are-available.aspx?CommentPosted=true#10659560>

> 
> Add the following line before the call to al.exe in your nmake file or
>  post build events
> 
> 
> chcp 437
> 
> 
> This will reset the console code page to a known value before running
>  al.exe.
> 
> 
>
I just run into the same issue when trying to build my ASP.NET project.

![al.exe error message](https://i.stack.imgur.com/bj3Yu.png)

> 
> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3441,5):
>  error MSB6006: "al.exe" exited with code -1073741819.
> 
> 
> 

This will happen after you changed the **Default code page** in Default console window properties:
![Defaults](https://i.stack.imgur.com/21MAD.png)
![Default code page](https://i.stack.imgur.com/wJhHw.png)

Just revert it to `437` and the problem is gone.