Error when application run from a network share: That assembly does not allow partially trusted callers!

Recently had a customer who faced this issue when his application is run from a network share. The exception information is as follows … ************** Exception Text ************** System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for dataConfiguration: That assembly does not allow partially trusted callers. (G:SystemBackofficeCitrix2008MediaExplorerRev2008ProdMfm.MediaExplorer.exe.Config line 28) —> System.Security.SecurityException: That assembly does […]
Continue reading…

 

Debugging/Comparing Managed or .net memory dumps using Visual Studio 2013

Visual Studio 2013 comes with a new feature called “Debug Managed Memory” this feature also allows to compare managed memory usage across two dumps.  Read on… This is how you would open a .net 4.5 memory dump in Visual Studio… So for the purpose of this blog I’ve created memory dumps of a managed application […]
Continue reading…

 

[Debugging] Application crash after migration from Visual Studio 2005 to 2008

Had a customer whose application was crashing after migration from Visual Studio 2005 to Visual Studio 2008. He had the crash dumps as well. The crash call stack had some CRT string format functions like vsprintf. This gave to us a fair inkling that parameters passed in are wrong. Customer had a format string, something […]
Continue reading…

 

[Debugging] How to find length of a CString string in application memory or in a dump

Recently a colleague of mine asked where’s the length of CString string stored in memory. Hmm so lets dig around. Please note I’ve declared the following CString object in my code… CString TestCString = _T(“Nibu is testing CString”); If you dump CString type in the debugger we see following… 0:000> dt TestCStringLocal var @ 0xb4fcd4 […]
Continue reading…

 

[Debugging] Application high memory usage on Windows 8.1

Recently had a customer who was complaining about high memory usage on Windows 8.1. The application consumed about 140 MB on a Windows 8.1 OS as compared to a meager 3 to 4 MB on a Windows 7 or 8 machine. Hmm interesting. Being experienced in troubleshooting for sometime now this smelled to me like […]
Continue reading…

 

C/C++ Interview Question: Why Executable file differs in size

I have following code snippets… Code snippet 1 int arr[1000000]; int main() { return arr[0]; } Code snippet 2: int arr[1000000] = {10}; int main() { return arr[0]; } After compilation of the above snippets the output exe differs in size. The second snippet’s executable is much bigger in size than the first snippet’s executable. […]
Continue reading…

 

[AgeStore] Clearing old debugging symbol files from downstream symbol store

About AgeStore It’s a good habit to clear out old symbol files. Debugging tools for windows comes with a built in tool which help us do this. The tool is named ‘AgeStore’. AgeStore executes in three modes… -date=mm-dd-yy    – deletes all files that were last accessed before the specified date. -days=xx                – deletes all files […]
Continue reading…

 

Stepping/tracing to next function or branching call

While stepping through disassembly code you might have wondered if there is a way to jump directly to the next branching statement or the next call or the next return statement instruction. The answer is: Yes there are some very useful ones, the following table of commands is taken from WinDbg documentation. p (Step) Debug […]
Continue reading…

 

Turning off filename and line number display in the debugger

Filename and line number information is stored inside private symbols (.pdb file). So if private symbols are available the debugger will try figuring out the line number information. Note: public symbols doesn’t have line number information. So the question I’ve heard people new to windbg ask is how to turn off line number display. What’s […]
Continue reading…