While debugging a more complex app, I found out an odd behavior on a Xiomi Mi3 device (it ships with the MIUI-5 "unoffical" android rom, reproduced on both Jelly bean 4.2 and 4.3)
The problem does not happen on my Galaxy Nexus (both stock and cyanogenmod 4.4).
Haven't tried it on other devices yet.
Attached a small project for reproducing the problem: just launch it from the debugger and press fast enough the "click me" button.
The debugger registers a NullPointer exception usually on the "Thread.Start" method; I also see this in the "Application Output" the following lines:
[crash_handler] Caught a crash, signum=11
Thread finished: #3
[webcore] Report WebCore crash to the ErrorReportUtils at:Tue Apr 29 10:48:18 CEST 2014
If you run the app without the debugger, you will see no problem/crash.
My understanding is that there is some kind of thread initialization code that happens in the webview on that device (that doesn't happen on other devices) that causes memory corruption in the MonoVM when the debugger is attached.
My main concern is that, even if I was not able to reproduce it on more devices and without the Debugger attached, I can not exclude that the problem could happen in the wild often enough. This is not an uncommon scenario since basically all the ad networks SDK leverage on the webview for displaying rich advertising.
Any other people in the forum can test the app and let me know if they see the same crash?