Welcome, Guest
Username: Password: Remember me

TOPIC: Crash on iOS in XCode

Crash on iOS in XCode 6 months 1 week ago #3077

  • Largelabs
  • Largelabs's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Hello,

I'm currently upgrading to 2018.1.
After updating Unity, I tried to build and run my project on iOS. At startup, I systematically get this crash on XCode :
// System.Void I2.Loc.LocalizationParamsManager::AutoStart()
extern "C"  void LocalizationParamsManager_AutoStart_m889388651 (LocalizationParamsManager_t2237076064 * __this, const RuntimeMethod* method)
{
	{

		bool L_0 = __this->get__AutoRegister_3(); -->  Thread 1: EXC_BAD_ACCESS (code=1, address=0x20)
		if (!L_0)
		{
			goto IL_0011;
		}
	}
	{
		LocalizationParamsManager_DoAutoRegister_m3007603687(__this, /*hidden argument*/NULL);
	}

IL_0011:
	{
		return;
	}
}

In LocalizationParamsManager, I commented the following function :
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
        public void AutoStart()
        {
            if (_AutoRegister)
                DoAutoRegister();

        }

What is the reason of this crash ? And why does it happen suddenly after update Unity ? My LocalizationParamsManagers are attached to prefabs that are not instantiated at this point and _AutoRegister is set as false on them.


Many thanks,

Karim from Largelabs
The administrator has disabled public write access.

Crash on iOS in XCode 6 months 1 week ago #3080

I had this same issue. Fixed it by upgrading I2 plugin to the latest version (2.8.6 f2). You can check by looking at the README file.
The administrator has disabled public write access.

Crash on iOS in XCode 6 months 1 week ago #3081

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1146
  • Thank you received: 246
  • Karma: 74
What is the reason of this crash ? And why does it happen suddenly after update Unity ?
This is a bug in Unity. It seems that in the latest versions they changed when the RuntimeInitializeOnLoadMethod attribute is executed, and at that time, not all the object data is correctly loaded.
Also, this doesn't happen in both .NET and IL2CPP, just one of them depending on what Unity you are using.

I reported that bug, but while its been fixed, (as @koalitygame said) I also added a fix to the latest version of I2L. basically just removing the needed for AutoStart given that currently they get initialized when needed and the LocalizationManager also iterates them if they haven't been initialized when localizing the scene for the first time.

Hope that helps,
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.
Time to create page: 0.223 seconds
Template by JoomlaShine