MediaPortal Forums HTPC/MediaCenter

Sponsored Ads

Go Back   MediaPortal Forum » General » Newcomers Forum

Newcomers Forum The newcomers forum is for members who may be: new to forums; intimidated by our size; or just learning about some of the many topics being discussed on the MediaPortal Forum.

Reply
 
LinkBack Thread Tools Display Modes
Old 2008-05-09, 03:08   #1 (permalink)
Portal Member
 
Join Date: Jul 2006
Posts: 90
Thanks: 1
Thanked 0 Times in 0 Posts


Default my thread of questions about tvengine3 api

Machine "Master":
TV-Server Version: rev 19010
Database: MySQL Community 5.0.51b
Operating System: Windows XP Pro SP3 with updated psisdecd.dll's
1. TV Card Type: DVB-T FTA

Machine "Client":
TsReader: latest
Network: WiFi 'N' @ 300mbps

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.ArrayList.ArrayListEnumeratorSi mple.MoveNext()
at Gentle.Framework.PersistenceBroker.GetCacheResult( String statementHashKey)
at Gentle.Framework.PersistenceBroker.RetrieveList(Ty pe type, Key key, IList result, IDbConnection conn, IDbTransaction tr)
at Gentle.Framework.Broker.RetrieveList(Type type)
at TvDatabase.Channel.ListAll()
at TvDatabase.TvBusinessLayer.get_Channels()

any ideas? i dont know how to reproduce the problem reliably, it's sorta random.

Last edited by binary64; 2008-05-09 at 03:10. Reason: Automerged Doublepost
binary64 is online now   Reply With Quote
Old 2008-05-09, 07:04   #2 (permalink)
Portal Developer
 
Join Date: Jan 2005
Age: 30
Posts: 2,159
Thanks: 51
Thanked 52 Times in 42 Posts


Default

Are you able to trigger this error with the MP's own tve3 client?
__________________
http://day2.no-ip.org/

"Commy64 - The problem there is that Oprah was on. MP tried to save you by blanking the screen"
tourettes is offline   Reply With Quote
Old 2008-05-14, 16:09   #3 (permalink)
Portal Member
 
Join Date: Jul 2006
Posts: 90
Thanks: 1
Thanked 0 Times in 0 Posts


Default

No, I am using the tvengine3 API. But hopefully just because MP's client doesn't reveal this bug, it will still be treated as a bug.
binary64 is online now   Reply With Quote
Old 2008-05-14, 18:52   #4 (permalink)
Portal Developer
 
Join Date: Jan 2005
Age: 30
Posts: 2,159
Thanks: 51
Thanked 52 Times in 42 Posts


Default

Quote:
Originally Posted by binary64 View Post
No, I am using the tvengine3 API. But hopefully just because MP's client doesn't reveal this bug, it will still be treated as a bug.
Sure it will be looked at some point, but the priority is first on those bugs that are affecting MP users.
__________________
http://day2.no-ip.org/

"Commy64 - The problem there is that Oprah was on. MP tried to save you by blanking the screen"
tourettes is offline   Reply With Quote
Old 2008-05-22, 01:45   #5 (permalink)
Portal Member
 
Join Date: Jul 2006
Posts: 90
Thanks: 1
Thanked 0 Times in 0 Posts


Default

New Issue
=========

If I do:

result = TvControl.RemoteControl.Instance.StartTimeShifting (ref m_user, 33, out card);
result = TvControl.RemoteControl.Instance.StartTimeShifting (ref m_user, 33, out card);
result = TvControl.RemoteControl.Instance.StartTimeShifting (ref m_user, 33, out card);

the results are: NoVideoAudioDetected, UnknownChannel, UnknownChannel (incorrect/bug imo)

notes:
* yes, the channel is off-air at this time
* m_user means it's a member field, in ctor, m_user = new User("Test", true);

However,
TvControl.User methodlocal_user;
methodlocal_user = new TvControl.User("Test", true);
result = TvControl.RemoteControl.Instance.StartTimeShifting (ref methodlocal_user, 33, out card);
methodlocal_user = new TvControl.User("Test", true);
result = TvControl.RemoteControl.Instance.StartTimeShifting (ref methodlocal_user, 33, out card);
methodlocal_user = new TvControl.User("Test", true);
result = TvControl.RemoteControl.Instance.StartTimeShifting (ref methodlocal_user, 33, out card);

