Recently found this error cashing the app running on Android Oreo 8.1 emulator. Some time it doesn’t crash the app completely, but only make the app hang with a black screen. No crash report generated, but if hook up the device log, the following crash stack is shown.

Error (10472) / DEBUG: signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr --------
Error (10472) / DEBUG: Cause: seccomp prevented call to disallowed x86 system call 7
Error (10472) / DEBUG:     eax 00000007  ebx 00002872  ecx 00000000  edx 40000000
Error (10472) / DEBUG:     esi 00002872  edi 00000000
Error (10472) / DEBUG:     xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
Error (10472) / DEBUG:     eip 9a74dc87  ebp 9f0ea998  esp 9f0ea92c  flags 00000246
Error (10472) / DEBUG: 
Error (10472) / DEBUG: backtrace:
Error (10472) / DEBUG:     #00 pc 03fd2c87  /system/app/Chrome/Chrome.apk (offset 0xa2f000)
Error (10472) / DEBUG:     #01 pc 03fcfb77  /system/app/Chrome/Chrome.apk (offset 0xa2f000)
Error (10472) / DEBUG:     #02 pc ffff001f  <unknown>
Warning (1618) / NativeCrashListener: Couldn't find ProcessRecord for pid 10466
Error (10472) / crash_dump32: AM data write failed: Broken pipe

It turn out that it is related with null reference exception got bubble up to user interface. If any binding (such as MVVM Cross) throw a null reference in user interface, this crash will happen. In previous Android version, the null reference exception will be quietly ignored by Android OS, but this behaviour is changed in Oreo version.

Wait, no such crash or error in the real device. Why? It seem like each Android phone manufacturer is allowed to defined their own whitelist of such error to be filter out to prevent app from crashing in Oreo 8.1 and above. The vanilla Android OS in emulator have the default whitelist which will crash the app if this error is throw.

Time to get rid of all null exception in year 2019.