ExecutionEngineException: SIGILL when using PlayerPrefs.GetString()

Hey there,

we currently are facing an issue with a specific PlayerPref in which we are saving a Bas64 encoded image.
On some devices (android) the unity performance monitor shows us the following exceptions:

ExecutionEngineException: SIGILL

UnityEngine.PlayerPrefs.GetString (System.String key)
SomeApi.OurApi+<UploadImage>c__Iterator0.MoveNext ()
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress)

We are using Unity v5.5.0p4 and targeting Android with Minimum API Level 15 (android v4.0.3) and above.

I can say for sure, that the key which the GetString(key) method is lokking for exists as we have the following few lines just before the real PlayerPrefs.GetString(key) call:

IEnumerator UploadImage()
{     
if (!PlayerPrefs.HasKey(key))
            {
                Logger.Log("PlayerPrefs Key missing!", DebugLevel.Error);
                yield break;
            }
string tmp = PlayerPrefs.GetString(key);
}

Any help would be appreciated :slight_smile:

1 Like

Based on my results from googling for “ExecutionEngineException: SIGILL”, it looks like this is a Unity bug. I’d submit it as a bug report, then start trying to work around it.

Thank you @StarManta ,
i think thats what ill do next. The only workaround which comes to my mind is to temporarily save the jpeg somewhere on the device… until we send it somewhere else.

You could always work around PlayerPrefs entirely and save your stuff in a file elsewhere.

Yes, thats what i meant.
We had the hope that we could use the playerprefs for it but if it still is buggy on some devices it doesnt make sense to use it for such data.