locked
System.IO.IOException: Sharing violation on path PropertyStore.forms RRS feed

  • Question

  • User297339 posted

    Hi,

    On my android app, when i hit the home button or back button or try to take a picture with the Plugin.Media, i get the following error: UNHANDLED EXCEPTION: System.AggregateException: One or more errors occurred. ---> 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) [0x0026d] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/corlib/System.IO/FileStream.cs:249 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 /Users/builder/data/lanes/4468/f913a78a/source/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 /Users/builder/data/lanes/4468/f913a78a/source/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 /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs:142 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 /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs:908 at (wrapper remoting-invoke-with-check) System.IO.IsolatedStorage.IsolatedStorageFile:OpenFile (string,System.IO.FileMode) at Xamarin.Forms.Platform.Android.Deserializer+<>c.b_10 () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Deserializer.cs:22 at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x00012] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Future.cs:680 at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2502

    i cant understat according to this callstack what is theorigion of the error, but if some one had the same exception and found a solution i ll be happy to hear for a solution.

    Wednesday, April 26, 2017 7:39 PM

All replies

  • User296611 posted

    Hi @suringropper , Have you got any solution to this issue. I am also facing same issue.

    Friday, June 9, 2017 10:12 AM
  • User1278 posted

    Same here.....

    Monday, June 19, 2017 7:34 PM
  • User125713 posted

    It's a bug which has been here for a long time. There are some work-arounds but you will probably need to use locks to avoid the function being accidentally double-called.

    here is the XF bug for it: https://bugzilla.xamarin.com/show_bug.cgi?id=28709

    Monday, June 19, 2017 8:14 PM
  • User311812 posted

    This was solved in Xamarin 2.5.0 with this commit https://github.com/xamarin/Xamarin.Forms/commit/afa0fb7e559d8c36b9a6c8cb462d52492671a82b

    Thursday, March 29, 2018 4:32 PM
  • User304772 posted

    Same issue here

    Tuesday, September 17, 2019 2:33 PM
  • User89714 posted

    @williamkelller said: Same issue here

    If you are seeing this problem using a recent version of Xamarin.Forms, log a new issue at https://github.com/xamarin/Xamarin.Forms/issues

    Tuesday, September 17, 2019 2:55 PM