Re: [Mono-dev] Problems with FileStream.Lock();

2013-01-11 Thread Terry Watts
I have looked at the exception under the debugger, that's why E is in the catch{ Exception E}. The exception thrown is a lock violation; not a Not Supported exception. Regards Terry On Jan 9, 2013 7:10 AM, Marcel Hellwig k...@cookiesoft.de wrote: Hi, I think your worst mistake you do is on

Re: [Mono-dev] Problems with FileStream.Lock();

2013-01-11 Thread Jonathan Pryor
On Jan 8, 2013, at 3:52 PM, Terry Watts terry.terrywatts@gmail.com wrote: I have looked at the exception under the debugger, that's why E is in the catch{ Exception E}. The exception thrown is a lock violation; not a Not Supported exception. The exception thrown is lock violation because

Re: [Mono-dev] Problems with FileStream.Lock();

2013-01-09 Thread Terry-Watts.com
Thanks very much for looking into it. I had realised that the SD card file system was limited, but I didn't realise that the internal Android file system was also limit small file support. The change works like a treat. Thanks very very much. Terry On 9/01/2013 4:23 PM, Jonathan Pryor

Re: [Mono-dev] Problems with FileStream.Lock();

2013-01-08 Thread Marcel Hellwig
Hi, I think your worst mistake you do is on this line Am 07.01.2013 22:50, schrieb Terry-Watts.com: |try{base.Lock(0,Int64.MaxValue);break;}catch(ExceptionE ){Thread.Sleep(SleepCount++);}}| You catch *all* exceptions. This is horrible. You should definitely specify your exception you except

Re: [Mono-dev] Problems with FileStream.Lock();

2013-01-08 Thread Terry-Watts.com
Channels are what they seem to call any I/O path. http://developer.android.com/reference/java/nio/channels/package-summary.html The actual exception thrown is: Lock violation on path /mnt/sdcard/external_sd/TestDb/Test.Tbl{System.IO.IOException: Lock violation on path

Re: [Mono-dev] Problems with FileStream.Lock();

2013-01-08 Thread Jonathan Pryor
On Jan 8, 2013, at 4:44 PM, Terry-Watts.com te...@terry-watts.com wrote: I have check the Android API docs and file locking has been available on channels since API Level 1. on channels? Anyway, quick perusal of the source shows that FileStream.Lock() is fcntl(2):

Re: [Mono-dev] Problems with FileStream.Lock();

2013-01-08 Thread Jonathan Pryor
On Jan 7, 2013, at 4:50 PM, Terry-Watts.com te...@terry-watts.com wrote: I have a class that work fine in C# under Windows but not under Monodroid. This is a mono bug: https://bugzilla.xamarin.com/show_bug.cgi?id=9411 Thinking about it a but more, though, it's an app bug (+ mono bug). The