79135 4 Posted October 16, 2019 Share Posted October 16, 2019 [E] 21:59:55 - Quester.Bot > Pulse(): System.IO.IOException: Процесс не может получить доступ к файлу "D:\BOTs\WRobot 3.3.5\Profiles\Quester\Cache\A.xml.cs", так как этот файл используется другим процессом. в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) в System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) в System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) в System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) в System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) в System.IO.File.WriteAllText(String path, String contents) в Quester.Bot.Bot.Pulse(Boolean loadSettingsProfile, String profile) 21:59:55 - [Quester] Failed to start After use the thread: Thread startStop = new Thread(() => { robotManager.Products.Products.ProductStop(); Thread.Sleep(1000); robotManager.Products.Products.ProductStart(); }); startStop.Start(); Thread.Sleep(3000); startStop.Abort(); Link to comment https://wrobot.eu/forums/topic/11666-bug-with-startstop-thread/ Share on other sites More sharing options...
Droidz 2738 Posted October 17, 2019 Share Posted October 17, 2019 put abort beetween try/catch try { startStop.Abort(); } catch { } or don't use it 79135 1 Link to comment https://wrobot.eu/forums/topic/11666-bug-with-startstop-thread/#findComment-56007 Share on other sites More sharing options...
79135 4 Posted October 17, 2019 Author Share Posted October 17, 2019 okay, thx Link to comment https://wrobot.eu/forums/topic/11666-bug-with-startstop-thread/#findComment-56008 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now