
This short guide will help all testers (and developers also) to create memory dumps of MP process when something nasty happens on C++ side and MP decides to bail out without any visible traces. Note that this should be pretty tester & HTPC friendly as it's not requiring Visual Studio to be installed on the PC.
Install Debugging Tools for Windows 32-bit Version or Debugging Tools for Windows 64-bit Version, depending on which version of Windows you are using.
Create a directory called c:\MP_crash_dumps.
Copy attached MS VC debug DLLs to MP root directory
Change MP to use MPV/MPA mpeg2 codecs (also ffdshow for h264). Reason for this is that codecs are detecting the debug process presence and are refusing to load.
Use debug version of TsReader.ax or any other C++ side component that is suspected to be causing the crash. You can find those debug version in mediaportal svn DirectShowFilters\bin\Debug trunk. At later stages we should have up to date debug binaries for all C++ components (including the symbol files
You can run the command everytime using the run box and the command prompt or you create batch files to simply rerun the commands when needed.
Goto START > Run > type
cmd /k pushd "%ProgramFiles%\Debugging Tools for Windows (x86)\"
In command prompt start
cscript adplus.vbs -crash -pn MediaPortal.exe -quiet -o c:\MP_crash_dumps
Wait for a crash and let the log & memory dump file to be created
Goto START > Run > type
cmd /k pushd "%ProgramFiles%\Debugging Tools for Windows (x86)\"
In command prompt start
cscript adplus.vbs -hang -pn MediaPortal.exe -quiet -o c:\MP_crash_dumps
Start SetupTv.exe
Goto START > Run > type
cmd /k pushd "%ProgramFiles%\Debugging Tools for Windows (x86)\"
In command prompt start
cscript adplus.vbs -crash -pn TVService.exe -quiet -o c:\MP_crash_dumps
@echo off pushd "%ProgramFiles%\Debugging Tools for Windows (x86)\" cscript adplus.vbs -crash -pn TVService.exe -quiet -o E:\TVServer_crash_dumps
If you get the following warning, you have to set an environment variable.
WARNING! An '_NT_SYMBOL_PATH' environment variable is not set.
Goto Control Panel -> System.
Switch to tab Advanced and click environment variables.
Add a new variable to system level (2nd group).
Name for variable: _NT_SYMBOL_PATH Value for variable: symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols
If you get one of the following errors you have to delete event log.
%ProgramFiles%\Debugging Tools for Windows (x86)\adplus.vbs(1259, 3) (null): Event log file is out of space. %ProgramFiles%\Debugging Tools for Windows (x86)\adplus.vbs(1259, 3) (null): Die Ereignisprotokolldatei ist voll.
Goto START -> Run -> type eventvwr.exe
Choose Application -> right click -> Properties
Change maximum log size to 102400 KB.
Click button Delete log
Click OK, to close the dialog and start at point 2. again with System instead of Application