Wiki Navigation
- Loading...
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.
Requirements
- 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
On 15 Sep 2010, chefkoch requested that this content be reviewed and verified: "is this still needed? can we link to MS anywhere for those files?- 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
On 15 Sep 2010, chefkoch requested that this content be reviewed and verified: remove the last sentence ?
Start debugging
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.
MediaPortal: Catching the exceptions
- Start MP in windowed mode
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
- Make sure that new (timestamped) folder is created under C:\MP_crash_dumps
- Switch MP to fullscreen and do something...
- Wait for a crash and let the log & memory dump file to be created
MediaPortal: Pinpointing the code that causes a hang...
- Start MP in windowed mode (and do not go to full screen!)
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
- Do something and wait for a hang
- Check out the memory dump and logs
TVServer: Catch a channel scan crash
- 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
- Scan for channels
- Check out the memory dump and logs
example batch file
@echo off pushd "%ProgramFiles%\Debugging Tools for Windows (x86)\" cscript adplus.vbs -crash -pn TVService.exe -quiet -o E:\TVServer_crash_dumps
Troubleshooting
_NT_SYMBOL_PATH environment variable
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
On 15 Sep 2010, chefkoch suggested that this content is incomplete and needs to be expanded by defining a style for how to write down the name of variables and its content.
event log file
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
On 15 Sep 2010, chefkoch suggested that this content is incomplete and needs to be expanded by adding ""or empty log or remove log !?""Click OK, to close the dialog and start at point 2. again with
System
instead of
Application
This page has no comments.