powerscheduler and minidisplay

Discussion in '1.0.1 and SVN Builds' started by jameson_uk, May 5, 2009.

  1. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    TV-Server Version: 1.0.1
    MediaPortal Version: 1.0.1
    MediaPortal Skin: Blue3 Wide
    Windows Version: XP Pro - SP3
    CPU Type: Intel E4500 2x2.2Ghz
    HDD: WD green 500Gb
    Memory: 2Gb DDR2-6400
    Motherboard: GIGABYTE GA-E7AUM-DS2H
    Video Card: Geforce 9400 IGP
    Video Card Driver: Nvidia 178.33
    Sound Card: Nvidia HDMI
    Sound Card AC3:
    Sound Card Driver: IGP
    1. TV Card: Pinnacle 7010ix
    1. TV Card Type: Dual DVB-S and Dual 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
    MPEG2 Audio Codec: NVidia
    h.264 Video Codec: PowerDVD 7
    Satelite/CableTV Provider: Freeview (DVB-T)
    HTPC Case: Antec Fusion
    Cooling: Scythe Mini-Ninja
    Power Supply: Antec 300W
    Remote: MCE
    TV: Panasonic 42PZ80B
    TV - HTPC Connection: HDMI

    There appears to be a bug arround resuming from S3 standby (via powerscheduler) and the mini-display plugin (iMon LCD)



    Sometimes when I resume HTPC I am greeted by a black screen (or at least most of it is) and MP is locked up. I have to go into TaskManager and end task on mediaportal. Once I have done this it appears that a thread handing round from when it went into standby is then released and the machine goes into standby. I can then resume machine and carry on as normal (I have to manually start MP though).

    Been trying to narrow this down for ages without much luck but may have come across something.

    In the 22nd March logs in mediaportal.log you have
    Code (Text):
    1. 2009-03-22 12:03:39.093750 [Info.][MiniDisplay]: iMONLCDg.CloseLcd(): completed
    2. 2009-03-22 12:03:39.093750 [Info.][MiniDisplay]: (IDisplay) iMONLCDg.CleanUp(): completed
    3. 2009-03-22 12:03:39.093750 [Info.][MiniDisplay]: MiniDisplay.DisplayHandler.Stop(): completed
    These logs were taken just after resume whilst MP was not working and before MP was killed

    in the 5th May logs you have
    Code (Text):
    1. 2009-05-05 11:46:36.687500 [Info.][MiniDisplay]: iMONLCDg.CloseLcd(): completed
    2. 2009-05-05 11:46:36.687500 [Info.][MiniDisplay]: (IDisplay) iMONLCDg.CleanUp(): completed
    3. 2009-05-05 11:46:36.687500 [Info.][MiniDisplay]: MiniDisplay.DisplayHandler.Stop(): completed
    4. 2009-05-05 11:46:36.765625 [Debug][MPMain]: iMONLCDg.Dispose(): called
    5. 2009-05-05 11:46:36.765625 [Debug][MPMain]: iMONLCDg.Dispose(): completed
    6. 2009-05-05 11:46:36.765625 [Info.][MPMain]: MiniDisplay.Stop(): completed
    Which looks like on 22nd March mini-display was not closed down cleanly

    The machine did go into standby at 12:03 on 22nd March and was woken manually at 20:11.
    It appears that an exception was thrown during resume (from tvserver_error.log)
    Code (Text):
    1. 2009-03-22 20:11:23.859375 [PowerEventThread]: TV service PowerEventThread: Exception: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    2.    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
    3.    at TvService.Service1.OnPowerEvent(PowerEventType powerStatus)
    4.    at TvService.Service1.PowerEventThreadWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
    5.    at TvService.Service1.GetMessageA(MSG& msg, IntPtr hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
    6.    at TvService.Service1.PowerEventThread()
    Also every power event seems to have at least two rows in the event log (although the actual message is not very helpful). except this event at 20:11 which only has one.


    Being trying to replicate this for ages now but only happens intermittently. This is the one last issue prevent MP being the best thing ever :)

    Is there anything I can do to help narrow down this issue?
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. rtv
    • Premium Supporter

    rtv Retired Team Member

    Joined:
    April 7, 2005
    Messages:
    3,622
    Likes Received:
    301
    Occupation:
    CTO at ES2000
    Location:
    Osnabruck
    Ratings:
    +301 / 0
    Home Country:
    Germany Germany
    Show System Specs
    This is a timing issue. The code triggering the issue above does not seem to be thread-safe.
     
  4. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Any idea which bit of code? Is this a MP issue, a mini-display issue or a PowerScheduler issue?
     
  5. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Seem to be able to replicate this. Set to record two concurrent programs on same channel every Thursday night, first 21:30 => 22:00 then 22:00 => 22:30

    I run comskip after each recording and I have comskip.exe added to the list of programs to prevent standby in TV powerscheduler config.

    Just turned on now to see the black screen. I have recently changed the default monitor res from 1650x1050 to 1920x1200 in the registry so this time I got a completely black screen. Desktop res is 1920x1080 but this only kicks in when the amp is on as it is HDMI and connection is only picked up when amp is on. Without this desktop res is set to default monitor res.

    Last night all I got in MediaPortal.log (did log gathering just before I killed MP and my machine got sent into standby)
    Code (Text):
    1. 2009-05-07 21:26:15.718750 [Info.][MPMain]: Main: WM_POWERBROADCAST: 18
    2. 2009-05-07 21:26:15.718750 [Info.][MPMain]: Main: Windows has resumed from standby or hibernate mode to handle a requested event
    3. 2009-05-07 21:26:15.718750 [Debug][MPMain]: Main: OnResumeAutomatic - set lock for syncronous inits
    4. 2009-05-07 21:26:15.718750 [Info.][MPMain]: Main: OnResumeAutomatic - Starting recorder
    5. 2009-05-07 21:26:15.718750 [Info.][MPMain]: TvCardCollection: TVPlugin detected -> no TVE2 card setup
    6. 2009-05-07 21:26:15.718750 [Info.][CommandProcessor]: Commandprocessor: Starting
    7. 2009-05-07 21:26:15.718750 [Debug][CommandProcessor]: Commandprocessor: Running
    8. 2009-05-07 21:26:15.718750 [Info.][MPMain]: Recorder: start
    9. 2009-05-07 21:26:17.203125 [Info.][MPMain]: Main: OnResumeAutomatic - Done
    10. 2009-05-07 22:44:45.984375 [Info.][MPMain]: Main: WM_POWERBROADCAST: 0
    11. 2009-05-07 22:44:45.984375 [Info.][MPMain]: Main: Windows is requesting hibernate mode - UI bit: 0
    12. 2009-05-07 22:45:26.828125 [Info.][MPMain]: Main: WM_POWERBROADCAST: 4
    13. 2009-05-07 22:45:26.828125 [Info.][MPMain]: Main: Windows is suspending
    again looks dodgy as in event log I have two rows for every event bar the original wake to record at 21:26.

    Going to see if I can replicate this at will now but please try and fix this as it is seriously lowering WAF :(
     
  6. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,742
    Likes Received:
    1,417
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,846 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    I've had this exact problem too, black screen when resume from S3, but can be aborted by ending task on MP process. I was forced to disable minidisplay plugin.

    My setup FYI is XP SP3 / MP 1.0 Final / Imon Manager 7.2 / Silverstone LC16-M case with Imon VFD / ATI 8.12
     
  7. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Does your machine go into standby once you end task?

    I have the iMon VFD too so guessing it might be an issue specific to this ?
     
  8. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,742
    Likes Received:
    1,417
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,846 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    I can't remember if it jumps back into standby or not, as I've had the minidisplay disabled for the last month or longer.
     
  9. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Is this going to be raised as a bug. I can replicate this at will (well sort of....) Every Thursday I record two back to back programs as above. The machine wakes to do the recording and then sleeps afterwards. When I come back in on Friday night it has the black screen of death and end tasking MP causes the machine to go straight to standby.

    I have tried replicating this by scheduling other back to back recordings but have not managed to replciate it yet (just every Thursday night...)

    Turning off the mini-display pluging appears to solve the issue so I am assuming the code in there that is called when the machine goes to standby is not quite right.

    Please please please can this be fixed :)
     
  10. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,742
    Likes Received:
    1,417
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,846 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    i noticed it's only a bug when waking from a schedule rather than waking from s3 manually.
    you should make logs for waking from S3 manually and waking from S3 with crash from scheduling.
    then see if there is any difference in the log files.
    it wont get fixed or logged as a bug without any .log files
     
  11. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    I have now upgraded to 1.0.2 and have just got same issue.

    Logs attached again. Is there anything I can do to help with this? MP is marked as not responding when I get machine to resume and I am guessing that when I end task it will also kill the threads writing the logs so presumably most useful info is gone? I am create logs before or after killing MP but not sure which is best?

    as you can see whole mediaportal.log file is
    Code (Text):
    1. 2009-05-19 21:56:15.859375 [Info.][MPMain]: Main: WM_POWERBROADCAST: 18
    2. 2009-05-19 21:56:15.859375 [Info.][MPMain]: Main: Windows has resumed from standby or hibernate mode to handle a requested event
    3. 2009-05-19 21:56:15.859375 [Debug][MPMain]: Main: OnResumeAutomatic - set lock for syncronous inits
    4. 2009-05-19 21:56:15.859375 [Info.][MPMain]: Main: OnResumeAutomatic - Starting recorder
    5. 2009-05-19 21:56:15.859375 [Info.][MPMain]: TvCardCollection: TVPlugin detected -> no TVE2 card setup
    6. 2009-05-19 21:56:15.859375 [Info.][CommandProcessor]: Commandprocessor: Starting
    7. 2009-05-19 21:56:15.875000 [Debug][CommandProcessor]: Commandprocessor: Running
    8. 2009-05-19 21:56:15.875000 [Info.][MPMain]: Recorder: start
    9. 2009-05-19 21:56:16.015625 [Info.][MPMain]: Main: OnResumeAutomatic - Done
    10. 2009-05-19 22:58:15.937500 [Info.][MPMain]: Main: WM_POWERBROADCAST: 0
    11. 2009-05-19 22:58:15.953125 [Info.][MPMain]: Main: Windows is requesting hibernate mode - UI bit: 0
    12. 2009-05-19 22:58:36.968750 [Info.][MPMain]: Main: WM_POWERBROADCAST: 4
    13. 2009-05-19 22:58:36.968750 [Info.][MPMain]: Main: Windows is suspending
    But the problem occured just now. If I go into the log folder after resume the folder is empty, if I go in after restarting MP I just get the standard bits about MP starting but any info about the actual crash has gone
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!