Question by 
               heliojmsemedo · Aug 10, 2018 at 12:53 PM · 
                androidrenderingcrashescrash logcrashreport  
              
 
              Android app crashing on Camera.set_texture
trace:
 07-25 16:30:03.997 19683 19703 I Unity   : «U3D» <color=#007F00FF><b>$ WorldObjectUnityTemplate.Awake Vortex.[783011008]</b></color>
 07-25 16:30:03.997 19683 19703 I Unity   :
 07-25 16:30:03.997 19683 19703 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
 07-25 16:30:03.997 19683 19703 I Unity   :
 07-25 16:30:03.998 19683 19703 I Unity   : «U3D» <color=#007F00FF><b>$ WorldObject.Initialize.Awake Vortex.[1767092096] @ VortexPlayground.[-550964992]</b></color>
 07-25 16:30:03.998 19683 19703 I Unity   :
 07-25 16:30:03.998 19683 19703 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
 07-25 16:30:03.998 19683 19703 I Unity   :
 07-25 16:30:03.998 19683 19703 I Unity   : «U3D» <color=#007F00FF><b>$ WorldObject.Initialize.Awake WormHole.[-201070080] @ Vortex.[1767092096]</b></color>
 07-25 16:30:03.998 19683 19703 I Unity   :
 07-25 16:30:03.998 19683 19703 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
 07-25 16:30:03.998 19683 19703 I Unity   :
 07-25 16:30:04.015 19683 19703 E CRASH   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 89b113e4
 07-25 16:30:04.015 19683 19742 E CRASH   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 95622c98
 07-25 16:30:04.015 19683 19742 E CRASH   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 07-25 16:30:04.015 19683 19742 E CRASH   : Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys'
 07-25 16:30:04.015 19683 19742 E CRASH   : Revision: '11'
 07-25 16:30:04.015 19683 19703 E CRASH   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 07-25 16:30:04.015 19683 19703 E CRASH   : Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys'
 07-25 16:30:04.015 19683 19703 E CRASH   : Revision: '11'
 07-25 16:30:04.015 19683 19703 E CRASH   : pid: 19683, tid: 19703, name: UnityMain  >>> com.xxx.xxx <<<
 07-25 16:30:04.015 19683 19742 E CRASH   : pid: 19683, tid: 19742, name: UnityGfxDeviceW  >>> com.xxx.xxx <<<
 07-25 16:30:04.015 19683 19703 E CRASH   :     r0 89b113d0  r1 a1b113d0  r2 00000003  r3 00000001
 07-25 16:30:04.016 19683 19742 E CRASH   :     r0 95622c10  r1 9d622c10  r2 00000000  r3 00000035
 07-25 16:30:04.016 19683 19703 E CRASH   :     r4 3f800000  r5 acb9c210  r6 3f800000  r7 00000008
 07-25 16:30:04.016 19683 19703 E CRASH   :     r8 b3a7eaec  r9 00000001  sl 00000000  fp 9d5c2020
 07-25 16:30:04.016 19683 19742 E CRASH   :     r4 00000001  r5 95eae660  r6 00000017  r7 95eae6b0
 07-25 16:30:04.016 19683 19703 E CRASH   :     ip 95eaec50  sp b3a7ea00  lr a12ea9f8  pc a12ea9f8  cpsr b397ac90
 07-25 16:30:04.016 19683 19742 E CRASH   :     r8 9ca59a80  r9 00000001  sl 9d4849cc  fp 0000274e
 07-25 16:30:04.016 19683 19703 E CRASH   :
 07-25 16:30:04.016 19683 19703 E CRASH   : backtrace:
 07-25 16:30:04.016 19683 19742 E CRASH   :     ip 00008dd4  sp 9c71a680  lr 00008dd2  pc a0f47a50  cpsr 9c71a310
 07-25 16:30:04.016 19683 19742 E CRASH   :
 07-25 16:30:04.016 19683 19742 E CRASH   : backtrace:
 07-25 16:30:04.107 19683 19703 E CRASH   :      #00  pc 00a1f9f8  /data/app/com.xxx.xxx-2/lib/arm/libunity.so
 07-25 16:30:04.107 19683 19703 E CRASH   :      #01  pc 007798a4  /data/app/com.xxx.xxx-2/lib/arm/libunity.so
 07-25 16:30:04.107 19683 19703 E CRASH   :      #02  pc 0074b280  /data/app/com.xxx.xxx-2/lib/arm/libunity.so
 07-25 16:30:04.107 19683 19703 E CRASH   :      #03  pc 0074acf0  /data/app/com.xxx.xxx-2/lib/arm/libunity.so
 07-25 16:30:04.107 19683 19703 E CRASH   :      #04  pc 00746d00  /data/app/com.xxx.xxx-2/lib/arm/libunity.so
 07-25 16:30:04.107 19683 19703 E CRASH   :      #05  pc 00540050  /data/app/com.xxx.xxx-2/lib/arm/libunity.so
 07-25 16:30:04.107 19683 19703 E CRASH   :      #06  pc 00003690   ( (wrapper managed-to-native) UnityEngine.Camera:set_targetTexture (UnityEngine.Camera,UnityEngine.RenderTexture) {0x97c6a4b0} + 0x50 (0x96188640 0x961886f0) [0x9f642f00 - Unity Root Domain]+13968)
 07-25 16:30:04.107 19683 19703 E CRASH   :      #07  il 0000003b  at (wrapper managed-to-native) UnityEngine.Camera.set_targetTexture (UnityEngine.Camera,UnityEngine.RenderTexture) <0x0003b>
 07-25 16:30:04.107 19683 19703 E CRASH   :      #08  il 000002c7  at Assets.XXX.Scripts.Vortex.Start () [0x000cd] in <03d97210cae747359de2dd19aa2a3625>:0
 07-25 16:30:04.107 19683 19703 E CRASH   :      #09  il 00000073  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x00073>
 07-25 16:30:04.135   779   878 W InputDispatcher: channel '7894fa8 com.xxx.xxx/com.XXX.bridge.main (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
 07-25 16:30:04.135   779   878 E InputDispatcher: channel '7894fa8 com.xxx.xxx/com.XXX.bridge.main (server)' ~ Channel is unrecoverably broken and will be disposed!
 07-25 16:30:04.136   779  2250 I WindowState: WIN DEATH: Window{7894fa8 u0 com.xxx.xxx/com.XXX.bridge.main}
 07-25 16:30:04.136   779  2250 W InputDispatcher: Attempted to unregister already unregistered input channel '7894fa8 com.xxx.xxx/com.XXX.bridge.main (server)'
 07-25 16:30:04.136   779  2250 W WindowManager: Force-removing child win Window{42244f0 u0 SurfaceView} from container Window{7894fa8 u0 com.xxx.xxx/com.XXX.bridge.main}
 07-25 16:30:04.168   216   216 I Zygote  : Process 19683 exited due to signal (11)
 07-25 16:30:04.173   779  2097 I ActivityManager: Process com.xxx.xxx (pid 19683) has died
is happening with this code on a lengthy script:
     portalMaterial.mainTexture = MasterAugmentCamera.targetTexture = new RenderTexture((int)canvas.x, (int)canvas.y, 24);
so I wrote a simpler script to pinpoint the problem
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
     public class settargettexture : MonoBehaviour {
     
         // Use this for initialization
         public Renderer rend;
         public Camera cam1, cam2;
         void Start () {
             
         }
         
         // Update is called once per frame
         void Update () {
             
         }
     
         public void SetTex()
         {
             var rt = /*new RenderTexture(256, 256, 24);*/RenderTexture.GetTemporary(256, 256, 24);
             rt.Create();
             cam2.targetTexture = rt;
             rend.material.mainTexture = rt;
         }
     }
As you can see by the commented part I tried different approaches, I tried commenting the rt.Create() as well. The most peculiar thing is that I tried running this script on a fresh new project and it did not crash on Android. I believe it's a specific configuration on my project that's causing this but couldn't spot any relevant difference. Also I wanna point out this only started happening after upgrading to Unity2018.2.0f2.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                