Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Android Build Throwing SecurityException

$
0
0
My application works perfectly on Windows, but when I build it for android, the app plays for a small amount of time (5-10 seconds) then does one of two very peculiar things at seemingly random times. On Unity 4.3.0f1, it would floor one core of my CPU and freeze the entire device until force-killed. I could get nothing over logcat. On Unity 4.3.4f1, it crashes properly, and causes Samsung's KNOX Prevention Information warning to show up. Debugging over logcat shows a SecurityException being thrown. ![alt text][1] My app is a simple flappy bird clone (for practice, I promise), so I haven't the slightest idea as to why it would need any elevated permissions. It crashes on both my Galaxy Note 3 and my friends' Galaxy S3 and Galaxy Nexus. The fact that it does different things across different versions of Unity leads me to believe that this might be an issue with Unity. Would this be the case? The entire app has about fifty lines of code and it doesn't use I/O or networking or anything like that at any point in time. For some reason, removing the "pipes" from the game fixes the crash, but this is all there is to the pipe code along with some colliders and sprites(it works logically in my game, it's just here for full disclosure): void Update () { if (this.transform.position.z == 0) { this.transform.Translate (-.1f, 0, 0); if (this.transform.position.x < -50.0f || !GlobalVariables.isStarted || GlobalVariables.needsMenu) GameObject.Destroy (this.gameObject); } } void Update () { #region spawncode if(Mathf.Sin(Time.time * 4) > .9 && !hasSpawned) { hasSpawned = true; Instantiate(this, new Vector3(50, 3*Random.value - 1.5f, 0), Quaternion.identity); } if(Mathf.Sin(Time.time * 4) < .1 && hasSpawned) { hasSpawned = false; } #endregion } [1]: /storage/temp/24993-unity+crash.png

Viewing all articles
Browse latest Browse all 2383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>