Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 4585 [details]
Reference Source (drop in a default Android 4.0 project)
This exception can happen a couple of ways when debugging a Android 4.3 device.
[libc] bionic/libc/upstream-netbsd/libc/stdlib/bsearch.c:70: bsearch: assertion "key != NULL" failed
When debugging the code Use Shared Mono Runtime, the bsearch exception occurs immediately on running the program. When not using the shared runtime, the exception will still occur if the code uses reflection (specifically on the Invoke() call). In release mode, this error will not happen at all.
Attached is a reference source to test the bug in all forms. (Release mode will work, shared runtime & Debug will fail immediately, and native runtime & debug will crash when the button is pressed).
Created attachment 4586 [details]
Stack Trace when using the shared runtime
Created attachment 4587 [details]
Stack Trace when not using shared runtime
*** This bug has been marked as a duplicate of bug 13460 ***