Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[2019.1.8f1] "failed to load il2cpp unity" on Windows 7 machines

Discussion in 'Windows' started by arturaz, Jun 26, 2019.

  1. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    Last edited: Jun 26, 2019
  2. vladk

    vladk

    Joined:
    Jul 10, 2008
    Posts:
    157
    Same here, happens on the latest version 2019.1.8f1
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,340
    Hey, we will take a look at this ASAP. Can you fill a bug report (just describing the situation and an empty Unity project attached)?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,340
    I found the root cause. I will post a workaround in a little bit. We'll also include the fix in a patch release as soon as possible.
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,340
    Here's a workaround. Open "<UNITY_INSTALL_DIR>\Editor\Data\il2cpp\libil2cpp\os\Win32\File.cpp" and apply this diff:

    Code (csharp):
    1. diff --git a/libil2cpp/os/Win32/File.cpp b/libil2cpp/os/Win32/File.cpp
    2. index 3d7f48279..1b928f663 100644
    3. --- a/libil2cpp/os/Win32/File.cpp
    4. +++ b/libil2cpp/os/Win32/File.cpp
    5. @@ -503,7 +503,11 @@ namespace os
    6.                  {
    7.                      success = TRUE;
    8.                      // The async write succeeded. Now get the number of bytes written.
    9. +#if IL2CPP_TARGET_WINDOWS_DESKTOP
    10. +                    if (GetOverlappedResult((HANDLE)handle, &overlapped, (LPDWORD)&written, TRUE) == 0)
    11. +#else
    12.                      if (GetOverlappedResultEx((HANDLE)handle, &overlapped, (LPDWORD)&written, INFINITE, FALSE) == 0)
    13. +#endif
    14.                      {
    15.                          // Oops, we could not get the number of bytes writen, so return an error.
    16.                          *error = GetLastError();
     
    l_racher likes this.
  6. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    Case 1165837

    Have not tried the workaround yet.
     
  7. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,499
    Hi Tautvydas,

    We're using U2019.1.8 and also had this Windows 7 users got the il2cpp error and used your work-around. However we still have Windows 7 players getting a crash starting the game due to the Unity video player (we use a background video for our main menu). Is there a fix planned for this?

    https://store.steampowered.com/app/987020/DRONE_The_Game
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,340
    Can you start a new thread on that issue, just to not conflate the two things?
     
  9. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,499
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,340
    The fix for the originally discussed issue landed to 2018.4.4f1, 2019.1.10f1, 2019.2.0b10 and 2019.3.0a9.
     
  11. CliffCawley

    CliffCawley

    Joined:
    Mar 30, 2009
    Posts:
    15
    I'm in need of 2018.4.4 for this fix, but I can't find it on the download page. Only 2018.4.3f1 is available. Any idea where it is?
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,340
    It just got published today: https://unity3d.com/unity/qa/lts-releases
     
  13. CliffCawley

    CliffCawley

    Joined:
    Mar 30, 2009
    Posts:
    15