kayvonf820 / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Multi-threading issue in ExtensionCollection #273

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I get this exception sometimes when using the YouTube API in an ASP.NET app:

System.NullReferenceException: Object reference not set to an instance of an 
object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, 
Boolean add)
   at Google.GData.Extensions.ExtensionCollection`1.CtorXmlName()
   at Google.GData.Extensions.MediaRss.MediaGroup.get_Thumbnails()
   at Google.YouTube.Video.get_Thumbnails()

I'm almost sure this is the problem: 
http://stackoverflow.com/questions/1320621

Original issue reported on code.google.com by mauricio...@gmail.com on 31 Aug 2009 at 9:17

GoogleCodeExporter commented 8 years ago
Yeah, that is true. But there are other dictionaries used in the code as well 
and
they share the same issues, because those issues are part of the .NET runtime. 
As
said in the stackoverflow thread above, you need to implement your own 
syncronisation.

Or am i missing something?

Original comment by fman...@gmail.com on 8 Oct 2009 at 9:14

GoogleCodeExporter commented 8 years ago
The consumer of Google.YouTube.Video (that would be me) never sees any 
dictionary. I 
only ask for a video's thumbnails. The dictionary is internal, so I think the 
synchronization code should also be internal.

Original comment by mauricio...@gmail.com on 15 Oct 2009 at 8:38