Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug (Case 1260001) Regression: Loading assembly failed

Discussion in '2020.2 Beta' started by Peter77, Jul 1, 2020.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
    Opening and playing the project from Case 1108597 in Unity 2020.2.0a15 editor outputs the following error message to the Console window:
    Code (CSharp):
    1. Loading assembly failed: "Assets/Code/Plugins/XInputDotNet/x86_64/XInputDotNetPure.dll"
    Opening/playing the project in Unity 2020.1.0b13 editor does not output the error.

    I don't know if the error is expected.
    XInputDotNetPure.dll
    seems to be built with .NET3.5, maybe it's related to that?

    However, I submitted the bug-report, because it's a regression and I'm not sure if it's perhaps a bigger issue and should be looked at.

    I personally can live without using that specific assembly.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,143
    Thanks for the report Peter. We'll look into it.
     
    Peter77 likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
  4. Alex-Thibodeau

    Alex-Thibodeau

    Unity Technologies

    Joined:
    Apr 18, 2013
    Posts:
    43
    Hey there! So this is actually expected behavior though admittedly it could be a bit more clear. In the editor log it has:

    Could not load image <absolute path removed>\XInputDotNet\x86_64\XInputDotNetPure.dll due to Invalid PE header Machine value
    Failed loading assembly Assets/Code/Plugins/XInputDotNet/x86_64/XInputDotNetPure.dll
    Loading assembly failed: "Assets/Code/Plugins/XInputDotNet/x86_64/XInputDotNetPure.dll"

    I'll work on getting the reason for load failure bubbled up to the editor log so it's clearer. Recently I added the ability for the editor to verify the portable executable headers prior to loading the dll in order to prevent the loading of corrupt dlls which cause crashes when they are used.
     
    Peter77 likes this.