Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2014

    Error in Building Unity 5.1 Client in batchmode (video Launcher Finalization)

    Here's a brand new error.
    I have a newly built PC.

    When executing a DeployClient the 32 bit is created just fine, but there is a file in there that is corrupt - "UnityEngine.dll"
    meaning when the launcher tries to extract the client it will fail when running line 90 from MainWindow.xaml.cs when it gets to that file. Unhandled exception nasties:

    88		foreach (var entry in zip.Entries)
    89			{
    90				entry.Extract("Client")
    91				currentEntry++;
    92					Dispatcher.Invoke(() =>
    93				{
    94					_viewModel.Percent = (double)currentEntry / totalEntries * 100;
    95				});
    96			}
    I am running the following versions:
    Windows 8.1 Pro 64 bit.
    Unity 5.1.1.f1 (64 bit).
    Visual Studio 2013 Community.
    Photon3Unity3D.dll v4.0.0.4
    Photon3DotNet.dll v4.0.0.4

    Took a look at Unity's Editor.log (buried in ... c:\users\whatever\AppData\Local\Unity\Editor
    Yep there is one error:

    System.IO.FileNotFoundException: Could not find file "D:\C#\BuzzMMO\Unity\Client\Assets\Assemblies\Buzz MMO.Client.Unity.dll.mdb".

    I also get that sometimes when I open unity itself. That error doesn't prevent things from working nor from it creating a working build, so I suspect it's not the issue here.

    The build is just fine when doing it from the unity editor, this error only occurs from a command line (or TeamCity) build.
    Last edited by oldngrey; 07-13-2015 at 12:39 AM.

  2. #2
    Join Date
    Feb 2014
    An update.....
    Since the "DeployClient" of BuzzMMOBuild.proj is actually made up of several steps, I tried to figure out which step consistently causes the bad UnityEngine.dll in the zip file.

    Seems the unity compiler is working. The line starting with "<Exec" does indeed create a set of unity files in ... BuzzMMO\Build\Work\Client
    So much for the misleading subject line to this post......
    And these files work when I run them manually. The UnityEngine.dll is not corrupt and can be copied and deleted from work\client directory.

    Next, test the zipping.
    This is the line in BuzzMMOBuild.proj that creates the
    <Zip ZipFileName="$(MSBuildThisFileDirectory)..\Build\Client\" Files="@(ClientZipFiles)" WorkingDirectory="$(MSBuildThisFileDirectory)..\Build\Work\Client" />
    It's creating the zip file, it's just that UnityEngine.dll is corrupt. Actually, it may not be corrupt, it's just acting as if something still has it open, but that's weird behaviour from within a zip file. The actual error when trying to extract the UnityEngine.dll manually from the zip file is:
    "An unexpected error is keeping you from copying the file...... Error 0x80004005: Unspecified Error"

    That error could mean anything.

    Next step was to not run the unity compile at all from BuzzMMOBuild.proj, ie comment out the "<Exec" line altogether and just let the Zip use the existing Work directory...... guess what....... same problem. The zip file still has an unusable UnityEngine.dll in it even though the input files don't.

    This is getting weird.
    That zip line seems to do more than just create a zip file.
    Will look at it tomorrow.
    Last edited by oldngrey; 07-14-2015 at 06:55 AM.

  3. #3
    Join Date
    Feb 2014
    The solution:

    It seems as though zip could not zip up the UnityEngine.dll properly.

    There is a relatively unknown parameter for the Zip part of MSBuild Community Tasks called ZipLevel and my reasoning is that if I reduce compression to 0 it might not corrupt the file while still enabling it to be sent as one zip file.

    Put this in the <Zip line in BuzzMMOBuild.proj:

    Early tests are ok. At least I was able to get to the end of the Finalizing Launcher video successfully.
    So why post this if nobody else in the world has the problem? Maybe Unity 5.1.1 caused it since I had no issues with earlier versions.

    Just in case, a pyrrhic victory is worth having.....
    Last edited by oldngrey; 07-14-2015 at 06:53 AM.

  4. #4
    Join Date
    Feb 2009
    I was watching this thread pretty closely, actually. I have been using the earlier version of Unity 5, but not the very latest and as such didn't really have a whole lot of input. Gratz on tracking down such an obfuscated bug though. That might be one to turn in to the Unity folks...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts