Some of our users are getting “failed to load il2cpp unity”. They seem to be on Windows 7, 64bit, machines.
The game worked when built with 2019.1.6f1.
We “fixed” this by building a mono build.
Some of our users are getting “failed to load il2cpp unity”. They seem to be on Windows 7, 64bit, machines.
The game worked when built with 2019.1.6f1.
We “fixed” this by building a mono build.
Same here, happens on the latest version 2019.1.8f1
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)?
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.
Here’s a workaround. Open “<UNITY_INSTALL_DIR>\Editor\Data\il2cpp\libil2cpp\os\Win32\File.cpp” and apply this diff:
diff --git a/libil2cpp/os/Win32/File.cpp b/libil2cpp/os/Win32/File.cpp
index 3d7f48279..1b928f663 100644
--- a/libil2cpp/os/Win32/File.cpp
+++ b/libil2cpp/os/Win32/File.cpp
@@ -503,7 +503,11 @@ namespace os
{
success = TRUE;
// The async write succeeded. Now get the number of bytes written.
+#if IL2CPP_TARGET_WINDOWS_DESKTOP
+ if (GetOverlappedResult((HANDLE)handle, &overlapped, (LPDWORD)&written, TRUE) == 0)
+#else
if (GetOverlappedResultEx((HANDLE)handle, &overlapped, (LPDWORD)&written, INFINITE, FALSE) == 0)
+#endif
{
// Oops, we could not get the number of bytes writen, so return an error.
*error = GetLastError();
Case 1165837
Have not tried the workaround yet.
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?
Can you start a new thread on that issue, just to not conflate the two things?
Oki done:
https://discussions.unity.com/t/749289
The fix for the originally discussed issue landed to 2018.4.4f1, 2019.1.10f1, 2019.2.0b10 and 2019.3.0a9.
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?
It just got published today: https://unity3d.com/unity/qa/lts-releases
Thanks so much!
Where in the file do I put this? I’ve tried it at the beginning and the end and I get an error saying the il2cpp did not run correctly when I try to build. I’m using 2019.2.0f1. Before changing file.cpp it built fine but I got an error that ild2cpp was not found or something to that effect but only when it was installed via an installer. When I ran it directly from the build folder it ran fine. So, I either can’t use IL2CPP or can’t obfuscate or what?
First of all, which Unity version are you on? This issue has been fixed for a while now so you shouldn’t need to modify anything.
I said in my post 2019.2.0f1. Well, I’m getting an error when I run the game. I forget exactly what is said now but it was short. Something like “IL2cpp not found” or not started. I’m not quite sure now. I’d have to compile again and make a install. Like I said in my post, it works in the build folder, but when I used an installer I got the IL2cpp error.
edit and I don’t believe I’m missing anything in the install as far as files go.
Sorry, I somehow managed to over read it.
When you say “used an installer”, could you elaborate what you mean by that?
I added my compiled executable and proper folders and .dll to an installation builder and built an install file. When the installer was used to install the game I got the error after trying to play the game. I included the data folder and the Unity dll. and they were in the proper places. The .dll was in the same folder as the game.exe and the data folder was a subfolder of the same folder the .exe was in.
Did you make sure to include all the .DLL files? In particular, GameAssembly.dll? That error sounds like some files that were produced by Unity were not included into your installer.
Where is GameAssembly.dll? The only .dll I know about and that was created was the UnityPlayer.dll