Bug 57469 - android.runtime.JavaProxyThrowable: System.IO.IOException: Sharing violation on path PropertyStore.forms.tmp
Summary: android.runtime.JavaProxyThrowable: System.IO.IOException: Sharing violation ...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.3.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-14 07:10 UTC by Marek Mierzwa
Modified: 2017-10-03 10:30 UTC (History)
15 users (show)

See Also:
Tags: android, applicationproperties fr
Is this bug a regression?: ---
Last known good build:


Attachments
Stacktrace from Moto X (6.21 KB, text/plain)
2017-08-10 08:36 UTC, Nikolai Doronin
Details
demo of a way to reliably trigger the error (630.80 KB, application/x-zip-compressed)
2017-09-19 23:14 UTC, Dwayne Geller
Details

Description Marek Mierzwa 2017-06-14 07:10:34 UTC
I'm posting a new bug because https://bugzilla.xamarin.com/show_bug.cgi?id=28709 is already closed.

I'm getting quite a few error reports in HockeyApp of this kind:

> Package: xxx
> Version Code: 1705181035
> Version Name: 1.2.1
> Android: 5.1.1
> Android Build: LMY47V.J105YDVU0AQC1
> Manufacturer: samsung
> Model: SM-J105Y
> Thread: main-1
> CrashReporter Key: 5B5B2FF7-106A-8DB2-3840-7A889DB590CB039F9399
> Start Date: Tue Jun 13 21:42:01 GMT+03:00 2017
> Date: Tue Jun 13 21:42:29 GMT+03:00 2017
> Format: Xamarin
> 
> Xamarin caused by: android.runtime.JavaProxyThrowable: System.IO.IOException: Sharing violation on path PropertyStore.forms.tmp
>   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001f1] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x0000a] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at (wrapper remoting-invoke-with-check) System.IO.IsolatedStorage.IsolatedStorageFileStream:.ctor (string,System.IO.FileMode,System.IO.IsolatedStorage.IsolatedStorageFile)
>   at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile (System.String path, System.IO.FileMode mode) [0x00000] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at (wrapper remoting-invoke-with-check) System.IO.IsolatedStorage.IsolatedStorageFile:OpenFile (string,System.IO.FileMode)
>   at Xamarin.Forms.Platform.Android.Deserializer+<>c__DisplayClass2_0.<SerializePropertiesAsync>b__0 () [0x00008] in <1481f85a917c4f2b882ea161e9bc082f>:0 
>   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Threading.Tasks.Task.Execute () [0x00010] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
> --- End of stack trace from previous location where exception was thrown ---
>   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at Xamarin.Forms.Application+<SetPropertiesAsync>d__74.MoveNext () [0x0009f] in <0f1ce60dbc6b4e24af01294c7acf41c6>:0 
> --- End of stack trace from previous location where exception was thrown ---
>   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at Xamarin.Forms.Application+<SavePropertiesAsync>d__51.MoveNext () [0x0007f] in <0f1ce60dbc6b4e24af01294c7acf41c6>:0 
> --- End of stack trace from previous location where exception was thrown ---
>   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity+<OnStateChanged>d__44.MoveNext () [0x000f8] in <1481f85a917c4f2b882ea161e9bc082f>:0 
> --- End of stack trace from previous location where exception was thrown ---
>   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <1061b4e4931f4aff8dfecaa9c69ba741>:0 
>   at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <0d12b3df98074afea1b52c95a3f493c4>:0 
>   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <0d12b3df98074afea1b52c95a3f493c4>:0 
>   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <0d12b3df98074afea1b52c95a3f493c4>:0 
>   at (wrapper dynamic-method) System.Object:9c846fbb-5d8d-42d8-8c85-6d259815e6a5 (intptr,intptr)
> 	at mono.java.lang.RunnableImplementor.n_run(Native Method)
> 	at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
> 	at android.os.Handler.handleCallback(Handler.java:739)
> 	at android.os.Handler.dispatchMessage(Handler.java:95)
> 	at android.os.Looper.loop(Looper.java:145)
> 	at android.app.ActivityThread.main(ActivityThread.java:6934)
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at java.lang.reflect.Method.invoke(Method.java:372)
> 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
> 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

The app uses Forms 2.3.4.247

The application does not use system properties anywhere explicitly.
Comment 1 Hines Vaughan III 2017-06-14 13:19:00 UTC
Also seeing this in HockeyApp but have been unable to reproduce it so I cannot provide a sample. I am using Xamarin.Auth (which saves credentials) and am also using the XF Settings Plugin.
Comment 2 Paul DiPietro [MSFT] 2017-06-22 17:53:24 UTC
We will need a preferably minimized reproduction project in order to move forward with this. if we do not receive one after a certain amount of time, we will have to close this issue as not reproducible. If you find that you can reproduce the issue, please make certain that it is not resolved in one of the latest prerelease or nightly builds, if possible.
Comment 3 Marek Mierzwa 2017-06-27 05:51:43 UTC
Unfortunately I'm not able to reproduce this issue. This is something that I only see in HockeyApp crash logs. 
On the other hand the error obviously points the framework side as the source of the problem:

