This project has moved and is read-only. For the latest updates, please go here.

System.IO.EndOfStreamException on Windows Phone 8


I am using Sterling 1.6.2 from Nuget in a Windows Phone 8 project. When querying data using
_database.Query<Article, int, string>(Database.ARTICLE_INDEX)
                        .Where(l => l.Index == (int) type)
                        .Select(l => l.LazyValue.Value)
I sometimes get System.IO.EndOfStreamException. I do not exactly know how to reproduce it or when it happens, but when it happens once, then the database gets corrupted or something I cannot do any data anymore.


petermorlion wrote Mar 27, 2014 at 11:27 AM

Yeah, I've seen this too. I'm not sure how I used to fix it, but I think the database is indeed corrupted from then on. Maybe have a look at the new SterlingDB which you can find on GitHub. I haven't used it, but maybe you won't have the error with that implementation.

igorkulman wrote Mar 27, 2014 at 1:14 PM

Is it really a different project?

petermorlion wrote Mar 27, 2014 at 3:48 PM

It's the same people behind it (Wintellect, I just added upgrade possibilities to v1.5, I'm no longer helping out). The idea is to make an up-to-date version, using Portable Class Library and such. I'm no longer aware of the details, so you'd have to try it out. But essentially, it's what should become SterlingDB v2.