MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Help on Development » Quality Assurance (Bugreports) » Archive » Bug Reports » 0.2.3.0 final and SVN Builds


0.2.3.0 final and SVN Builds Post bugs you have found in 0.2.3.0 final or any SVN-Snapshot here.

Reply
 
Thread Tools Display Modes
Old 2008-01-19, 22:43   #1 (permalink)
Portal Member
 
Join Date: Mar 2007
Posts: 53
Thanks: 4
Thanked 3 Times in 3 Posts

Country:


not a bug Impossible to run MediaPortal under debugger?

TV-Server Version: Latest SVN
MediaPortal Version: Latest SVN
MediaPortal Skin: BlueTwo Wide
Windows Version: XP SP2
CPU Type: Intel DualCore 7300
HDD:
Memory: 2 GB
Motherboard: HP
Motherboard Chipset: HP
Motherboard Bios:
Video Card: 8600M GS
Video Card Driver: Latest 157X by Nvidia
Sound Card:
Sound Card AC3:
Sound Card Driver:
1. TV Card: FireDTV
1. TV Card Type: DVB-T
1. TV Card Driver: Latest
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: Nvidia PureVIdeo
MPEG2 Audio Codec: AC3Filter
Satelite/CableTV Provider:
HTPC Case:
Cooling:
Power Supply:
Remote:
TV: Samsung LCD
TV - HTPC Connection: HDMI

Hi!

I would like to create a monitoring application that launches MediaPortal and monitors it for exceptions and terminations and restarts it. It will also close MediaPortal if the power button on the remote is pressed and then go to sleep mode (since this is not possible to do when TV is active in MediaPortal. You have to turn off TV before you can go to standby).

The strategy I was planning on was to have my app launch mediaportal using either of the following ways:

Launch Mediaportal using CreateProcess with option DEBUG_PROCESS.
Launch Mediaportal using CreateProcess with no options and then attach to it with function DebugActiveProcess.

When just using CreateProcess with no options, MediaPortal starts perfectly fine!
When trying option one (DEBUG_PROCESS), a process called MediaPortal is started, but no window appears. After doing some research it seems as this is quite common when it comes to .NET apps. The solution is to use DebugActiveProcess instead

When trying this approach, Mediaportal is launched just fine using createprocess, but as soon as I do the DebugActiveProcess, Mediaportal crashes. My monitoring app catches first a wild, undocumented exception type, and then a DEBUG_EXIT_PROCESS event.

Do you have any code in Mediaportal that is "debugger aware" and wont run under a debugger? Or do you have any clue on why this does not work? If I use my monitor app to launch any other "standard" windows app, it works perfectly!

I have seen that sometimes the TestTool pops up after a crash. How is this done? What mechanism is used to call TestTool in case of a crash?

Best Regards
mrstef is offline   Reply With Quote
Old 2008-01-19, 23:40   #2 (permalink)
Portal Developer
 
Join Date: Jan 2005
Age: 30
Posts: 3,737
Thanks: 98
Thanked 137 Times in 109 Posts


Default

MP itself shouldn't have anything that will cause attaching the debugger to fail. For example following works perfectly: http://www.msfn.org/board/Creating-m...ps-t90244.html

Some comercial (almost all) are detecting the debuggers precence and are behaving in different ways (for example nvidia's codecs will do uninstall as oon as they see the debugger attached to the process.). But that should be the cause only if the video playback is running when attaching the debugger.
__________________
http://day2.no-ip.org/

"Commy64 - The problem there is that Oprah was on. MP tried to save you by blanking the screen"
tourettes is online now   Reply With Quote
Old 2008-01-21, 09:34   #3 (permalink)
Portal Member
 
Join Date: Mar 2007
Posts: 53
Thanks: 4
Thanked 3 Times in 3 Posts

Country:


Default

Hm, I do run Nvidias MPEG2 decoders, but as you say, these shouldn't be activated until I start playing some video/TV. But MP crashes imediately even when idle at "home" screen. I wonder what could be loaded at that point that prevents the debug,...

Well, I guess this is not really a way forward anyhow since I don't think people want to give up their commercial MPEG/h264 codecs,...

I'll have to find some other way of detecting a crash. I cannot check wether MP is actually running or not, because most of the time if you do get a crash, the MP process is still there. Sometimes it freezes, but it seldom exits,...

I still wonder how you test tool detects a crash though! I found a few other interesting API:s when searching for a solution, but it seems as this only works inside a process. You cannot use it to detect exceptions in other processes. But it might be something you could use internally in MP to detect exceptions and handle them (log the error to find root cause and then see if it might be possible to recover, and if it is not, terminate MP to allow a quick restart) instead of forwarding the exception to Windows exception handler?

http://msdn2.microsoft.com/en-us/lib...34(VS.85).aspx
mrstef is offline   Reply With Quote
Reply

Bookmarks

Tags
debugger, impossible, run

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant run Mediaportal Maverick182 General Support 7 2008-07-20 19:31
Run MediaPortal on Vista Ultimate dizzydone MediaPortal 1 Talk 17 2008-06-22 03:59
Can I run MediaPortal on this? Passa General Support 12 2006-10-09 11:59
Run from debugger results in DirectX crash GaryW General Development (no feature request here!) 0 2006-10-03 14:53
Help me run Mediaportal thanhh83 General Support 5 2006-08-24 03:03


All times are GMT +1. The time now is 13:47.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden