Sharing Violation, ES2 2.6.7

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
vanishing_realms
Posts: 2
Joined: Wed Apr 27, 2016 12:15 am

Sharing Violation, ES2 2.6.7

Post by vanishing_realms »

One of my users (many users actually) are unable to save games. This user is seeing a Sharing Violation from within ES2. I'm running ES2 version 2.6.7 on unity 5.2.3f1. Any ideas what this is caused by? Seems to be prevalent on windows 10, but that may not be relevant. The file gamedata.bin uses encryption, and this error is occurring during application shutdown while I attempt to save the game. I've re-written the system to use writers/readers and I now save the game before exit, but I'd still like to understand what the cause of this error is.

_____
Saving to location: C:/Users/Declan/AppData/LocalLow/IndimoLabs/Vanishing Realms

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

IOException: Sharing violation on path C:\Users\Declan\AppData\LocalLow\IndimoLabs\Vanishing Realms\gamedata.bin
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

at System.IO.FileStream..ctor (System.String path, FileMode mode) [0x00000] in <filename unknown>:0

at ES2FileUtility.CreateFileStream (System.String path, ES2FileMode filemode) [0x00000] in <filename unknown>:0

at ES2FileStream.CreateStorageStream () [0x00000] in <filename unknown>:0

at ES2FileStream.Store () [0x00000] in <filename unknown>:0

at ES2Writer.Save (Boolean checkForOverwrite) [0x00000] in <filename unknown>:0

at ES2Writer.Save () [0x00000] in <filename unknown>:0

at ES2.Save[String] (System.String param, System.String identifier, .ES2Settings settings) [0x00000] in <filename unknown>:0

at TheInventory.SaveGeneralInventoryItems () [0x00000] in <filename unknown>:0

at TheInventory.Save (System.String playerName) [0x00000] in <filename unknown>:0

at TheApplication.OnApplicationQuit () [0x00000] in <filename unknown>:0

User avatar
Joel
Moodkie Staff
Posts: 3778
Joined: Wed Nov 07, 2012 10:32 pm

Re: Sharing Violation, ES2 2.6.7

Post by Joel »

Hi there,

Easy Save itself isn't capable of causing sharing violations unless you're attempting to use it in a separate thread, so something must be trying to access the file externally.

This sometimes happens with cloud syncing software (such as Steam Cloud). In this case, it is usually best to save prior to quitting the application as it's usually quitting the application which causes the syncing to happen.

Its also worth updating to 2.7 (as always, it's worth backing up before you do this) incase Unity have made any changes at their end which conflicts with the earlier version.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

vanishing_realms
Posts: 2
Joined: Wed Apr 27, 2016 12:15 am

Re: Sharing Violation, ES2 2.6.7

Post by vanishing_realms »

Thanks for the quick reply, this helps! I no longer save during quit, and I'm also using a different DRM solution.

trendtimer
Posts: 21
Joined: Wed Jun 08, 2016 9:31 pm

Re: Sharing Violation, ES2 2.6.7

Post by trendtimer »

Hi, just wanted to say that it looks like I'm in good company here. Vanishing Realms is a great game! I've just started using ES2 for a VR game I'm working. I was inspired to create a game after seeing great games like yours. thanks!

Locked