>  at Xamarin.Forms.Platform.Android.FormsAppCompatActivity+<OnStateChanged>d__44.MoveNext () [0x000f8] in <1481f85a917c4f2b882ea161e9bc082f>:0

Isn't this something to treat as a starting point for the investigation?
Comment 4 dhaligas 2017-07-03 04:26:59 UTC
I am seeing this with 2.3.5-pre5.  I am not using properties and this happens when I hit the back button to close out of the application.
Comment 5 Cansın 2017-08-01 07:23:30 UTC
Hope this can help some ^^

Package: com.pomelo.mobile
Version Code: 129
Version Name: 1.04.2
Android: 7.0
Android Build: 32.3.A.2.33
Manufacturer: Sony
Model: E6603
CrashReporter Key: 31a6f19a-9acd-4023-bf70-19c5c76edea3
Start Date: 2017-06-17T05:06:44.138Z
Date: 2017-06-17T05:13:22.4Z

Xamarin Exception Stack:
System.IO.IOException: Sharing violation on path PropertyStore.forms.tmp
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001f1] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x0000a] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in <da0f05c281b041e4a360dab8e3833299>:0
  at (wrapper remoting-invoke-with-check) System.IO.IsolatedStorage.IsolatedStorageFileStream:.ctor (string,System.IO.FileMode,System.IO.IsolatedStorage.IsolatedStorageFile)
  at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile (System.String path, System.IO.FileMode mode) [0x00000] in <da0f05c281b041e4a360dab8e3833299>:0
  at (wrapper remoting-invoke-with-check) System.IO.IsolatedStorage.IsolatedStorageFile:OpenFile (string,System.IO.FileMode)
  at Xamarin.Forms.Platform.Android.Deserializer+<>c__DisplayClass2_0.<SerializePropertiesAsync>b__0 () [0x00008] in <1481f85a917c4f2b882ea161e9bc082f>:0
  at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <da0f05c281b041e4a360dab8e3833299>:0
  at Xamarin.Forms.Application+<SetPropertiesAsync>d__74.MoveNext () [0x0009f] in <0f1ce60dbc6b4e24af01294c7acf41c6>:0
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <da0f05c281b041e4a360dab8e3833299>:0
  at Xamarin.Forms.Application+<<SavePropertiesAsync>b__51_0>d.MoveNext () [0x00060] in <0f1ce60dbc6b4e24af01294c7acf41c6>:0
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <da0f05c281b041e4a360dab8e3833299>:0
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <da0f05c281b041e4a360dab8e3833299>:0
  at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <04a6f981ac96446bbc43e945711bcecf>:0
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <04a6f981ac96446bbc43e945711bcecf>:0
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <04a6f981ac96446bbc43e945711bcecf>:0
  at (wrapper dynamic-method) System.Object:6e70f423-2dc2-4bf6-a0d7-cbecdf8b2cf5 (intptr,intptr)
Comment 6 Nikolai Doronin 2017-08-10 08:36:33 UTC
Created attachment 24116 [details]
Stacktrace from Moto X

Same problem with Xamarin.Forms 2.3.4.247 on Motorola Moto X
Comment 7 tom.denoo 2017-08-14 08:30:48 UTC
Same issue here I believe...

Xamarin caused by: android.runtime.JavaProxyThrowable: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.IO.IOException: Sharing violation on path /data/user/0/com.xamarin.s_elect/files/pin8610.data.xml
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001f1] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at System.IO.File.CreateText (System.String path) [0x00000] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at PIN8610.Droid.SaveAndLoad+<SaveTextAsync>d__0.MoveNext () [0x0001e] in <02ee187545dd4df79e03e4426203df11>:0 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.IO.IOException: Sharing violation on path /data/user/0/com.xamarin.s_elect/files/pin8610.data.xml
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001f1] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at System.IO.File.CreateText (System.String path) [0x00000] in <d0fd11a4daa349129a4dd7ef51e2ad5b>:0 
  at PIN8610.Droid.SaveAndLoad+<SaveTextAsync>d__0.MoveNext () [0x0001e] in <02ee187545dd4df79e03e4426203df11>:0 <---

occurs only with packaged apk (so only on android)
Comment 8 Rein Vdst 2017-08-29 11:52:44 UTC
We are encountering the same issue, popping up in HockeyApp.

We do not use Properties explicitly. (Xamarin.Auth we do use)

Package: xxx
Version Code: 270001
Version Name: 1.6.3
Android: 6.0.1
Android Build: MMB29M.G900FXXS1CQD4
Manufacturer: samsung
Model: SM-G900F
Thread: main-1
CrashReporter Key: C553B43A-12FA-9F95-4A7A-5C0ACA117C27F9026A3C
Start Date: Tue Aug 29 13:22:26 GMT+02:00 2017
Date: Tue Aug 29 13:22:33 GMT+02:00 2017
Format: Xamarin

