Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL 5.4.0b13 - WebGL Building UnusedByteCodeStripper2 throwing exception

Discussion in '5.4 Beta' started by Baraphor1, Apr 11, 2016.

  1. Baraphor1

    Baraphor1

    Guest

    Hello,

    We are trying to get our game to build with WebGL in the latest Beta, however UnusedByteCodeStripper2 throws an exception.

    Code (CSharp):
    1. stdout:
    2. Fatal error in Mono CIL Linker
    3. System.Exception: Error processing method: 'System.Boolean UnityEngine.CrashLog.Util.Rest/<CheckConnection>d__4::MoveNext()' in assembly: 'UnityEngine.CrashLog.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void UnityEngine.Ping::.ctor(System.String)
    4.    at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
    5.    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
    6.    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    7.    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    8.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    9.    --- End of inner exception stack trace ---
    10.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    11.    at Mono.Linker.Steps.MarkStep.Process()
    12.    at Mono.Linker.Pipeline.Process(LinkContext context)
    13.    at Mono.Linker.Driver.RunDriver(Driver driver)
    14. stderr:
    We recently added the UnityEngine.CrashLog.dll to our game because we want to track down crashes that users report but we are unable to reproduce. This seems to be the cause of this issue.


    SideBar: I noticed the the accepted file types does not contain .log files
     

    Attached Files:

  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    The UnityEngine.Ping class is only available on a few platforms, and does not exist on WebGL

    The correct workaround would be to build multiple versions of the UnityEngine.CrashLog assembly, including one for WebGL that doesn't make the calls to UnityEngine.Ping. Then use the plugin inspector (http://docs.unity3d.com/Manual/PluginInspector.html) to specify which platforms were applicable for each version of the assembly.
     
  3. Baraphor1

    Baraphor1

    Guest

    That sounds like something in part Unity has to do? The second part I can definitely do, but can I even get the source code for the UnityEngine.CrashLog.dll, and then having not seen the source code is that even feasible to remove UnityEngine.Ping from that DLL.

    I would be happy to attempt it.
     
  4. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    OK, got confused here. This is from the UnityPerf service right?

    Then there isn't much to do on your end until the service supports WebGL (which it doesn't right now).
    Sorry.
     
  5. Baraphor1

    Baraphor1

    Guest

    Yes, is there an eta? until then I guess I can wrap it out of the build.
     
  6. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    There is no eta for this, sorry.