SOLVED - Powerscheduler stopped working, won't suspend = MySQL DB corruption (1 Viewer)


Portal Member
July 26, 2009

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.

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

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()
Going to MySql Workbench and trying to run a query resulted in the attached error showing..
Error Code: 145
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.

Feizex. :D

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                                     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
warning  : Number of rows changed from 5898 to 5857
status   : OK
mptvdb.radiochannelgroup                           OK
mptvdb.radiogroupmap                               OK
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


Users Who Are Viewing This Thread (Users: 0, Guests: 1)

OP Similar threads Forum Replies Date
cladinshadows85 timeshift error <solved> General 2
F [Solved] Movies View with Thumbnail Layou General Support 4
squidina [solved] - MediaPortal 1.22 won't start even with new install General Support 4
J [solved] Lag on client-only PCs General 0
joecrow [solved] (Solved) Win 10 1809 Woes General Support 4
L [solved] MovPicNFO mit NAS? Video & DVD 1
joecrow (Solved) EPG wrong General Support 18
D [SOLVED] Radio issue in MediaPortal 1.20 Pre-Release 1.20 Pre Release 47
TheBatfink [solved] Homescreen tile labels are offset Titanius 3
bta489 [solved] System goes to Standby during Amazon Prime Playback OnlineVideos 2
framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
D Media Portal wake schedule General Support 29
toricred Using TMM, How to Stop Importer From Going to The Movie Database for Data General 1
mickb [solved] Mediaportal Stops working General Support 5
D [solved] Movie artwork download stopped working Submit: Bug Reports 9
M MP 2.2.3 Unable to play .ts recordings and MediaPortal stops working for TV viewing General 31
ajs [solved] 4982: Why this error hard stop when Mediaportal start? MediaPortal 1 3
rsbrux IR has stopped working Remotes 4
2BitSculptor MP 1.23.. music stops playing General Support 6
M MP1 stops responding after Starting Plugins General Support 14
fredco [solved] Large import not working Moving Pictures 15
W Recordings will not stop General Support 8
S [solved] Live TV playing stopped General 13
R [solved] Watching a record during recording stops sometimes 2.2 Archive 30
Similar threads

Top Bottom