MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server 1 » Help on Development » Development


Development You want to code something for the TV-Server? Share it in here!

Reply
 
LinkBack (6) Thread Tools Display Modes
Old 2008-04-13, 09:25   #811 (permalink)
MP Donator
 
Join Date: Jul 2005
Location: Sydney
Posts: 181
Thanks: 3
Thanked 3 Times in 3 Posts

Country:


Default

Hi there - I seem to have a bit of a problem (no doubt caused by upgrading/downgrading etc.).

I've used TV Scheduler successfully before but now whenever I install it on my TV Server machine I start getting a lot of application errors in my event viewer:

TV Scheduler gives me these:

#1: TvScheduler.Entities.TvSchedulerException: Database error, concurrent changes made by another user?
#2:
Error: StatementErrorUnclassified
Gentle.Common.GentleException: DELETE FROM GuideProgram WHERE StartTime < CONVERT(DATETIME, '2008.04.12', 102) ---> System.Data.SqlClient.SqlException: Unable to find index entry in index ID 1, of table 197575742, in database 'TvScheduler'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.
A severe error occurred on the current command. The results, if any, should be discarded.
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Gentle.Framework.SqlStatement.Execute(IDbConnectio n conn, IDbTransaction tr)
--- End of inner exception stack trace ---
at Gentle.Framework.SqlStatement.Execute(IDbConnectio n conn, IDbTransaction tr)
at Gentle.Framework.Transaction.Execute(SqlStatement stmt)
at TvScheduler.Business.DbSession.Execute(String sql)
at TvScheduler.Business.Guide.DeleteOldProgramsOperat ion.Execute()
at TvScheduler.Business.Guide.GuideFacade.DeleteOldPr ograms()
at TvScheduler.ServiceImplementation.TvGuideService.D eleteOldPrograms()System.Data.SqlClient.SqlExcepti on: Unable to find index entry in index ID 1, of table 197575742, in database 'TvScheduler'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.
A severe error occurred on the current command. The results, if any, should be discarded.
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Gentle.Framework.SqlStatement.Execute(IDbConnectio n conn, IDbTransaction tr)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


AND MSSQL gives me:

Unable to find index entry in index ID 1, of table 197575742, in database 'TvScheduler'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.


I'm sure there is a simple process to resolve the inconsistency between DBs - I'm just not sure what it is!!!! Any ideas??

Thanks very much - can't wait to use this great tool again
BKCH is offline   Reply With Quote
Old 2008-04-13, 09:34   #812 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 523
Thanks: 0
Thanked 29 Times in 16 Posts

Country:

My System

Default

Quote:
Originally Posted by BKCH View Post
Hi there - I seem to have a bit of a problem (no doubt caused by upgrading/downgrading etc.).
Seems your database got corrupt somehow.

What you could do is try with SQL Management Studio to actually do what it says: "Run DBCC CHECKDB or DBCC CHECKTABLE".

Or worst case scenario: export all your schedules from the management console. Delete the database with SQL Management Studio and run Create.sql in TV Scheduler's installation directory.

Then import your TV Guide first en import your schedules again.

You will lose all information about your recorded programs though Unless you export the data in the TvRecording table and import that again afterwards.
dvdfreak is online now   Reply With Quote
Old 2008-04-13, 09:41   #813 (permalink)
MP Donator
 
Join Date: Jul 2005
Location: Sydney
Posts: 181
Thanks: 3
Thanked 3 Times in 3 Posts

Country:


Default

Hi There - thanks for the ultra quick response

I took the plunge and deleted the TVScheduler database then recreated and I seem to be moving in the right direction - no more errors at this point...

Update: all working perfectly

Last edited by BKCH; 2008-04-13 at 10:16. Reason: Automerged Doublepost
BKCH is offline   Reply With Quote
Old 2008-04-13, 15:43   #814 (permalink)
MP Donator
 
Join Date: Jul 2005
Location: Sydney
Posts: 181
Thanks: 3
Thanked 3 Times in 3 Posts

Country:


Default Update: problem on boot

Hi - So I think I have one last issue.

All working fine untill I reboot - when I reboot with the plugin enabled in TV server my TV service crashes with the following error in tv.log (when I disable the plugin problem goes away):

