0.24 and later crashes on Xamarin iOS release build. Not debug build. #476

Closed
opened 2026-01-29 14:37:45 +00:00 by claunia · 2 comments
Owner

Originally created by @conceptworld on GitHub (Aug 2, 2021).

When calling Markdown.ToHtml(), markdig crashes in release/distribution builds. But on debug it works.
I had to revert back to 0.23. Thanks to this page for giving me a hint: https://www.gitmemory.com/issue/xoofx/markdig/536/820772305

There is not special html I am using. Even empty string or plain text without markdown crashes it.

And with further testing, it appears that this issue is seen only in physical device and not in simulator.

Thanks.

Originally created by @conceptworld on GitHub (Aug 2, 2021). When calling Markdown.ToHtml(), markdig crashes in release/distribution builds. But on debug it works. I had to revert back to 0.23. Thanks to this page for giving me a hint: https://www.gitmemory.com/issue/xoofx/markdig/536/820772305 There is not special html I am using. Even empty string or plain text without markdown crashes it. And with further testing, it appears that this issue is seen only in physical device and not in simulator. Thanks.
claunia added the wontfix label 2026-01-29 14:37:45 +00:00
Author
Owner

@xoofx commented on GitHub (Aug 6, 2021):

It's an AOT problem Xamarin iOS side (e.g their mono AOT compiler) and unlikely in Markdig itself.

@xoofx commented on GitHub (Aug 6, 2021): It's an AOT problem Xamarin iOS side (e.g their mono AOT compiler) and unlikely in Markdig itself.
Author
Owner

@MihaZupan commented on GitHub (Aug 6, 2021):

@conceptworld @jimiatnymbl @stevehatch I would suggest filing an issue with Xamarin as this is likely some sort of linker bug on their side. If you are able to provide a repro they should be able to triage it.

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.

I'm assuming #536 is the same issue.

@MihaZupan commented on GitHub (Aug 6, 2021): @conceptworld @jimiatnymbl @stevehatch I would suggest filing an issue with Xamarin as this is likely some sort of linker bug on their side. If you are able to provide a repro they should be able to triage it. Something you could try is to build Markdig yourself and remove [this line](https://github.com/xoofx/markdig/blob/cdd4b40469bc62258ede879fb7ed38237ef8a2fb/src/Markdig/Markdown.cs#L22) to see if the problem still reproduces. If it requires an actual device, I'm afraid I can't validate the change myself. I'm assuming #536 is the same issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#476