In the application for android there are periodic departures when moving from the scene with GUILayout.Box(Resources.Load<Texture>()) to any other scene. Departures are arbitrary, they have no regularity. They can happen once in 30 clicks, but they can happen on the second or third. Logcat issues
02-09 04:51:02.254 F/libc ( 2181): Fatal signal 11 (SIGSEGV) at 0x00000020 (code=1), thread 2245 (UnityPreload) 02-09 04:51:02.310 I/DEBUG ( 173): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 02-09 04:51:02.310 I/DEBUG ( 173): Build fingerprint: 'generic/vbox86p/vbox86p:4.4.4/KTU84P/eng.genymotion.20160825.201657:userdebug/test-keys' 02-09 04:51:02.310 I/DEBUG ( 173): Revision: '0' 02-09 04:51:02.310 I/DEBUG ( 173): pid: 2181, tid: 2245, name: UnityPreload >>> com.TEST.IMGU <<< 02-09 04:51:02.310 I/DEBUG ( 173): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000020 02-09 04:51:02.458 I/DEBUG ( 173): eax 00000000 ebx 950b0ba4 ecx b85d6808 edx b85d5c00 02-09 04:51:02.458 I/DEBUG ( 173): esi b8522aa0 edi 00000c08 02-09 04:51:02.458 I/DEBUG ( 173): xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b 02-09 04:51:02.458 I/DEBUG ( 173): eip 9429253c ebp 8ecb6ad8 esp 8ecb6a60 flags 00210282 02-09 04:51:02.458 I/DEBUG ( 173): 02-09 04:51:02.458 I/DEBUG ( 173): backtrace: 02-09 04:51:02.458 I/DEBUG ( 173): #00 pc 0052153c /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #01 pc 005212da /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #02 pc 0051b9c2 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #03 pc 00375d8f /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #04 pc 00378418 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #05 pc 00378207 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #06 pc 003781b0 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #07 pc 003deb59 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #08 pc 0000bc7c /system/lib/libc.so (__thread_entry+236) 02-09 04:51:02.458 I/DEBUG ( 173): #09 pc 0003e295 /system/lib/libc.so (__pthread_clone+69) 02-09 04:51:02.458 I/DEBUG ( 173): #10 pc 003deadf /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #11 pc 0035c0e7 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #12 pc 003f941f [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #13 pc 0045f2cf [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #14 pc 00280767 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #15 pc 001cddef [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #16 pc 001cdb57 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #17 pc 001cd90f [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #18 pc 001cd677 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #19 pc 001cd42f [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #20 pc 001cd1e7 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #21 pc 001ccf9f [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #22 pc 001ccd57 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #23 pc 001ccb0f [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #24 pc 001cc8c7 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #25 pc 001cc67f [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #26 pc 001cc437 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #27 pc 001d0377 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #28 pc 001d012f [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #29 pc 001d0f27 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #30 pc 001d0cdf [heap] 02-09 04:51:02.458 I/DEBUG ( 173): #31 pc 001b82ef [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 02-09 04:51:02.458 I/DEBUG ( 173): stack: 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a20 951f9e60 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a24 b853ff50 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a28 0000073f 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a2c 8ecb6a44 [stack:2245] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a30 951fa734 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a34 00000000 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a38 b8c264d0 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a3c 950b0ba4 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a40 46505845 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a44 950b0ba4 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a48 8ecb6a68 [stack:2245] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a4c 93e5ce29 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a50 951f8ce0 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a54 b853ff50 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a58 00000025 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a5c 94292521 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): #00 8ecb6a60 950b0ba4 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a64 950b0ba4 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a68 8ecb6ad8 [stack:2245] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a6c 94293928 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a70 b853ff50 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a74 00000025 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a78 00001000 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a7c b853ff50 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a80 0000073f 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a84 00000000 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a88 000001d0 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a8c 0000009a 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a90 b8ab0580 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a94 0000073f 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a98 00000014 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6a9c 950b0ba4 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): ........ ........ 02-09 04:51:02.458 I/DEBUG ( 173): #01 8ecb6ae0 b8522aa0 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6ae4 b85d6808 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6ae8 0000009a 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6aec 00000002 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6af0 0000018a 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6af4 00000013 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6af8 00000002 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6afc 00000100 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b00 94dcd88a /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b04 b85d5c00 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b08 00000c08 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b0c b85d6808 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b10 00000006 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b14 950b0ba4 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b18 b877431c [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b1c 94dc25d6 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): ........ ........ 02-09 04:51:02.458 I/DEBUG ( 173): #02 8ecb6b70 b8522aa0 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b74 0000009a 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b78 00000001 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b7c 94dc3c37 /data/app-lib/cRom.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b80 b85da45c [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b84 b85da462 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b88 8ecb6c68 [stack:2245] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b8c b8522aa0 [heap] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b90 8ecb6c30 [stack:2245] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b94 950b0ba4 /data/app-lib/com.TEST.IMGUI-1/libunity.so 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b98 8ecb6c98 [stack:2245] 02-09 04:51:02.458 I/DEBUG ( 173): 8ecb6b9c 940e6d90 /data/app-lib/com.TEST.IMGUI-1/libunity.so The method itself:
private void OnGUI() { GUILayout.BeginArea(new Rect(widthForRightPanel, height, widthForRightPanelEnd, heightEnd), GUI.skin.box); scrollPosition = GUILayout.BeginScrollView(scrollPosition, false, false); GUILayout.BeginVertical(GUI.skin.box); GUILayout.Box(Resources.Load<Texture>("ViewerImages\\smallest\\image processing"), customSkin.box); GUILayout.EndVertical(); GUILayout.EndScrollView(); GUILayout.EndArea(); } If the Box just text to drive, then everything works fine. Departures occur both on the emulator and on conventional devices. If on the device in the Developer options, in Monitoring set the Enable OpenGL traces - call stack on glGetError, the application starts to slow down a lot, and the departures stop completely. The desktop version works fine without crashes, even on relatively old computers.
Actually the question is how to fix, or is there another mechanism for displaying images in runtime (c GUI.Box is the same crap).
Resources.Load<Texture>loads the texture from the disk. That is, you have access to the disk with each update of the gooey - which can occur several times per frame, that is, very quickly. Probably just does not have time to boot. Not sure what this is, just a guess. In any case, the texture must be loaded once, and not force the poor flash drive :) By the way, why not a Unity UI? - eastwing