New motherboard, now tuner configuration does not work (1 Viewer)

fe31nz

Portal Member
July 3, 2008
5
0
Home Country
New Zealand New Zealand
I was running Mediaportal 1.5.0 under Windows 7 64-bit and everything was working. Then I upgraded to a new motherboard and CPU, which of course meant that the tuners all moved to different addresses on the bus, so TV Server did not recognise them any more. So after I got the new motherboard working, I ran SetupTV.exe, and could see the old tuners marked as "Unknown" and the new tuners. So I deleted all the Unknown tuners, and moved the new ones around to match what my previous setup was. But after the TV Server restart, the SetupTV program is not working properly any more - I can see my tuner setup on the TV Servers page, but all the other options have disappeared and I can not do any more configuration. I have uploaded a screenshot of SetupTV.exe as TunerConfig.jpg.

The playback side of things is all still working fine - I can see all my old recordings and play and delete them, so TV Server is still fine. It seems to just be a problem with SetupTV.exe. The SetupTV.log file shows an error:

Code:
[2013-10-27 05:41:16,801] [Log    ] [SetupTv  ] [INFO ] - ---- SetupTv v1.5.0.0 is starting up on Windows 7 ( Service Pack 1 ) [6.1.7601.65536]
[2013-10-27 05:41:16,811] [Log    ] [SetupTv  ] [INFO ] - ---- check connection with database ----
[2013-10-27 05:41:16,971] [Log    ] [SetupTv  ] [INFO ] - SetupDatabaseForm: Added dependency for TvService - MySQL
[2013-10-27 05:41:16,971] [Log    ] [SetupTv  ] [INFO ] - ---- check if database needs to be updated/created ----
[2013-10-27 05:41:16,978] [Log    ] [SetupTv  ] [INFO ] - ---- upgrade database schema ----
[2013-10-27 05:41:16,978] [Log    ] [SetupTv  ] [INFO ] - ---- check if tvservice is running ----
[2013-10-27 05:41:17,115] [Log    ] [SetupTv  ] [DEBUG] - RemoteControl: RegisterChannel first called in Domain SetupTv.exe for thread SetupTv with id 1
[2013-10-27 05:41:21,118] [Log    ] [SetupTv  ] [INFO ] - Set loglevel to: Debug
[2013-10-27 05:41:21,825] [Log    ] [SetupTv  ] [ERROR] - Failed to startup cause of exception
[2013-10-27 05:41:21,837] [Log    ] [SetupTv  ] [ERROR] - Exception  :System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
  at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
  at SetupTv.Sections.CardDvbT.SetDefaults()
  at SetupTv.Sections.CardDvbT.Init()
  at SetupTv.Sections.CardDvbT..ctor(String name, Int32 cardNumber)
  at SetupTv.SetupTvSettingsForm.AddServerTvCards(Servers servers, IList`1 dbsServers, Boolean reloaded)
  at SetupTv.SetupTvSettingsForm.Init()
  at SetupTv.SetupTvSettingsForm..ctor(Boolean ShowAdvancedSettings)

I presume that error is the cause of my problem, but I have no idea how to fix it. I have checked the database and mysqlcheck says it is fine. I am hoping someone can point me at some data somewhere in a config file or the database that I can change so that I can get past this problem and configure the tuners again.
 

Attachments

  • TunerConfig.jpg
    TunerConfig.jpg
    210.2 KB

fe31nz

Portal Member
July 3, 2008
5
0
Home Country
New Zealand New Zealand
I have been doing some debugging to try to track down this problem. I got the zip of the Mediaportal 1.5.0 source code and set it up in Vistual Studio, then set a breakpoint at the place where the exception is happening and stepped from there. It turns out that the exception is being triggered when the value for the "dvbt10Country" setting is read from the database. Its value is "NOTFOUND", which is of course not an integer, so when Int32.Parse is called with that value, the exception results. So it seems that somehow my database had bad values for the "dvbt%" settings. Here is the result of the SQL query "select * from setting where tag like 'dvbt%' order by tag;" on my database:

+-----------+------------------------+----------+
| idSetting | tag | value |
+-----------+------------------------+----------+
| 535 | dvbt10Country | NOTFOUND |
| 536 | dvbt10creategroups | NOTFOUND |
| 568 | dvbt11Country | NOTFOUND |
| 569 | dvbt11creategroups | NOTFOUND |
| 601 | dvbt12Country | NOTFOUND |
| 602 | dvbt12creategroups | NOTFOUND |
| 38 | dvbt2Bandwidth | 8 |
| 35 | dvbt2Country | 23 |
| 39 | dvbt2creategroups | false |
| 40 | dvbt2createsignalgroup | false |
| 37 | dvbt2Freq | 306000 |
| 36 | dvbt2Region | 11 |
| 44 | dvbt3Bandwidth | 8 |
| 41 | dvbt3Country | 23 |
| 45 | dvbt3creategroups | false |
| 46 | dvbt3createsignalgroup | false |
| 43 | dvbt3Freq | 306000 |
| 42 | dvbt3Region | 11 |
| 385 | dvbt4Country | NOTFOUND |
| 386 | dvbt4creategroups | NOTFOUND |
| 418 | dvbt5Country | NOTFOUND |
| 419 | dvbt5creategroups | NOTFOUND |
| 352 | dvbt6Country | NOTFOUND |
| 353 | dvbt6creategroups | NOTFOUND |
| 227 | dvbt7Bandwidth | 8 |
| 224 | dvbt7Country | 23 |
| 228 | dvbt7creategroups | false |
| 229 | dvbt7createsignalgroup | false |
| 226 | dvbt7Freq | 306000 |
| 225 | dvbt7Region | 11 |
| 634 | dvbt8Country | NOTFOUND |
| 635 | dvbt8creategroups | NOTFOUND |
| 667 | dvbt9Country | NOTFOUND |
| 668 | dvbt9creategroups | NOTFOUND |
+-----------+------------------------+----------+
34 rows in set (0.00 sec)


To prevent the exception from happening, I have now manually changed all the NOTFOUND values to 23 (for dvbt<n>Country) or false (for dvbt<n>creategroups). After that, SetupTV is now able to run normally and I have been able to scan for channels and get the tuners working again.

I wonder what other problems might be lurking in my database also, if those values were wrong? What exactly are those dvbt% settings used for? What are the correct vlues for those settings? What will the bad data or my manual changes do to things - will they cause any other problems? And how did the bad data happen?
 

Jay_UK

Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    I had a similar issue (a year or two back), where I moved cards/motherboards - TVserver reported unknown cards and showed the new ones (like with yours), but TVserver just wouldn't play ball (don't think it was crashing, just wouldn't tune/map correctly - struggling to remember)

    My cards were DVBS not DVBT. I found multiple broken links and issues within the tables. I couldn't be bothered to fully debug, so simply dropped the DB and let TVServer/Config recreate it.

    If you do find logic/coding/parameter issues please post them here (or even patches to fix the issue) :)

    J.
     

    Users who are viewing this thread

    Top Bottom