Reply to thread

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]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.

[/CODE]


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]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.

   at TvService.TVController.get_CanSuspend()

   at TvService.Service1.OnPowerEventHandler(PowerEventType powerStatus)

   at TvService.Service1.OnPowerEvent(PowerEventType powerStatus)

   at TvService.Service1.PowerEventThreadWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)

   at TvService.Service1.GetMessageA(MSG& msg, IntPtr hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)

   at TvService.Service1.PowerEventThread()[/CODE]


Going to MySql Workbench and trying to run a query resulted in the attached error showing..

[CODE]

Error Code: 145

Table '.\mptvdb\program' is marked as crashed and should be repaired.[/CODE]


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]C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqlcheck --database MpTvDb -r --au

to-repair --user root --password

Enter password: ***********

mptvdb.canceledschedule                            OK

mptvdb.card                                        OK

mptvdb.cardgroup                                   OK

mptvdb.cardgroupmap                                OK

mptvdb.channel                                     OK

mptvdb.channelgroup                                OK

mptvdb.channellinkagemap                           OK

mptvdb.channelmap                                  OK

mptvdb.conflict                                    OK

mptvdb.diseqcmotor                                 OK

mptvdb.favorite                                    OK

mptvdb.groupmap                                    OK

mptvdb.history                                     OK

mptvdb.keyword                                     OK

mptvdb.keywordmap                                  OK

mptvdb.personaltvguidemap                          OK

mptvdb.program

warning  : Number of rows changed from 5898 to 5857

status   : OK

mptvdb.radiochannelgroup                           OK

mptvdb.radiogroupmap                               OK

mptvdb.recording

warning  : Number of rows changed from 23 to 22

status   : OK

mptvdb.satellite                                   OK

mptvdb.schedule                                    OK

mptvdb.server                                      OK

mptvdb.setting                                     OK

mptvdb.timespan                                    OK

mptvdb.tuningdetail                                OK

mptvdb.tvmoviemapping                              OK

mptvdb.version                                     OK[/CODE]


Top Bottom