Duck Game

Duck Game

View Stats:
JimmyNUT Dec 16, 2018 @ 7:59pm
Crash on game start: System.UnauthorizedAccessException: Access to the path is denied.
Help. Duck Game keeps crashing on startup.

I looked at another discussion thread and I already set my Documents directory to not read-only and the game still crashes on startup.
I have never had mods installed.
I already uninstalled and reinstalled.
I already verified game files.
I already restarted my computer.

Nothing works.

Any ideas?

Here is the log:




Crash Source: mscorlib
Mods apparently were not responsible for this crash.

System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.FlushInternalBuffer()
at System.IO.FileStream.Flush(Boolean flushToDisk)
at System.IO.FileStream.Flush()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at System.IO.File.WriteAllText(String path, String contents)
at DuckGame.DuckFile.SaveXDocument(XDocument doc, String path) in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\MonoTime\File\DuckFile.cs:line 550
at DuckGame.ProfilesCore.Save(Profile p) in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\DuckGame\Profile\Profile.cs:line 2194
at DuckGame.Main.ResetMatchStuff() in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\Main.cs:line 64
at DuckGame.Main.OnStart() in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\Main.cs:line 122
at DuckGame.MonoMain.RunUpdate(GameTime gameTime) in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\MonoTime\MonoMain.cs:line 1037
at DuckGame.MonoMain.Update(GameTime gameTime) in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\MonoTime\MonoMain.cs:line 885
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at DuckGame.Program.DoMain(String[] args) in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\Program.cs:line 121
at DuckGame.Program.Main(String[] args) in E:\gamedev\DuckGame_Steam\duckgame\DuckGame\src\Program.cs:line 36

Date: 12/16/2018
Version: 1.0.6451.27778
Platform: Windows 8
Online: FALSE
Editor: False
Time Played: 00:00:43
Special Code: finished DuckGame.YellowBarrel, DuckGame, Version=1.0.6451.27778, Culture=neutral, PublicKeyToken=null
Code: 0
Adapter Resolution: 1280x720
Game Resolution: 1920x1080
Fullscreen: True
Device: True
Level: null
Mods: 0 (0 enabled)
Command Line:
Originally posted by Entropie:
I think the access exception also shows up if your antivirus denies access to the files.

In particular bitdefender has been a culprit with that in the past.

So add duck game as an exception to your antivirus program and see if that helps.
< >
Showing 1-2 of 2 comments
The author of this thread has indicated that this post answers the original topic.
Entropie Dec 18, 2018 @ 6:16pm 
I think the access exception also shows up if your antivirus denies access to the files.

In particular bitdefender has been a culprit with that in the past.

So add duck game as an exception to your antivirus program and see if that helps.
JimmyNUT Dec 18, 2018 @ 6:37pm 
Just figured it out - exactly as you said. Windows 10 Defender was the problem.

Fix:
Windows Defender Settings > Virus and threat protection > Ransomware protection > Allow an app through Controlled folder access > Add an allowed app > add your game main .exe file to this list

Now you can launch your game.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Dec 16, 2018 @ 7:59pm
Posts: 2