2008-04-14 00:29:37.531250 [5]: Plugin:TV Movie EPG import disabled
2008-04-14 00:29:37.531250 [5]: Plugin:TV Scheduler Sync started
2008-04-14 00:29:37.546875 [5]: TvSchedulerSync: Start
2008-04-14 00:30:09.968750 [5]: Plugin:XmlTv started
2008-04-14 00:30:09.968750 [5]: plugin: xmltv started
2008-04-14 00:30:10.062500 [5]: Plugin:XmlTv started all
2008-04-14 00:30:10.062500 [5]: XmlTvImporter: NOT registered with PowerScheduler EPG handler
2008-04-14 00:30:10.062500 [5]: Controller: setup HeartBeat Monitor
2008-04-14 00:30:10.062500 [5]: Controller: initalized
2008-04-14 00:30:10.093750 [TvSchedulerSync]: Tvservice stopped due to a app domain exception System.NullReferenceException: Object reference not set to an instance of an object.
at TvScheduler.ServiceAgents.TvSchedulerServiceAgent. .ctor()
at TvSchedulerSync.TvSchedulerSyncThread.Run()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
2008-04-14 00:30:10.093750 [TvSchedulerSyncEpg]: Tvservice stopped due to a app domain exception System.NullReferenceException: Object reference not set to an instance of an object.
at TvScheduler.ServiceAgents.TvSchedulerServiceAgent. .ctor()
at TvSchedulerSync.TvSchedulerSyncEpgThread.Run()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
2008-04-14 00:30:10.093750 [13]: Controller: Heartbeat Monitor initiated; max timeout allowed is 30 sec.
2008-04-14 00:30:10.312500 [5]: TV service started

Seems to work fine if I then enable the TV service after boot up so I'm wondering if it's a boot order thing...?

Any ideas??? thanks in advance.
BKCH is offline   Reply With Quote
Old 2008-04-13, 15:53   #815 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 523
Thanks: 0
Thanked 29 Times in 16 Posts

Country:

My System

Default

Quote:
Originally Posted by BKCH View Post
Seems to work fine if I then enable the TV service after boot up so I'm wondering if it's a boot order thing...?

Any ideas??? thanks in advance.
Yes, looks like a boot order thing. TV Scheduler should be running first.

FYI, in "what comes next" this will no longer be a problem. TVE3 will be used in a different way with a different kind of plugin.
dvdfreak is online now   Reply With Quote
Old 2008-04-13, 15:57   #816 (permalink)
Portal User
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Quote:
Originally Posted by americantabl View Post
Hi and great work!

Your plug-in looked were interesting so I thought I give it a try.

I installed TvScheduler yesterday and are now expericing the following error on start up in the log book,

“.Net Runtime 2.0 Error

Eventid 5000

EventType clr20r3, P1 tvservice.exe, P2 1.0.0.18557, P3 47f6ecda, P4 tvscheduler.serviceagents, P5 1.0.15.0, P6 4797b14d, P7 24, P8 0, P9 system.nullreferenceexception, P10 NIL.”

Also when trying to start regular Mediaportal and watch Live Tv, the CPU goes to almost 100 % with the main process being System and user SYSTEM and the picture stutters. After a while the picture hangs and CPU goes back to normal usage.

Before installing your software the Tv Server run without a problem for couple of days. Made 3 recordings and also had no problem watching the Live TV.

Any ideas what could have gone wrong for me?


This is run on an Intel Pentium 2160 1,6 GHz dualcore machine with 2 GB of memory. Operating system being WinXp Pro SP2 (Swedish) fully updated, including .Net Framework 1-3 including service packs. The database is SQL Server Express.

The Mediaportal version is 2008-04-05 and TV3 Server the same date.

Followed your instructions on the first page. All channel successfully linked in the TV Server Plugin.

This is run on an Intel Pentium 2160 1,6 GHz dualcore machine with 2 GB of memory. Tv card is a Hauppauge PVR 150 MCE running the UK drivers package 4.2. Videocard is Ati x1300 with latest 8.3 drivers.

Best regards
At
Sweden
An update, I uninstalled both TvScheduler and Tv3 server, reinstalled just the tv server. And to my surpise I still expiericed this

"Also when trying to start regular Mediaportal and watch Live Tv, the CPU goes to almost 100 % with the main process being System and user SYSTEM and the picture stutters. After a while the picture hangs and CPU goes back to normal usage."

It turns out that the reason was that I had moved the recordings from e:\recordings to the share \\media\recordings (same directory but now the unc path) in the recording properties in the tv server configuration. Strange but now the Live Tv works again. Will try the TvScheduler later when there is an new version for the upcoming Mediaportal release.

Best regards
at
Sweden

Last edited by americantabl; 2008-04-14 at 08:30.
americantabl is offline   Reply With Quote
Old 2008-04-14, 04:42   #817 (permalink)
MP Donator
 
Join Date: Jul 2005
Location: Sydney
Posts: 181
Thanks: 3
Thanked 3 Times in 3 Posts

Country:


Default

