Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Internal Compiler Error

Discussion in 'Editor & General Support' started by lamp, Dec 13, 2013.

  1. lamp

    lamp

    Joined:
    Oct 28, 2013
    Posts:
    3
    Hello all.

    A work mate and i have had the following error continiously crop up over the last two or three days with no sign as to why or a fix.

    Internal compiler error. See the console log for more information. output was:
    Unhandled Exception: System.UnauthorizedAccessException: Access to the path "C:\...\Temp\Assembly-CSharp.dll.mdb" is denied.

    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, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in <filename unknown>:0

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

    at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in <filename unknown>:0

    at Mono.CSharp.SymbolWriter+SymbolWriterImpl.WriteSymbolFile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.SymbolWriter.WriteSymbolFile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.CodeGen.Save (System.String name, Boolean saveDebugInfo, Mono.CSharp.Report Report) [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0

    Restarting Unity worked the first couple times. After that we removed the Assembly files and had unity rebuild them. This worked again for a little while but the error keeps showing up. We are working on different projects on version 4.3.1 and 4.2.1 both with a pro license.

    Cant seem to find anything on the forums or answers. Any one have an idea as to the cause of this or have a fix for it??

    I have put this up on the Questions section as well but issues get lost really easy there and never get answered.

    Thanks Guys
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Did you check the permission for Assembly-CSharp.dll.mdb? Something seems to mess it up or lock the file.
    Are you using a version control? Do you lock the file with Visual Studio or MonoDevelop? Is the debugger still running?
     
  3. lamp

    lamp

    Joined:
    Oct 28, 2013
    Posts:
    3
    Permissions are fine and we are working on separate projects so there is no transfer between machines for version control. Not locking it nor are the scripts doing anything overly exciting. Cant run it due to the error so I'm not sure about the debugger. Developing with Mono.

    Someone had suggested elsewhere that it could be anti virus but, disabled that and it the error came up again. Attempted to recreate it but to no success other than it occurs after saving changes to any of the scripts, but with no errors or warnings. I can remove it most of the time by restarting unity so its not stopping me from doing what i need but it is a pain when it persistently pops up.

    Thanks for the help
     
  4. lamp

    lamp

    Joined:
    Oct 28, 2013
    Posts:
    3
    Still havnt been able to figure it out but. Could it have something to do when its saving over the script after iv made changes when if i access unity to quickly. It came up again but after making further changes and saving out it again it disappeared again. Could it be as simple as attempting to access it while its being saved?
     
  5. qwerytiop

    qwerytiop

    Joined:
    Dec 18, 2013
    Posts:
    1
    The file where access is denied does not seem to exist. there is no database file at that location for me.

    Running Unity as administrator seems to make it work, but only for a little while.
     
    Last edited: Dec 18, 2013
  6. sbhattacharjee

    sbhattacharjee

    Joined:
    Mar 15, 2014
    Posts:
    1
    Closed the Unity editor. The Temp folder (in the project workspace location) shall be automatically removed.
    Now restart the Unity editor with the game module loaded. The temp file shall be created once again, however the DLL file which was showing the compilation error should not be present now. Your application should be able to work smoothly now.
     
  7. MAHENDRA

    MAHENDRA

    Joined:
    Oct 21, 2013
    Posts:
    1
    I created new text file inside /Temp folder and named that file as "Assembly-CSharp.dll.mdb". This resolved the access denied error for me.
     
  8. sirio21

    sirio21

    Joined:
    Mar 11, 2013
    Posts:
    114
    When I tried to create a dll or an exe file it is removed immediately. Everything created in Documents folder is deleted. My solution was to create the project outside DOCUMENTS folder. The problem is that windows folder is watching any executable files that is copied or created. I have a clean install of windows 8 and I have no third party antivirus.
     
  9. AnonymousMe

    AnonymousMe

    Joined:
    Apr 22, 2014
    Posts:
    1
    Thanks this helped solve the problem for me.
     
  10. jgliwa1

    jgliwa1

    Joined:
    Mar 15, 2013
    Posts:
    1
    You are a genius. This problem has been bugging me for 3 days =[. Thanks!