Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfRangeException in Release-Distribution #585

Closed
stephanblaurock opened this issue Jan 19, 2022 · 3 comments
Closed

IndexOutOfRangeException in Release-Distribution #585

stephanblaurock opened this issue Jan 19, 2022 · 3 comments
Labels

Comments

@stephanblaurock
Copy link

I'm trying to render a simple MD-String I get following error:

var output = Markdown.ToHtml("# This is a test");

System.TypeInitializationException: The type initializer for 'Markig.Markdown' threw an exception. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Markdig.Markdown..cctor()..

In the simulator, everything works fine in both DEBUG build and RELEASE build
On the physical device (via InHouse-Distribution) everything works in the DEBUG build but NOT in the RELEASE build :-(

My environment:
MacOSX Big Sur (11.6.1)
Visual Studio for Mac (8.10.16 build 2)
Xamarin Forms (5.0.0.2291)
Markdig (0.26.0)
iOS-Simulator (15.2)
iOS-Device (15.2)

@MihaZupan
Copy link
Collaborator

MihaZupan commented Jan 19, 2022

This is most likely the same as #536 and #564.

The problem is not with Markdig, but with Xamarin iOS (e.g. a linker being too aggressive in removing attributes).

My suggestion is the same as for the other issues #564 (comment) - file an issue with Xamarin so they can investigate.
Or if you are interested in doing the investigation yourself, a good start would be

Something you could try is to build Markdig yourself and remove this line to see if the problem still reproduces. If it requires an actual device, I'm afraid I can't validate the change myself.

@xoofx xoofx added the question label Jan 28, 2022
@ptrkbmn
Copy link
Contributor

ptrkbmn commented Mar 9, 2022

Should be fixed with #600

@MihaZupan
Copy link
Collaborator

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants