ToHtml causes "access violation" #170

Open
opened 2026-01-29 14:29:24 +00:00 by claunia · 0 comments
Owner

Originally created by @WernerMairl on GitHub (Dec 5, 2017).

Hi
I have a md file (attached) that causes a full stop (=catch not working, runtime stops execution) on dotnet core for a Stackoverflow/Access violation (tested with markdig 0.14.7)

The md file should be attached to this issue!
here the code snippet that i use to convert that file:

                var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
                string newName = System.IO.Path.ChangeExtension(file, ".html");
                bool append = false;
                    using (System.IO.TextWriter tw = new System.IO.StreamWriter(newName, append, System.Text.Encoding.UTF8))
                    {
                        Markdown.ToHtml(System.IO.File.ReadAllText(file), tw, pipeline);
                    }

expected behavior: working convert, OR if there is some problem inside the md a meaningful exception.

I hope the error can be reproduced immediately on your side

regards
Werner

dotnet --info
.NET Command Line Tools (2.1.1-preview-007165)

Product Information:
Version: 2.1.1-preview-007165
Commit SHA-1 hash: a4d1a8e0bb

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.1-preview-007165\

Microsoft .NET Core Shared Framework Host

Version : 2.0.3

Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

event_groupby_attendee.md.txt

Originally created by @WernerMairl on GitHub (Dec 5, 2017). Hi I have a md file (attached) that causes a full stop (=catch not working, runtime stops execution) on dotnet core for a Stackoverflow/Access violation (tested with markdig 0.14.7) The md file should be attached to this issue! here the code snippet that i use to convert that file: var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); string newName = System.IO.Path.ChangeExtension(file, ".html"); bool append = false; using (System.IO.TextWriter tw = new System.IO.StreamWriter(newName, append, System.Text.Encoding.UTF8)) { Markdown.ToHtml(System.IO.File.ReadAllText(file), tw, pipeline); } expected behavior: working convert, OR if there is some problem inside the md a meaningful exception. I hope the error can be reproduced immediately on your side regards Werner dotnet --info .NET Command Line Tools (2.1.1-preview-007165) Product Information: Version: 2.1.1-preview-007165 Commit SHA-1 hash: a4d1a8e0bb Runtime Environment: OS Name: Windows OS Version: 10.0.14393 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.1-preview-007165\ Microsoft .NET Core Shared Framework Host Version : 2.0.3 Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df [event_groupby_attendee.md.txt](https://github.com/lunet-io/markdig/files/1530073/event_groupby_attendee.md.txt)
claunia added the bug label 2026-01-29 14:29:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#170