Missing Maps

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Missing Maps

Postby adam.price » Fri May 13, 2011 11:48 am

I seem to be having a very strange problem with SA6 (build 153).

I have two applications (Admin & Client) which have their own separate SA projects. We have a build machine which after building our code, it executes SA via the command line for each project. Both projects are marked as release.

The maps are stored on a network drive and we store all the reports in a SQL database.

After the build is complete I check in the maps folder and the new maps are there for each application, and in the database it has an entry in the Builds table.

The applications work correctly, but when I cause it throw a fatal error. SA catches it correctly and asks me to send a report of which I do.

On looking at the reports I get two results:

Admin - The report is all correct and the stack trace has been de-obfuscated, but it reports

Map not available: This error report is incomplete because SmartAssembly was not able to retrieve the associated map. The following file was missing:
{3F0D7A55-52ED-44E3-8328-E1F2865CA871}

Either the assembly was not built on the computer that decrypted the report, or the assembly was not marked as released and the associated map was deleted.


Client- The report has not been de-obfuscated and again the same error as above (but a different map file).

I then check in the map directory and both map files exist. Does anyone know what could have gone wrong?
adam.price
 
Posts: 4
Joined: Fri May 13, 2011 11:32 am

Postby Brian Donahue » Fri May 13, 2011 4:57 pm

Thanks for your post. Yes, you will have to do quite a bit of work to figure out what went wrong, though.

First, check the database's Information table to find the location of the .samap files. Then check that folder and see if the file {3F0D7A55-52ED-44E3-8328-E1F2865CA871}.samap is there. If not, you can stop. You'll need this file, so either restore it from backup or make sure dbo.Information is pointing at the right share. The file may have been deleted because the assembly was not marked as released.

To check this, look at the builds table, find AssemblyID 3F0D7A55-52ED-44E3-8328-E1F2865CA871 and check the Released column, which should be 1. If it's 0, the .samap may have been deleted as part of the non-released builds cleanup (180 days?).

If your files are not being marked as released, then we should look into that. The commandline or build process may not be working correctly.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby adam.price » Mon May 16, 2011 2:34 pm

I have checked what you said. The file {3F0D7A55-52ED-44E3-8328-E1F2865CA871}.samap exists in the maps folder.

And In the database against row where AssemblyId = '3F0D7A55-52ED-44E3-8328-E1F2865CA871' Release is set to 1.

What's very funny is even though both reports say the map is missing. I can copy lines from the stacktrace and manually paste them into the 'Decode Stacktrace window' and the correct output is given.
adam.price
 
Posts: 4
Joined: Fri May 13, 2011 11:32 am

Postby james.davies » Mon May 16, 2011 4:08 pm

Hi Adam,

The "Decode Stack Trace" window actually doesn't use the MAP file , so that will be why that works even though Smart Assembly cannot find the MAP file

The Error Reporting Stack Trace decoding does use the MAP file (so I am surprised if the Error report stack trace from Admin looks decoded (perhaps you are looking at some code that was never obfuscated?)

Can you double-check that the MAP files are in the directory that specified in the "Options" section of Smart Assembly (under "Reports Database Options") ?
Can you please also check that the MAP files were created at the time of the latest build ?
Thanks,
James Davies
Technical Support Engineer
Red Gate Software
james.davies
 
Posts: 46
Joined: Tue Apr 19, 2011 2:39 pm

Postby adam.price » Tue May 17, 2011 10:09 am

Yes the folder does contain the MAP file and yes it was created at the time the build with the same AssemblyID was done. The map folder the file is in, is the one referenced in the "Options" section. The build has always been obfuscated and marked as released.

Are any verbose log files generated or I can turn on to see exactly what its doing? Maybe that may shed some light on the problem?
adam.price
 
Posts: 4
Joined: Fri May 13, 2011 11:32 am

Postby james.davies » Tue May 17, 2011 2:51 pm

Hi,

This is a difficult one , as you seem to be doing everything correctly. Unfortunately logging is not available is the current version of Smart Assembly.

Can you double check that the application you are running is the one you have just built with the build script ? (This problem could be caused by using a shortcut to an old version of the application)
Thanks,
James Davies
Technical Support Engineer
Red Gate Software
james.davies
 
Posts: 46
Joined: Tue Apr 19, 2011 2:39 pm

Postby james.davies » Tue May 17, 2011 4:44 pm

Are you are viewing the error reports on the same machine that is building the assembly? If not, can you check that the machine you are viewing from has permission/access to the map files folder.

The problem could be related to the build script itself. Can you try building the assembly using the SmartAssembly GUI ? Do you see the same problem ?
Thanks,
James Davies
Technical Support Engineer
Red Gate Software
james.davies
 
Posts: 46
Joined: Tue Apr 19, 2011 2:39 pm

Postby adam.price » Fri May 20, 2011 2:33 pm

Yes we are running the correct application. The folder does have permission to allow all users read/write.

Edit: The problem seems to have just disappeared now. We can't reproduce it at all. All exceptions caught are fully decoded with no warnings. I don't know what's changed
adam.price
 
Posts: 4
Joined: Fri May 13, 2011 11:32 am


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests