System.MethodAccessException: Method `System.Xml.XmlReader:get_DtdInfo ()' is inaccessible
See original GitHub issueI’m getting this issue on Android M.
04-29 01:11:08.337 I/MonoDroid(27590): UNHANDLED EXCEPTION:
04-29 01:11:08.347 I/MonoDroid(27590): System.AggregateException: One or more errors occurred. ---> System.MethodAccessException: Method `System.Xml.XmlReader:get_DtdInfo ()' is inaccessible from method `System.Xml.Linq.XContainer:ReadContentFrom (System.Xml.XmlReader,System.Xml.Linq.LoadOptions)'
04-29 01:11:08.347 I/MonoDroid(27590): at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions options) [0x0009b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5745
04-29 01:11:08.347 I/MonoDroid(27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, LoadOptions options) [0x0000f] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5691
04-29 01:11:08.347 I/MonoDroid(27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader) [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5664
04-29 01:11:08.347 I/MonoDroid(27590): at NGraphics.Custom.Parsers.SvgReader..ctor (System.IO.TextReader reader, IStylesParser stylesParser, IValuesParser valuesParser) [0x0001f] in <filename unknown>:0
04-29 01:11:08.347 I/MonoDroid(27590): at SVG.Forms.Plugin.Droid.SvgImageRenderer+<<OnElementChanged>b__3_0>d.MoveNext () [0x0005c] in <filename unknown>:0
04-29 01:11:08.347 I/MonoDroid(27590): --- End of inner exception stack trace ---
04-29 01:11:08.347 I/MonoDroid(27590): at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) [0x00014] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2157
04-29 01:11:08.347 I/MonoDroid(27590): at System.Threading.Tasks.Task`1[TResult].GetResultCore (Boolean waitCompletionNotification) [0x00034] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Future.cs:562
04-29 01:11:08.347 I/MonoDroid(27590): at System.Threading.Tasks.Task`1[TResult].get_Result () [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Future.cs:532
04-29 01:11:08.347 I/MonoDroid(27590): at SVG.Forms.Plugin.Droid.SvgImageRenderer+<>c__DisplayClass3_0.<OnElementChanged>b__2 () [0x0001c] in <filename unknown>:0
04-29 01:11:08.347 I/MonoDroid(27590): at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3204/804c6cb7/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36
04-29 01:11:08.347 I/MonoDroid(27590): at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3204/804c6cb7/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:81
04-29 01:11:08.347 I/MonoDroid(27590): at (wrapper dynamic-method) System.Object:d2fb3752-7af2-474e-b861-c25543cc92a6 (intptr,intptr)
04-29 01:11:08.347 I/MonoDroid(27590): ---> (Inner Exception #0) System.MethodAccessException: Method `System.Xml.XmlReader:get_DtdInfo ()' is inaccessible from method `System.Xml.Linq.XContainer:ReadContentFrom (System.Xml.XmlReader,System.Xml.Linq.LoadOptions)'
04-29 01:11:08.347 I/MonoDroid(27590): at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions options) [0x0009b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5745
04-29 01:11:08.347 I/MonoDroid(27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, LoadOptions options) [0x0000f] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5691
04-29 01:11:08.347 I/MonoDroid(27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader) [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5664
04-29 01:11:08.347 I/MonoDroid(27590): at NGraphics.Custom.Parsers.SvgReader..ctor (System.IO.TextReader reader, IStylesParser stylesParser, IValuesParser valuesParser) [0x0001f] in <filename unknown>:0
04-29 01:11:08.347 I/MonoDroid(27590): at SVG.Forms.Plugin.Droid.SvgImageRenderer+<<OnElementChanged>b__3_0>d.MoveNext () [0x0005c] in <filename unknown>:0 <---
04-29 01:11:08.367 W/art (27590): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
04-29 01:11:08.377 D/Mono (27590): DllImport searching in: '__Internal' ('(null)').
04-29 01:11:08.377 D/Mono (27590): Searching for 'java_interop_jnienv_throw'.
04-29 01:11:08.377 D/Mono (27590): Probing 'java_interop_jnienv_throw'.
04-29 01:11:08.377 D/Mono (27590): Found as 'java_interop_jnienv_throw'.
An unhandled exception occured.
04-29 01:11:09.137 E/mono (27590):
04-29 01:11:09.137 E/mono (27590): Unhandled Exception:
04-29 01:11:09.137 E/mono (27590): System.AggregateException: One or more errors occurred. ---> System.MethodAccessException: Method `System.Xml.XmlReader:get_DtdInfo ()' is inaccessible from method `System.Xml.Linq.XContainer:ReadContentFrom (System.Xml.XmlReader,System.Xml.Linq.LoadOptions)'
04-29 01:11:09.137 E/mono (27590):
04-29 01:11:09.137 E/mono (27590): at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions options) [0x0009b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5745
04-29 01:11:09.137 E/mono (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, LoadOptions options) [0x0000f] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5691
04-29 01:11:09.137 E/mono (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader) [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5664
04-29 01:11:09.137 E/mono (27590): at NGraphics.Custom.Parsers.SvgReader..ctor (System.IO.TextReader reader, IStylesParser stylesParser, IValuesParser valuesParser) [0x0001f] in <filename unknown>:0
04-29 01:11:09.137 E/mono (27590): at SVG.Forms.Plugin.Droid.SvgImageRenderer+<<OnElementChanged>b__3_0>d.MoveNext () [0x0005c] in <filename unknown>:0
04-29 01:11:09.137 E/mono (27590): --- End of inner exception stack trace ---
04-29 01:11:09.137 E/mono (27590): at (wrapper dynamic-method) System.Object:d2fb3752-7af2-474e-b861-c25543cc92a6 (intptr,intptr)
04-29 01:11:09.137 E/mono (27590): at (wrapper native-to-managed) System.Object:d2fb3752-7af2-474e-b861-c25543cc92a6 (intptr,intptr)
04-29 01:11:09.137 E/mono (27590): ---> (Inner Exception #0) System.MethodAccessException: Method `System.Xml.XmlReader:get_DtdInfo ()' is inaccessible from method `System.Xml.Linq.XContainer:ReadContentFrom (System.Xml.XmlReader,System.Xml.Linq.LoadOptions)'
04-29 01:11:09.137 E/mono (27590):
04-29 01:11:09.137 E/mono (27590): at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions options) [0x0009b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5745
04-29 01:11:09.137 E/mono (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, LoadOptions options) [0x0000f] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5691
04-29 01:11:09.137 E/mono (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader) [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5664
04-29 01:11:09.137 E/mono (27590): at NGraphics.Custom.Parsers.SvgReader..ctor (System.IO.TextReader reader, IStylesParser stylesParser, IValuesParser valuesParser) [0x0001f] in <filename unknown>:0
04-29 01:11:09.137 E/mono (27590): at SVG.Forms.Plugin.Droid.SvgImageRenderer+<<OnElementChanged>b__3_0>d.MoveNext () [0x0005c] in <filename unknown>:0 <---
04-29 01:11:09.137 E/mono (27590):
04-29 01:11:09.137 E/mono-rt (27590): [ERROR] FATAL UNHANDLED EXCEPTION: System.AggregateException: One or more errors occurred. ---> System.MethodAccessException: Method `System.Xml.XmlReader:get_DtdInfo ()' is inaccessible from method `System.Xml.Linq.XContainer:ReadContentFrom (System.Xml.XmlReader,System.Xml.Linq.LoadOptions)'
04-29 01:11:09.137 E/mono-rt (27590):
04-29 01:11:09.137 E/mono-rt (27590): at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions options) [0x0009b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5745
04-29 01:11:09.137 E/mono-rt (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, LoadOptions options) [0x0000f] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5691
04-29 01:11:09.137 E/mono-rt (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader) [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5664
04-29 01:11:09.137 E/mono-rt (27590): at NGraphics.Custom.Parsers.SvgReader..ctor (System.IO.TextReader reader, IStylesParser stylesParser, IValuesParser valuesParser) [0x0001f] in <filename unknown>:0
04-29 01:11:09.137 E/mono-rt (27590): at SVG.Forms.Plugin.Droid.SvgImageRenderer+<<OnElementChanged>b__3_0>d.MoveNext () [0x0005c] in <filename unknown>:0
04-29 01:11:09.137 E/mono-rt (27590): --- End of inner exception stack trace ---
04-29 01:11:09.137 E/mono-rt (27590): at (wrapper dynamic-method) System.Object:d2fb3752-7af2-474e-b861-c25543cc92a6 (intptr,intptr)
04-29 01:11:09.137 E/mono-rt (27590): at (wrapper native-to-managed) System.Object:d2fb3752-7af2-474e-b861-c25543cc92a6 (intptr,intptr)
04-29 01:11:09.137 E/mono-rt (27590): ---> (Inner Exception #0) System.MethodAccessException: Method `System.Xml.XmlReader:get_DtdInfo ()' is inaccessible from method `System.Xml.Linq.XContainer:ReadContentFrom (System.Xml.XmlReader,System.Xml.Linq.LoadOptions)'
04-29 01:11:09.137 E/mono-rt (27590):
04-29 01:11:09.137 E/mono-rt (27590): at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions options) [0x0009b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5745
04-29 01:11:09.137 E/mono-rt (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, LoadOptions options) [0x0000f] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5691
04-29 01:11:09.137 E/mono-rt (27590): at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader) [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/System.Xml.Linq/System/Xml/Linq/XLinq.cs:5664
04-29 01:11:09.137 E/mono-rt (27590): at NGraphics.Custom.Parsers.SvgReader..ctor (System.IO.TextReader reader, IStylesParser stylesParser, IValuesParser valuesParser) [0x0001f] in <filename unknown>:0
04-29 01:11:09.137 E/mono-rt (27590): at SVG.Forms.Plugin.Droid.SvgImageRenderer+<<OnElementChanged>b__3_0>d.MoveNext () [0x0005c] in <filename unknown>:0 <---
04-29 01:11:09.137 E/mono-rt (27590):
referenceTable GDEF length=814 1
referenceTable GSUB length=11364 1
referenceTable GPOS length=47302 1
referenceTable head length=54 1
referenceTable GDEF length=808 1
referenceTable GSUB length=11364 1
referenceTable GPOS length=49206 1
referenceTable head length=54 1
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
'Settings' is inaccessible due to its protection level
This error is because of Settings class is internal . I assumed that you have created and modified settings from visual studio project ......
Read more >System.Xml.XmlReader is inaccessible due to its protection level
Solution: Looking at the references I noticed that System.Xml was missing. Right-click References and click Add Reference. Find System.Xml.dll ...
Read more >Inaccessible due to its protection level C# - CodeProject
Hi been trying to access my greet method, from my Helper class, but it is inaccessible due to its protection level. How can...
Read more >XmlReaderSettings.DtdProcessing Property (System.Xml)
Gets or sets a value that determines the processing of DTDs.
Read more >"inaccessible due to its protection level" error but can't ...
I haven't used Unity in a few years and am getting error CS0122: 'QuizUI.SetQuestion(Question)' is inaccessible due to its protection level.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same Problem with the get_DtdInfo ()’ is inaccessible, but only sometimes when I start on Android, not always.
I’ve described a potential fix here:
http://stackoverflow.com/questions/41586580/mono-xamarin-error-loading-svg-images-system-methodaccessexception/42363385#42363385