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

Unity 5.5.0f3 APIUpdater encountered some issues and was not able to finish - mono stack trace

Discussion in 'Editor & General Support' started by kenmgrimm, Jan 14, 2017.

  1. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    34
    Hi,
    I have a project running on 5.5.0f3 that can no longer run the APIUpdater. I have tried on 5.4.3 as well so I don't think it's Unity version dependent. I get the following stack trace in the console without any indication of which source file of ours failed. Is this a Unity bug or is there some way that I can track down which file / asset causes this?

    filename unknown>:0
    at Mono.CSharp.StructuralVisitor.VisitTypeDefinition (Mono.CSharp.TypeDefinition tc) <0x2babfe8 + 0x0005b> in <filename unknown>:0
    at Mono.CSharp.StructuralVisitor.Visit (Mono.CSharp.Class c) <0x2babfc0 + 0x00017> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit (Mono.CSharp.Class c) <0x2baa148 + 0x0055b> in <filename unknown>:0
    at Mono.CSharp.Class.Accept (Mono.CSharp.StructuralVisitor visitor) <0x2baa128 + 0x0001a> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit (Mono.CSharp.ModuleContainer mc) <0x2ba7610 + 0x004fa> in <filename unknown>:0
    at Mono.CSharp.ModuleContainer.Accept (Mono.CSharp.StructuralVisitor visitor) <0x2ba64e8 + 0x0001a> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (Mono.CSharp.CompilerCompilationUnit top, System.String fileName) <0x2ba4af8 + 0x000a8> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (ITextSource program, System.String fileName, Int32 initialLine, Int32 initialColumn) <0x2b76b08 + 0x0031b> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (ITextSource program, System.String fileName) <0x2b76a98 + 0x00043> in <filename unknown>:0
    at CSharpUpdater.Core.CSharpProjectHelper.SourceFilesDataFor (IEnumerable`1 sourceFiles, IEnumerable`1 defines, IAPIUpdaterListener logger) <0x2b74be0 + 0x0016b> in <filename unknown>:0
    at CSharpUpdater.CSharpUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) <0x2b747c8 + 0x0008f> in <filename unknown>:0
    at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) <0x2b74600 + 0x0006b> in <filename unknown>:0
    at ScriptUpdater.Program.UpdateLanguage (IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) <0x2b62e30 + 0x0020d> in <filename unknown>:0
    at ScriptUpdater.Program.Main (System.String[] args) <0x2ad0f28 + 0x00223> in <filename unknown>:0
     
    Last edited: Jan 14, 2017
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    The API updater runs and fails for some reason (it would be helpful if it would print which class it was processing at the moment of crash...)

    You can try to debug the script updater process to find this out yourself, or you can turn off script updating (i believe there's such an option, but i may be wrong). This is just a temporary workaround.. in case you don't really need to update anything automatically.
     
  3. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    34
    Yeah, all it give is "<filename unknown>", not too helpful... I'm pretty sure that I've seen in the past where it's actually identified the files and their problems so this looks like a bug to me. I can always ignore it but I'd really like to know what exactly it thinks needs updating.
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    As i said - you can probably debug this.

    Since this is not running in the Unity.exe process (i think), but instead spawns another process, you'd have to debug that child process and watch it as it throws this exception.

    I believe there are tools to do that, for example: https://blogs.msdn.microsoft.com/vi...ucing-the-child-process-debugging-power-tool/

    Let me know if you need any help with this :) sounds like a fun debugging exercise...
     
  5. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    34
    I will look into attaching the debugger to that process and maybe that will help if I can have it stop on exception. Optimally Unity would get this fixed so that these APIUpdater failures would actually more reliably point to the source of the errors. It seems like sometimes it is able to identify the source failure and other times it just silently fails with a random invalid cast exception as shown above.