sounds like something you need to make a small project from to isolate. Could be something in MT
Are you able to make a small project which reproduces it, submit a bugreport, and put it up on github - I'm happy to give it a try here to see if it's just your setup before Xamarin dig into the bug, or you can just get them to do it ;-) On Sat, Nov 12, 2011 at 03:31, dermotos <[email protected]> wrote: > I have a peice of code that loads some user settings on startup. This peice > of code randomly blocks when calling BinaryFormatter.Deserialize(stream). I > could run my app again and it wont happen, and then again and it will. It is > completely random as to whether it will freeze on that line or not. Code is > below. (Verbose console logging to determine exactly what was going wrong) > > if(File.Exists(Constants.GuestDetailsLocation)) > { > try > { > Console.WriteLine("Details > exist. Opening file."); > FileInfo file = new > FileInfo(Constants.GuestDetailsLocation); > Stream fileStream = > file.Open(FileMode.Open); > Console.WriteLine("File > Open."); > BinaryFormatter binFormatter = > new BinaryFormatter(); > if(fileStream.Length > 0) > { > > Console.WriteLine("File size greater than zero. Attempting > deserialization"); > result = > (Guest)binFormatter.Deserialize(fileStream); > > Console.WriteLine("File Deserialized."); > fileStream.Close(); > > Console.WriteLine("File closed."); > } > } > catch > { > ...... > > > > > The line: result = (Guest)binFormatter.Deserialize(fileStream); never > returns, sometimes. Could this be a monotouch bug, or am I doing something > wrong? > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Binary-deserialization-blocks-indefinitely-sometimes-tp4033546p4033546.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