the results are: NoVideoAudioDetected, NoVideoAudioDetected, NoVideoAudioDetected (correct imo)


I would prefer to use the member field method (this.user, created only in ctor). Any ideas why this difference is happening? Is this a bug or a .Net thing I don't know about?

The reason I'm doing this, is when user idles on an off-air channel, i am polling it every few seconds so that when the channel finally comes back on air, it immedately starts playing.

Thanks!
binary64 is online now   Reply With Quote
Old 2008-05-22, 02:27   #6 (permalink)
Portal Member
 
Join Date: Jul 2006
Posts: 90
Thanks: 1
Thanked 0 Times in 0 Posts


Exclamation

Bug Report
=========

XP Pro SP3 + dvbfix
The tvservice service unexpectedly terminated. Logs attached.
I think this is related to my above post here - the User() and its usage.
Also what is the consequence of multiple slaves using the same string for the Username at once?
Attached Files
File Type: zip log.zip (832.8 KB, 2 views)
binary64 is online now   Reply With Quote
Old 2008-05-30, 13:36   #7 (permalink)
rtv
Portal Developer
 
rtv's Avatar
 
Join Date: Apr 2005
Location: Osnabruck
Posts: 2,477
Thanks: 74
Thanked 95 Times in 69 Posts

Country:

My System

Default

Quote:
Originally Posted by binary64 View Post
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.ArrayList.ArrayListEnumeratorSi mple.MoveNext()

at TvDatabase.TvBusinessLayer.get_Channels()

any ideas? i dont know how to reproduce the problem reliably, it's sorta random.
Definately a threading problem on your side.
rtv is offline   Reply With Quote
Old 2008-05-30, 14:22   #8 (permalink)
Portal Member
 
Join Date: Jul 2006
Posts: 90
Thanks: 1
Thanked 0 Times in 0 Posts


Default

even though the crash was on the server-side of the remoting? plus tcp/ip is by its nature serialized
binary64 is online now   Reply With Quote
Old 2008-05-30, 16:36   #9 (permalink)
rtv
Portal Developer
 
rtv's Avatar
 
Join Date: Apr 2005
Location: Osnabruck
Posts: 2,477
Thanks: 74
Thanked 95 Times in 69 Posts

Country:

My System

Default

Doesn't matter at all.
Look for some C# how-to to multi-threaded programming.
A quick sample app where:
Thread 1 loops through an ArrayList (or any list implementing IEnumerable).
Thread 2 modifies any items of the list while Thread 1 is still running.

Will show you the issue.
Most likely you aren't aware why you trigger this because MP's gentle DB statements are executed from the same thread which communicates with the "businesslayer". You however most likely use an own thread to query it's methods.

Quote:
Originally Posted by binary64 View Post
even though the crash was on the server-side of the remoting? plus tcp/ip is by its nature serialized
Of course since TVE is Thread 1 of this example (which throws InvalidOperationException then).
rtv is offline   Reply With Quote
Old 2008-05-30, 19:53   #10 (permalink)
SMa
Portal Member
 
SMa's Avatar
 
Join Date: Jun 2007
Location: Ghent
Age: 20
Posts: 67
Thanks: 2
Thanked 0 Times in 0 Posts

Country:

My System

Send a message via MSN to SMa
Default

Quote:
Originally Posted by binary64 View Post
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
...
any ideas? i dont know how to reproduce the problem reliably, it's sorta random.
=> Race condition
SMa is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to record via api? binary64 Development 1 2008-05-26 06:34
About new MP2 API fabriceD06 Help on Development 2 2008-01-30 14:27
General Issues and Questions re: Tvengine3 jako77 General Talk 7 2007-08-10 05:15
[Discussion Thread] Info-Thread for Designers infinityloop Skins 0 2007-07-16 11:02


All times are GMT +1. The time now is 05:14.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel ©2004-2008, jvbPlugin

Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress