#610 Error downloading feedlist from Newsgator Online

v1.3.0.38
closed
Dare Obasanjo
5
2012-09-23
2005-11-28
Simeon Pilgrim
No

When I use RSS Bandit (1.3.0.38) to download my
feedlist (created today with same build but at work, on
new Newsgator account) I get an error message saying...

Feedlist download failed with error:
Object reference not set to an instance of an object.

With todays CVS
CurrentWork\Source\RssBandit\WinGui\RemoteFeedlistThreadHandler.cs
in the void RunDownload(SynchronizationFormat
syncFormat) function on line 572 there are these three
lines

                        string unseen  =

feed.GetElementWildCardValue("http://newsgator.com/schema/opml",
"unseen");
string feedUrl = feed.link;

                        if(unseen.ToLower().Equals("true")){

for the first feed retreived.
unseen = null
feedUrl =
"http://www.example.com/no-url-for-rss-feed-provided-in-imported-opml"

So I changed the if logic to:

if(unseen != null && unseen.ToLower().Equals("true")){

and the crash stopped.

I originally had 39 feeds, and I trimmed this down to 2
for testing. When there where only 2 feeds, I got the
above values for unseen & feedUrl about 6 times.

Discussion

  • Simeon Pilgrim
    Simeon Pilgrim
    2005-11-28

    Logged In: YES
    user_id=960840

    The unseen != null stops the crash, but induces the threads
    to block forever due to the
    Interlocked.Increment(ref ngosFeedsToDownload) in the for loop.

    So I changed my code to:

                        for(int i = myFeeds.feed.Count; i-->0;
    

    Interlocked.Increment(ref ngosFeedsToDownload)){

                            feedsFeed feed = myFeeds.feed[i] as feedsFeed;
    
                            string unseen  =
    

    feed.GetElementWildCardValue("http://newsgator.com/schema/opml",
    "unseen");
    string feedUrl = feed.link;

                            if( unseen != null )
                            {
                                if(unseen.ToLower().Equals("true"))
                                {
    
                                    NgosDownloadFeedState state = new
    

    NgosDownloadFeedState();
    state.feed = feed;
    state.fws = fws;

                                    PriorityThreadPool.QueueUserWorkItem(new
    

    WaitCallback(this.NgosDownloadFeedToGetReadItems), state,
    (int) ThreadPriority.Normal);
    }

                                syncedFeeds.feed.Add(feed); 
                            }
                            else
                            {
                                Interlocked.Decrement(ref ngosFeedsToDownload);
                            }
                        }
    

    It works but feels ugly.

     
  • Dare Obasanjo
    Dare Obasanjo
    2005-12-01

    Logged In: YES
    user_id=24549

    There is a bug in your fix but it did point me in the
    right direction.

    Thanks.

     
  • Simeon Pilgrim
    Simeon Pilgrim
    2005-12-02

    Logged In: YES
    user_id=960840

    Is the bug when the unseen is set too false, that the item
    is added to the feeds to sync? because that's the only
    change to my fix, but that was also in the original code
    also? Is that the cause of the "Fixed: Downloading feedlists
    from Newsgator never stops." bug?