Quote:
Originally Posted by dvdfreak View Post
Quote:
Originally Posted by BKCH View Post
Seems to work fine if I then enable the TV service after boot up so I'm wondering if it's a boot order thing...?

Any ideas??? thanks in advance.
Yes, looks like a boot order thing. TV Scheduler should be running first.

FYI, in "what comes next" this will no longer be a problem. TVE3 will be used in a different way with a different kind of plugin.
Thanks dvdfreak - do you know if there is any way to control the boot order? (eg impose a 1-2 minute delay after boot before TV Service starts???)
BKCH is offline   Reply With Quote
Old 2008-04-14, 10:15   #818 (permalink)
MP Donator
 
Join Date: Jul 2005
Location: Sydney
Posts: 181
Thanks: 3
Thanked 3 Times in 3 Posts

Country:


Default

So I've got a quick and dirty solution - in the windows service for TV server I've just configured the system to restart the service if it fails - not pretty but it solves the problem
BKCH is offline   Reply With Quote
Old 2008-04-14, 10:24   #819 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 523
Thanks: 0
Thanked 29 Times in 16 Posts

Country:

My System

Default

There's a different solution: you can add "TvScheduler" to the list of service TvServer depends on, but I think the only way to do that is to use regedit.exe.

Go to:

Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TvService
Edit the "DependOnService" key and add TvScheduler to the list.

Reboot en see if it worked

Quote:
Originally Posted by americantabl View Post
It turns out that the reason was that I had moved the recordings from e:\recordings to the share \\media\recordings (same directory but now the unc path) in the recording properties in the tv server configuration. Strange but now the Live Tv works again. Will try the TvScheduler later when there is an new version for the upcoming Mediaportal release.
Interesting find! So TVE3 can't handle a UNC path anymore

The good news is that in the next incarnation of TV Scheduler this won't be a problem anymore: you'll be able to leave the setting as a local path.

Last edited by dvdfreak; 2008-04-14 at 13:36. Reason: Automerged Doublepost
dvdfreak is online now   Reply With Quote
Old 2008-04-20, 06:12   #820 (permalink)
MP Donator
 
Join Date: Jan 2007
Location: Stockholm
Posts: 483
Thanks: 5
Thanked 10 Times in 10 Posts

Country:

My System

Default

Hi dvdfreak,

I've also had problems with the latest version (.15) during reboot. The previous version I used (.12) worked just fine.

I tried your suggestion about boot-order and edited the dependencies with regedit. Now TVService waits for TVScheduler as it should but then I get an error from TVScheduler that the database can not be reached. TVService gets stuck and I still have to restart TVServe manually. If I disable TVScheduler all is well.

I've attached the Program and System logs from the reboot.

In the Systems log I can see that at 06:34:02 TVScheduler stopped and directly after TVService was put on hold because it depends on TVScheduler (as expected). Then at 06:34.08 TVScheduler is started but I can not find any info that TVService is started as well... Until 06:39:24 when I started TVService manually.

In the Program log I can see that TVScheduler is started at 06:34:08 (the same as in System log) and at 06:35:16 MS SQL report that the database has been started.

Then the interesting starts...

At 06:35:33 TVScheduler reports that the SQL service could not be reached and that (translated) "the time-out was exceeded before the task was completed or the server is not responding.", see the full log in the attachment.

Any ideas what may cause this? I'm running on an Intel 2.4 GHz C2D so if this is because the MS SQL server is slow then I don't know what would be required for this to not time-out.

If I disable TVScheduler and reboot it works fine so it has a dependency on this service somehow.

/Peter
Attached Files
File Type: rar TVScheduler.rar (22.8 KB, 0 views)
petsa is offline   Reply With Quote
Reply

Bookmarks

Tags
rulebased, service, tvscheduler

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 On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://forum.team-mediaportal.com/development-91/rule-based-tvscheduler-service-26158/
Posted By For Type Date
Tekniska tankar HTPC This thread Refback 2008-08-28 20:49
Tekniska tankar Saker jag tänkt testa (när jag fćr tid&#8230;) This thread Refback 2008-08-20 15:22
Tekniska tankar Mediaportal This thread Refback 2008-08-14 13:08
DvbDream Community :: View topic - External control for TV Scheduler plugin This thread Refback 2008-07-22 17:03
Tekniska tankar This thread Refback 2008-07-21 20:52
Extensions-TV-Server-Plugins - MediaPortal Documentation This thread Refback 2008-07-21 09:41

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug Report: Error when editing logo rule ccMatrix My TVSeries 1 2007-05-09 09:29
One remote to rule them all? fathead General Support 5 2006-01-06 17:37
Media Portal Developers Rule! Jaguarius MediaPortal 1 Talk 1 2005-11-11 16:00


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


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress