Bug 44134 - XmlReader - MethodAccessException
Summary: XmlReader - MethodAccessException
Status: RESOLVED DUPLICATE of bug 41133
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-09 07:30 UTC by Anthony Rouneau
Modified: 2017-03-17 00:53 UTC (History)
6 users (show)

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


Attachments
The part of code that throws the exception (19.99 KB, image/png)
2016-09-09 07:30 UTC, Anthony Rouneau
Details

Description Anthony Rouneau 2016-09-09 07:30:39 UTC
Created attachment 17390 [details]
The part of code that throws the exception

Hello,

I have a very strange behaviour in my Xamarin.Droid app.

I use the code (cf. attachment) to parse a simple XML SOAP envelope and to create a XDocument. 

The problem is that `XDocument.Parse(xmlString)` raises the following MethodAccessException:

`Method 'System.Xml.XmlReader:get_DtdInfo ()' is inaccessible from method 'System.Xml.Linq.XContainer:ReadContentFrom (System.Xml.XmlReader,System.Xml.Linq.LoadOptions)'`

I believe this is an issue because the code is really simple, and the bug does not happen all the time.
Sometime the method works like a charm, and some other time, the method just fail repeatedly, until I relaunch the app.

I don't know if the problem is Xamarin.Droid related only.

It would be great to have some help about this!
Thanks in advance !
Comment 1 Marek Habersack 2016-09-09 16:23:00 UTC
The code you're referring to is not specific to Xamarin.Android, therefore I'm going to re-assign this bug to Mono BCL. Please, however, provide a small, self-contained application (it can be console app, XA app, Windows Forms app - the simpler the better) which triggers the issue. This will help the BCL team to investigate the issue.
Comment 2 Marek Safar 2016-09-12 13:18:55 UTC

*** This bug has been marked as a duplicate of bug 41133 ***
Comment 3 nikelyn 2017-01-12 08:58:40 UTC
Is there any information on this problem?
Comment 4 jamesh 2017-03-17 00:53:57 UTC
I was able to fix the problem by simplifying the doctype and xmlns tags in the SVG file.

More here: http://stackoverflow.com/a/42363385/1241612

Note You need to log in before you can comment on or make changes to this bug.