home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Language specific support
Deutsches MediaPortal Forum
MediaPortal 1
Allgemeines Supportforum
ChannelState.DoSetChannelStates: An unknown error occured while setting channel states
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="SiggiK" data-source="post: 1083617" data-attributes="member: 98245"><p>Hi,</p><p></p><p>der thread ist zwar schon etwas älter, aber da mich die Einträge im Error-Log auch schon eine Weile stören (mindestens seit der Version 1.5 und damit unabhängig von der Datenbankversion) habe ich 'mal Fehlersuche betrieben. Solche Fehler haben ja mitunter unangenehme Nebeneffekt.</p><p></p><p>Die Ursache ist der Thread-Abbruch, der, wenn er während einer Datenbank Operation auftritt zu dieser Ausnahme führt.</p><p></p><p>[CODE=C#] private void AbortChannelStates()</p><p> {</p><p> lock (_threadlock)</p><p> {</p><p> if (_setChannelStatesThread != null && _setChannelStatesThread.IsAlive)</p><p> {</p><p> _setChannelStatesThread.Abort();</p><p> }</p><p> }</p><p> }</p><p></p><p> public void SetChannelStates(IDictionary<int, ITvCardHandler> cards, ICollection<Channel> channels,</p><p> IController tvController)</p><p> {</p><p> if (channels == null)</p><p> {</p><p> return;</p><p> }</p><p> AbortChannelStates();</p><p> //call the real work as a thread in order to avoid slower channel changes.</p><p> // find all users </p><p> ICollection<IUser> allUsers = GetActiveUsers(cards);</p><p> ThreadStart starter = () => DoSetChannelStates(cards, channels, allUsers, tvController);</p><p> lock (_threadlock)</p><p> {</p><p> _setChannelStatesThread = new Thread(starter)</p><p> {</p><p> Name = "Channel state thread",</p><p> IsBackground = true,</p><p> Priority = ThreadPriority.Lowest</p><p> };</p><p> _setChannelStatesThread.Start();</p><p> }</p><p> }</p><p></p><p>[/CODE]</p><p></p><p>Ich habe den Code angepasst und eine neue TVService.exe erstellt. Jetzt ist das Error.log lehr auch nach einer Weile "Test Channels".</p><p></p><p>[ATTACH=full]150912[/ATTACH]</p><p></p><p>Im Anhang die geänderte ChannelStates.cs und TVService.exe (Version 1.7 !).</p><p></p><p></p><p>Leider habe ich null Ahnung wie man geänderten Code in das Projekt einbringt, vielleicht kann ja jemand helfen?</p><p></p><p>Viele Grüße SiggiK</p></blockquote><p></p>
[QUOTE="SiggiK, post: 1083617, member: 98245"] Hi, der thread ist zwar schon etwas älter, aber da mich die Einträge im Error-Log auch schon eine Weile stören (mindestens seit der Version 1.5 und damit unabhängig von der Datenbankversion) habe ich 'mal Fehlersuche betrieben. Solche Fehler haben ja mitunter unangenehme Nebeneffekt. Die Ursache ist der Thread-Abbruch, der, wenn er während einer Datenbank Operation auftritt zu dieser Ausnahme führt. [CODE=C#] private void AbortChannelStates() { lock (_threadlock) { if (_setChannelStatesThread != null && _setChannelStatesThread.IsAlive) { _setChannelStatesThread.Abort(); } } } public void SetChannelStates(IDictionary<int, ITvCardHandler> cards, ICollection<Channel> channels, IController tvController) { if (channels == null) { return; } AbortChannelStates(); //call the real work as a thread in order to avoid slower channel changes. // find all users ICollection<IUser> allUsers = GetActiveUsers(cards); ThreadStart starter = () => DoSetChannelStates(cards, channels, allUsers, tvController); lock (_threadlock) { _setChannelStatesThread = new Thread(starter) { Name = "Channel state thread", IsBackground = true, Priority = ThreadPriority.Lowest }; _setChannelStatesThread.Start(); } } [/CODE] Ich habe den Code angepasst und eine neue TVService.exe erstellt. Jetzt ist das Error.log lehr auch nach einer Weile "Test Channels". [ATTACH=full]150912[/ATTACH] Im Anhang die geänderte ChannelStates.cs und TVService.exe (Version 1.7 !). Leider habe ich null Ahnung wie man geänderten Code in das Projekt einbringt, vielleicht kann ja jemand helfen? Viele Grüße SiggiK [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Language specific support
Deutsches MediaPortal Forum
MediaPortal 1
Allgemeines Supportforum
ChannelState.DoSetChannelStates: An unknown error occured while setting channel states
Contact us
RSS
Top
Bottom