Android preview crash

Hi,

Trying to run custom preview on Android but crashed,

Fuse version 1.6

Device : Samsung Galaxy A3

Android Version : 7.0

Build also did not help

Below is the console output

Fuse 1.6.0 (build 15273)
Starting preview for //Users/sahalzain/Workspace/fintar/FuseWallet/Fintar/Fintar.unoproj, target Android
Configuring  2.57 s
Compiling syntax tree  1.60 s
Generating code and dataFontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>~/Library/Caches/com.xamarin.fontconfig</cachedir>
Fontconfig warning: adding <cachedir prefix="xdg">fontconfig</cachedir>
  7.45 s
Building Android app  16.29 s

Build completed in 27.95 seconds
Installing APK on 1 device(s)
Launching activity 'Fintar'
Running logcat on 5203dfe94663c3fd
02-04 15:29:56.928  3021  8386 I ActivityManager: Start proc 20115:com.apps.fintar/u0a213 for activity com.apps.fintar/.Fintar
02-04 15:29:56.929 20115 20115 E Zygote  : v2
02-04 15:29:56.929 20115 20115 I libpersona: KNOX_SDCARD checking this for 10213
02-04 15:29:56.929 20115 20115 I libpersona: KNOX_SDCARD not a persona
02-04 15:29:56.930 20115 20115 E Zygote  : accessInfo : 0
02-04 15:29:56.931 20115 20115 W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2],  Con:u:r:zygote:s0 RAM:SEPF_SECMOBILE_7.0_0010, [-1 -1 -1 -1 0 1]
02-04 15:29:56.932 20115 20115 I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=com.apps.fintar
02-04 15:29:56.936 20115 20115 I art     : Late-enabling -Xcheck:jni
02-04 15:29:57.042 20115 20115 D Fintar  : SDK: 24
02-04 15:29:57.177 20115 20115 D mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000,  [1x1]-format:1
02-04 15:29:57.433 20115 20115 D Choreographer: init sf_choreo_doframe   debug_Level : 0x4f4cdebug_game_running : false
02-04 15:29:57.500 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: ThreadedRenderer.create() translucent=true
02-04 15:29:57.505 20115 20115 D InputTransport: Input channel constructed: fd=68
02-04 15:29:57.505 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: setView = DecorView@8f99562[Fintar] touchMode=true
02-04 15:29:57.544 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: dispatchAttachedToWindow
02-04 15:29:57.556  3021  3232 D InputDispatcher: Focus entered window: 20115
02-04 15:29:57.561 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][720,1280] result=0x27 surface={isValid=true -748171264} surfaceGenerationChanged=true
02-04 15:29:57.561 20115 20173 I OpenGLRenderer: Initialized EGL, version 1.4
02-04 15:29:57.561 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: mHardwareRenderer.initialize() mSurface={isValid=true -748171264} hwInitialized=true
02-04 15:29:57.561 20115 20173 D OpenGLRenderer: Swap behavior 1
02-04 15:29:57.567 20115 20173 D mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000,  [720x1280]-format:1
02-04 15:29:57.590 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: Relayout returned: oldFrame=[0,0][720,1280] newFrame=[0,0][720,1280] result=0x1 surface={isValid=true -748171264} surfaceGenerationChanged=false
02-04 15:29:57.610 20115 20115 D SurfaceView: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][720,1280] result=0x7 surface={Surface(name=null)/@0x994a6f3 isValid=true -748169216}
02-04 15:29:57.613 20115 20115 D mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000,  [720x1280]-format:1
02-04 15:29:57.718 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 720, 1280) ci=Rect(0, 48 - 0, 0) vi=Rect(0, 48 - 0, 0) or=1
02-04 15:29:57.718 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: MSG_WINDOW_FOCUS_CHANGED 1
02-04 15:29:57.718 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true -748171264}
02-04 15:29:57.719 20115 20115 V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@21b4fb0 nm : com.apps.fintar ic=null
02-04 15:29:57.719 20115 20115 I InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
02-04 15:29:57.726  3021  4777 V InputMethodManagerService: Creating new session for client ClientState{8f60ffc uid 10213 pid 20115}
02-04 15:29:57.730 20115 20128 D InputTransport: Input channel constructed: fd=80
02-04 15:29:57.785 20115 20115 D SurfaceView: Relayout returned: oldFrame=[0,0][720,1280] newFrame=[0,0][720,1280] result=0x1 surface={Surface(name=null)/@0x994a6f3 isValid=true -748165120}
02-04 15:29:57.796 20115 20115 V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@a08be29 nm : com.apps.fintar ic=null
02-04 15:30:00.125 20115 20115 D ViewRootImpl@2e28c2d[Fintar]: Relayout returned: oldFrame=[0,0][720,1280] newFrame=[0,0][720,1280] result=0x1 surface={isValid=true -748171264} surfaceGenerationChanged=false
02-04 15:30:00.133 20115 20115 I Choreographer: Skipped 134 frames!  The application may be doing too much work on its main thread.
02-04 15:30:00.134 20115 20369 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7 in tid 20369 (Thread-5)
02-04 15:30:00.136  2372  2372 W         : debuggerd: handling request: pid=20115 uid=10213 gid=10213 tid=20369
02-04 15:30:00.228 20396 20396 F DEBUG   : pid: 20115, tid: 20369, name: Thread-5  >>> com.apps.fintar <<<
02-04 15:30:01.467  2372  2372 W         : debuggerd: resuming target 20115
02-04 15:30:01.518  3021 20469 D InputDispatcher: Focus left window: 20115
02-04 15:30:01.541  2457  2457 E lowmemorykiller: Error writing /proc/20115/oom_score_adj; errno=22
02-04 15:30:01.574  2508  2508 I Zygote  : Process 20115 exited due to signal (11)
02-04 15:30:01.581  3021  8395 I ActivityManager: Process com.apps.fintar (pid 20115) has died(96,502)
02-04 15:30:01.581  3021  8395 D ActivityManager: cleanUpApplicationRecord -- 20115
Process com.apps.fintar terminated.
Unknown Logcat Error: raised from 'adb -s 5203dfe94663c3fd logcat '

Just found the culprit, it’s a piece of typo javascript code that never really throw an error on Desktop Preview (in fact the desktop preview is working fine, ignoring that code since it’s rarely executed). On iOS emulator it’s causing the app freezing, and then error message showed up on Fuse Studio Problem tabs, after fixing that code, the Android and IOS is working fine. Thanks