SOLVED - Powerscheduler stopped working, won't suspend = MySQL DB corruption

Discussion in 'General Support' started by feizex, January 20, 2011.

  1. feizex

    feizex Portal Member

    Joined:
    July 26, 2009
    Messages:
    24
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Hi,

    It took me a while to find this, so I thought I'd share.

    I had MP setup and powerscheduler working fine. PC would suspend OK and wake up to record.

    But then I had problems with a RAID card locking up the system and crashing it.

    It turns out that the crashes had caused corruption in the MpTvDb database.



    The corruption prevented powersheduler from suspending the machine (even though it thought it was successful). Pressing Sleep on my keyboard was seemingly ignored (except for log entries showing that powersheduler had tried to suspend). Strangely if I stopped TVservice my computer would immediately suspend.

    I only found the solution because I got the following error message and decided to investigate.

    Code (Text):
    1. 2011-01-20 23:33:26.656645 [Powerscheduler Timer(9)]: Powerscheduler: Exception in OnTimerElapsed(): The columns idProgram, idChannel, startTime, endTime, title, description, genre, state, originalAirDate, seriesNum, episodeNum, episodePart, episodeName, starRating, classification, parentalRating in table Program do not exist.
    2.  
    Note that initially when I had the problem this did not show - I must not have corrupted this table yet. In either case using mysql to repair the table fixed it. I was getting this error though. Perhaps it was an indicator...

    Code (Text):
    1. 2011-01-20 20:27:39.075000 [PowerEventThread(8)]: TV service PowerEventThread: Exception: System.NullReferenceException: Object reference not set to an instance of an object.
    2.    at TvService.TVController.get_CanSuspend()
    3.    at TvService.Service1.OnPowerEventHandler(PowerEventType powerStatus)
    4.    at TvService.Service1.OnPowerEvent(PowerEventType powerStatus)
    5.    at TvService.Service1.PowerEventThreadWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
    6.    at TvService.Service1.GetMessageA(MSG& msg, IntPtr hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
    7.    at TvService.Service1.PowerEventThread()
    Going to MySql Workbench and trying to run a query resulted in the attached error showing..
    Code (Text):
    1.  
    2. Error Code: 145
    3. Table '.\mptvdb\program' is marked as crashed and should be repaired.
    This was a pretty good tip that there was database corruption. A bit of googling and playing later lead to me running the following command which fixed the tables. After that NO PROBLEM! FIXED! I pressed suspend and it worked straight away.

    Regards,
    Feizex. :D

    Code (Text):
    1. C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqlcheck --database MpTvDb -r --au
    2. to-repair --user root --password
    3. Enter password: ***********
    4. mptvdb.canceledschedule                            OK
    5. mptvdb.card                                        OK
    6. mptvdb.cardgroup                                   OK
    7. mptvdb.cardgroupmap                                OK
    8. mptvdb.channel                                     OK
    9. mptvdb.channelgroup                                OK
    10. mptvdb.channellinkagemap                           OK
    11. mptvdb.channelmap                                  OK
    12. mptvdb.conflict                                    OK
    13. mptvdb.diseqcmotor                                 OK
    14. mptvdb.favorite                                    OK
    15. mptvdb.groupmap                                    OK
    16. mptvdb.history                                     OK
    17. mptvdb.keyword                                     OK
    18. mptvdb.keywordmap                                  OK
    19. mptvdb.personaltvguidemap                          OK
    20. mptvdb.program
    21. warning  : Number of rows changed from 5898 to 5857
    22. status   : OK
    23. mptvdb.radiochannelgroup                           OK
    24. mptvdb.radiogroupmap                               OK
    25. mptvdb.recording
    26. warning  : Number of rows changed from 23 to 22
    27. status   : OK
    28. mptvdb.satellite                                   OK
    29. mptvdb.schedule                                    OK
    30. mptvdb.server                                      OK
    31. mptvdb.setting                                     OK
    32. mptvdb.timespan                                    OK
    33. mptvdb.tuningdetail                                OK
    34. mptvdb.tvmoviemapping                              OK
    35. mptvdb.version                                     OK
     

    Attached Files:

    • screenshot.PNG
      screenshot.PNG
      File size:
      85.9 KB
      Uploaded:
      January 20, 2011
      Views:
      109
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. hwahrmann
    • Team MediaPortal

    hwahrmann Development Group

    Joined:
    September 15, 2004
    Messages:
    4,495
    Likes Received:
    1,638
    Gender:
    Male
    Location:
    Vienna, Austria
    Ratings:
    +2,264 / 1
    Home Country:
    Austria Austria
    Good report, but posted in wrong sub forum. i will move it.
     
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!