Bug 9567 - M4A throws an exception with Mac, but not with Windows (same code)
Summary: M4A throws an exception with Mac, but not with Windows (same code)
Status: VERIFIED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-01-15 06:13 UTC by Paul Johnson
Modified: 2013-03-04 05:05 UTC (History)
3 users (show)

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


Attachments
Video showing the crash (1.59 MB, application/x-shockwave-flash)
2013-01-16 10:59 UTC, Paul Johnson
Details
zip archive of logcat throwback (184.04 KB, application/zip)
2013-01-16 12:02 UTC, Paul Johnson
Details
monodevelop throwback (11.14 KB, text/plain)
2013-01-16 12:20 UTC, Paul Johnson
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:
VERIFIED INVALID

Description Paul Johnson 2013-01-15 06:13:34 UTC
Using the code on BZ#8746

If I compile and run this from my Mac to either my Nexus or S2, I get an X509 (open store) error returned. If I run the exact same code using the VS2010 plugin from my PC and deploy, I hit no problems at all

The code has to be run with DEBUG switched on - you don't see any issue on release via the Mac or PC.
Comment 1 Jonathan Pryor 2013-01-16 10:30:57 UTC
I'm unable to reproduce on a Nexus 10. I see no X509 errors.
Comment 2 Paul Johnson 2013-01-16 10:59:00 UTC
Created attachment 3228 [details]
Video showing the crash

I have done a clean build, and deployed to my nexus 7. This is with MD 3.1.1 using M4A 4.4.54. This in debug mode. I don't see anything when I build on the PC using the same version of m4a
Comment 3 Jonathan Pryor 2013-01-16 11:45:36 UTC
Since it's a Crypto error, where's it coming from? Presumably you're hitting a HTTPS URI; what is it?

Once you find the URI, what happens if you enter it into Browser on the same device? Are you able to view it w/o any dialogs or messages?
Comment 5 Paul Johnson 2013-01-16 12:02:04 UTC
Created attachment 3229 [details]
zip archive of logcat throwback
Comment 6 Jonathan Pryor 2013-01-16 12:06:56 UTC
Attachment 3229 [details] doesn't contain the CryptographicException. :-(

What happens if you Run > Start Without Debugging instead of Run > Start Debugging? Do you still get the exception? I wonder if the exception is on the MonoDevelop side of things; does $HOME/Library/Logs/MonoDevelop-3.0/MonoDevelop.log contain any CryptographicExceptions?
Comment 7 Paul Johnson 2013-01-16 12:20:59 UTC
Created attachment 3230 [details]
monodevelop throwback
Comment 8 Paul Johnson 2013-01-16 12:21:57 UTC
Without debugging, life is good and it does as it should. The monodev throwback has some bits in, but no crypto errors from what I can see
Comment 9 Jonathan Pryor 2013-01-16 12:35:06 UTC
Is it possible that you're still catching all exceptions, and that this is just an internal exception that you shouldn't be seeing in the first place?

Within MonoDevelop, click Run > Exceptions....
Select all within the Stop in exceptions section.
Click the Left arrow.

Stop in exceptions should now be empty.

Restart debugging.

Do you still get the exception?
Comment 12 Paul Johnson 2013-01-16 12:43:28 UTC
ok, remove all exceptions lets it run without an problem :)

any ideas which exception is being thrown that I shouldn't be seeing?
Comment 13 Mikayla Hutchinson [MSFT] 2013-01-16 12:50:10 UTC
As I explained in bug 8746, the CryptographicException not a bug. It is caught and handled internally in Mono, and is only being shown in the debugger because catchpoints are enabled. The exception shown in your video is caught and handled here: https://github.com/mono/mono/blob/master/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs#L282
Comment 14 Mikayla Hutchinson [MSFT] 2013-01-16 12:51:03 UTC
What do you mean "exception is being thrown that I shouldn't be seeing"?
Comment 15 Paul Johnson 2013-01-16 12:55:34 UTC
which of the exceptions that has been caught and handled in https://github.com/mono/mono/blob/master/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs#L282 is the one on the exceptions list that when cleared makes the error go away
Comment 16 Mikayla Hutchinson [MSFT] 2013-01-16 13:48:21 UTC
It's not an error if the consuming code thinks it's safe to catch and silently discard it...

Here it is, anyway:
https://github.com/mono/mono/blob/master/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs#L224

It will be shown in the debugger if you have a catchpoint for System.Security.Cryptography.CryptographicException, System.SystemException or System.Exception (because CryptographicException subclasses SystemException, which subclasses Exception).
Comment 17 Saurabh 2013-03-04 05:05:25 UTC
As per above comments changing the status to Verified.