Search code examples
c++visual-studio-2010mfcmap-files

Using MAP file VS2010 MFC


I've developed a program by a customer who's experiencing when he do a certain operation. This isn't happening always on the same place and on the same data and, moreover, it is not happening nor in my local developing machine nor in my test Virtual Machine (which is free of all developing equipment).

Given these conditions, I've decided to compile with MAP (enabled in Configuring Properties-> Linker->Debugger with option /MAP) to see which function is causing crash.

If I've correctly understood, when the program crash I've to check down the offset error and then, search in my MAP under the column RVA+BASE:

     Address                         Publics by Value                                      Rva+Base       Lib:Object
 0001:00037af0       ?PersonalizzaPlancia@CDlgGestioneDatiProgetto@MosaicoDialogs@@IAEXXZ 00438af0 f   DlgGestioneDatiProgetto.obj
 0001:00038000       ?SalvaTemporanei@CDlgGestioneDatiProgetto@MosaicoDialogs@@IAEXXZ 00439000 f   DlgGestioneDatiProgetto.obj

Actually, my crash happens at offset:

00038C90
So I should think that it's somewhere in the method:

MosaicoDialogs::CDlgGestioneDatiProgetto::PersonalizzaPlancia

but this is not absolutely possible, so assuming that the computer can't be wrong, I'm the one who's doing it bad.

Can someone explain me how to read MAP in correct way?


Solution

  • Reading of MAP files to find out crash location is explained nicely in this code project article.

    http://www.codeproject.com/Articles/3472/Finding-crash-information-using-the-MAP-file

    Hope helps.