What are the .ni.dll and .ni.exe files in minidump?

I got minidump from the process of submitting Windows Store applications (submitted by the reviewer) due to a failure in my application. I'm having trouble loading characters for my application because the error occurs inside App.ni.exe , a file that I don’t know where it came from.

My application only has App.exe (and some DLLs), but the dump continues to reference .ni.dll and .ni.exe . These files are not found anywhere in my .appx or .appxsym .

My application is created for each specific platform (x86, x64 and ARM). This is the x64 version that crashed into stackdump.

My current attempts with windbg:

Symbol path:

 Srv*C:\Users\Vegard\Appdata\local\temp\SymbolCache*http://msdl.microsoft.com/download/symbols` 

Windbg attempt:

 0:006> !analyze -v ******************************************************************************* * * * Exception Analysis * * * ******************************************************************************* Unable to load image Newtonsoft.Json.ni.dll, Win32 error 0n2 *** WARNING: Unable to verify checksum for Newtonsoft.Json.ni.dll *** ERROR: Module load completed but symbols could not be loaded for Newtonsoft.Json.ni.dll Unable to load image App.ni.exe, Win32 error 0n2 *** WARNING: Unable to verify checksum for App.ni.exe *** ERROR: Module load completed but symbols could not be loaded for App.ni.exe Unable to load image mscorlib.ni.dll, Win32 error 0n2 *** WARNING: Unable to verify checksum for mscorlib.ni.dll 

Update : trying to run ngen App.exe (works as admin) I get the following error:

 > ngen.exe install App.exe [snip] This operation is only valid in the context of an app container. (Exception from HRESULT: 0x8007109A) 

What is the application container in this case? Where can I run it?

Refresh . After long troubleshooting and finding out the root cause using other tools, I came to the conclusion that the minidump file that I have does not contain this information. Regardless of persuasion, it can cause the debugger to load characters for files.

+8
c # windows-store-apps windows-store windbg
source share
2 answers

Take a look at the description of the Ngen.exe tool (Own Image Generator) :

Custom Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates its own images, which are files containing compiled processor code for a specific processor, and installs them in its own image cache on the local computer. The runtime can use native images from the cache instead of using the just-in-time (JIT) compiler to compile the original assembly.

Keep this in mind processor-specific machine code .

If you need to debug minidump with NI images, you need to get characters (PDB) for these images. PDBs for a managed DLL will not work, you need to create a Native PDB for an NGEN image using the NGEN tool, see the article Creating an NGEN PDB for profiling Reports . This article is about how to get NGEN pdbs for a Profiler report, but it is the same for debugging.

As I said, NGEN is processor-specific machine code , so to create a PDB for them:

Since NGENd images are native, it is important that you use a copy of ngen.exe that matches the architecture of the application you are profiling (x86 / x64 / ARM). For example, if the application runs on 64 bit in Windows 8 RTM, you will need to reference a copy of ngen.exe in "C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319"

UPDATE:

From the link above:

If you uninstalled the profiled Windows Store application, you must do this on the machine on which the application was run during profiling. This will not work if you do this on the machine you are viewing in the report.

So it looks like you need to generate ngen modules / pdbs on the same machine where you got minidump.

Windows has its own image service , which generates ni-images for Windows Store applications after a while, when you install them on your computer. You can try using procmon.exe to find out how Windows generates ngen modules for applications from the Windows Store. (just use the filter for the process name with ngen.exe).

+9
source share

NI = own image. In other words, the NGEN'd images, as indicated above, indicate.

+3
source share

All Articles