0

When we try running the game we see our splash screen and then we are getting the error Thread1:EXC_BAD_ACCESS code=1
at
il2cpp::icalls::mscorlib::System::String::RedirectToCreateString:

It happens before any of our c# code gets executed - before Awake().
It does run properly on iOS9.
We have tried it on Unity4.6.9 and on Unity4.6.9p3.
We have managed to build and run it for iOS8 only from Unity4.6.6 with xCode6.4. But we do need iOS9.

We can't find any references to this issue on the web, any help will be greatly appreciated.

xCode screen shot:
xCode screen shot

Unity Player Settings
enter image description here

Edited:
We have tried it from Unity5.2.3 too, no luck.

Another factor you should probably know is that before we run into the issue described above, we have edited the 'Run Debug' scheme of our product in xCode and disabled the 'GPU Frame Capture' because we had a different issue that prevented us from running our game on iOS8.
Here is the link we followed.

And here is a screen shot of our original issue: enter image description here

We are really stuck here, hope you can help.

Community
  • 1
  • 1
Eyal.K
  • 431
  • 6
  • 14

2 Answers2

1

Are you sure that this Unity project is using the mscorlib.dll assembly from the Unity version of Mono? It looks like it may not be.

The RedirectToCreateString icall should never actually be executed, as the Mono mscorlib assembly used in Unity build strings via a single CreateString method. When this happens it usually means the moscorlib.dll version is out of sync with the IL2CPP runtime.

I'm not sure why this is happening, but it might be worth trying 4.6.9p3 with an empty (or simple) project to note the difference.

Josh Peterson
  • 2,299
  • 19
  • 21
0

Its a replay for Josh Peterson, I could not replay with an image in a comment to his answer.

I was looking for the mscorlib.dll in my project but couldn't find one, so I looked in an old project and did find it. Here is an image of the file system of both projects.
Any way I don't know the origin of the file, I didn't manually played with it.
enter image description here

I have tried now to copy the mscorlib.dll from the old project to the new with no luck.

Any way my company decided to stop this investigation now and jump to the latest Unity 5.
Hope we will have more luck over there.

Thank you again.

Community
  • 1
  • 1
Eyal.K
  • 431
  • 6
  • 14
  • It looks like the previous build here is from the Mono scripting backend, as the IL2CPP scripting backend does not copy the managed assemblies (like mscorlib.dll file) into the Xcode project. In any case, if you don't know that you are specifically using a different mscorlib.dll, then you probably are not. :) So I'm still not sure about the cause of the problem. I doubt that Unity 5 will help though, as the IL2CPP code is the same between Unity 4.6 and Unity 5. Please keep me updated though. – Josh Peterson Dec 03 '15 at 12:47
  • Yes, you are right - same issue on unity 5.2.3. I have edited my original question with some more details. Hope it can help. Thanks again for your answers. – Eyal.K Dec 07 '15 at 19:20
  • It might be worth trying a sanity check on your installation. Can you build and run an empty project correctly? If so, then this might be a bug in Unity that we should investigate. – Josh Peterson Dec 08 '15 at 12:38