For The Record - The rule-based scheduling suite (1 Viewer)

BKCH

MP Donator
  • Premium Supporter
  • July 25, 2005
    287
    12
    Sydney
    Home Country
    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(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at Gentle.Framework.SqlStatement.Execute(IDbConnection conn, IDbTransaction tr)
    --- End of inner exception stack trace ---
    at Gentle.Framework.SqlStatement.Execute(IDbConnection conn, IDbTransaction tr)
    at Gentle.Framework.Transaction.Execute(SqlStatement stmt)
    at TvScheduler.Business.DbSession.Execute(String sql)
    at TvScheduler.Business.Guide.DeleteOldProgramsOperation.Execute()
    at TvScheduler.Business.Guide.GuideFacade.DeleteOldPrograms()
    at TvScheduler.ServiceImplementation.TvGuideService.DeleteOldPrograms()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(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at Gentle.Framework.SqlStatement.Execute(IDbConnection 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 :)
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    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.
     

    BKCH

    MP Donator
  • Premium Supporter
  • July 25, 2005
    287
    12
    Sydney
    Home Country
    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 :)
     

    BKCH

    MP Donator
  • Premium Supporter
  • July 25, 2005
    287
    12
    Sydney
    Home Country
    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(ExecutionContext 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(ExecutionContext 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.
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    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.
     

    americantabl

    Portal Member
    April 8, 2008
    9
    0
    Home Country
    Sweden Sweden
    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
     

    BKCH

    MP Donator
  • Premium Supporter
  • July 25, 2005
    287
    12
    Sydney
    Home Country
    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

    MP Donator
  • Premium Supporter
  • July 25, 2005
    287
    12
    Sydney
    Home Country
    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 :)
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    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 :D

    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.
     

    petsa

    MP Donator
  • Premium Supporter
  • January 23, 2007
    588
    15
    Stockholm
    Home Country
    Sweden Sweden
    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
     

    Users who are viewing this thread

    Top Bottom