Bug 13857 - Android 4.3: Debug mode causes bsearch exception during reflection
Summary: Android 4.3: Debug mode causes bsearch exception during reflection
Status: RESOLVED DUPLICATE of bug 13460
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.8.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2013-08-08 11:54 UTC by Ryan Estep
Modified: 2014-07-28 16:05 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Reference Source (drop in a default Android 4.0 project) (971 bytes, text/plain)
2013-08-08 11:54 UTC, Ryan Estep
Details
Stack Trace when using the shared runtime (837 bytes, text/plain)
2013-08-08 12:00 UTC, Ryan Estep
Details
Stack Trace when not using shared runtime (2.68 KB, text/plain)
2013-08-08 12:00 UTC, Ryan Estep
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED DUPLICATE of bug 13460

Description Ryan Estep 2013-08-08 11:54:48 UTC
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).
Comment 1 Ryan Estep 2013-08-08 12:00:35 UTC
Created attachment 4586 [details]
Stack Trace when using the shared runtime
Comment 2 Ryan Estep 2013-08-08 12:00:59 UTC
Created attachment 4587 [details]
Stack Trace when not using shared runtime
Comment 3 Jonathan Pryor 2014-07-28 16:05:05 UTC

*** This bug has been marked as a duplicate of bug 13460 ***