Xamarin caused by: android.runtime.JavaProxyThrowable: System.IO.IOException: Sharing violation on path PropertyStore.forms.tmp
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001f1] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x0000a] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at (wrapper remoting-invoke-with-check) System.IO.IsolatedStorage.IsolatedStorageFileStream:.ctor (string,System.IO.FileMode,System.IO.IsolatedStorage.IsolatedStorageFile)
  at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile (System.String path, System.IO.FileMode mode) [0x00000] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at (wrapper remoting-invoke-with-check) System.IO.IsolatedStorage.IsolatedStorageFile:OpenFile (string,System.IO.FileMode)
  at Xamarin.Forms.Platform.Android.Deserializer+<>c__DisplayClass2_0.<SerializePropertiesAsync>b__0 () [0x00008] in <74ac3f29fabc4c9bbfe3c4108a7356b8>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Threading.Tasks.Task.Execute () [0x00010] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at Xamarin.Forms.Application+<SetPropertiesAsync>d__74.MoveNext () [0x0009f] in <7fc7c54b5e2d419395df064dc5addbb6>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at Xamarin.Forms.Application+<SavePropertiesAsync>d__51.MoveNext () [0x0007f] in <7fc7c54b5e2d419395df064dc5addbb6>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at Xamarin.Forms.Platform.Android.FormsAppCompatActivity+<OnStateChanged>d__44.MoveNext () [0x000f8] in <74ac3f29fabc4c9bbfe3c4108a7356b8>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <da6d3ddd751d4596aedcf49f50a34f74>:0 
  at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <949fa3868cc64ada8a67e7c27e4c3ce0>:0 
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <949fa3868cc64ada8a67e7c27e4c3ce0>:0 
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <949fa3868cc64ada8a67e7c27e4c3ce0>:0 
  at (wrapper dynamic-method) System.Object:a7c77aaa-2f09-42b9-9be4-1ac63b5b96a9 (intptr,intptr)
	at mono.java.lang.RunnableImplementor.n_run(Native Method)
	at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:158)
	at android.app.ActivityThread.main(ActivityThread.java:7224)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Comment 9 xamarinbugzilla 2017-09-03 04:30:02 UTC
I'm seeing this in my iOS app as well - not sure what causes it. It appears mostly to be on app startup for me.
I'm ripping it out and just going with James M settings nuget I guess...
I'm using Forms 2.3.4.270 

-- Stack Trace
{System.IO.IOException: Sharing violation on path PropertyStore.forms
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001e4] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/corlib/System.IO/FileStream.cs:247 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/corlib/System.IO/FileStream.cs:149 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs:127 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs:142 
  at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile (System.String path, System.IO.FileMode mode) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs:908 
  at Xamarin.Forms.Platform.iOS.Deserializer+<>c.<DeserializePropertiesAsync>b__1_0 () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Deserializer.cs:22 
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Future.cs:680 
  at System.Threading.Tasks.Task.Execute () [0x00010] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2502 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535 
  at Xamarin.Forms.Application+<GetPropertiesAsync>d__68.MoveNext () [0x00046] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Application.cs:248 }
Comment 10 xamarinbugzilla 2017-09-03 04:34:12 UTC
Upon a little bit of looking - i'm setting a persisted property inside of an async method during startup. But I don't call an explicit save.
Comment 11 Samantha Houts [MSFT] 2017-09-11 20:29:11 UTC
https://github.com/xamarin/Xamarin.Forms/pull/1075
Comment 12 Pawel Huber 2017-09-13 11:57:56 UTC
I might have found possible cause...

When you have 2 activities A,B and execute Forms.Init in both of them and go from A->B with StartActivity(B). 

After rearranging those parts,error seems to have gone away.
Comment 13 Marek Mierzwa 2017-09-13 12:28:46 UTC
@Pawel Huber I'm affraid I don't have such situation in my code base. It might be specific to your project
Comment 14 Pawel Huber 2017-09-13 12:43:14 UTC
Just out of curiosity, are you using mvvmcross?
Comment 15 Marek Mierzwa 2017-09-13 12:44:47 UTC
Nope, FreshMvvm. It's a small project. Although I use MvvmCross in few non-forms projects.
Comment 16 Dwayne Geller 2017-09-19 23:14:06 UTC
Created attachment 24821 [details]
demo of a way to reliably trigger the error

I was able to reliably create the property store error with the attached code (give it 3 seconds after it fully loads).

Referencing libraries compiled from the pull request https://github.com/xamarin/Xamarin.Forms/pull/1075 I could not create the property store error anymore
Comment 17 Rui Marinho 2017-10-03 10:30:28 UTC
Should be fixed on 2.4.1-pre1

Note You need to log in before you can comment on or make changes to this bug.