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

[Crash] Crash when rendering string of Array(repeating: "hello,\n", count: 250).joined() #312

Open
3 tasks done
mas0n-sun opened this issue Apr 30, 2024 · 0 comments
Open
3 tasks done

Comments

@mas0n-sun
Copy link

mas0n-sun commented Apr 30, 2024

Describe the bug

I found that using Markdown with a string containing 250 \n characters causes a crash. Paste the following code into the Demo project under the Repo to reproduce.

struct CodeView: View {
  var body: some View {
    DemoView {
      Markdown(Array(repeating: "hello,\n", count: 250).joined())
    }
  }
}

Below is the crash screenshot. In the SwiftUI project, I am unable to determine the specific cause. If there are any good debugging methods, please let me know.
Could you please attach the crash screenshot here? Additionally, if you could provide more details about the error message or the context in which the crash occurs, it would help in suggesting effective debugging methods for your SwiftUI project.
Screenshot 2024-04-30 at 14 17 45
Screenshot 2024-04-30 at 14 18 47

Checklist

  • I can reproduce this issue with a vanilla SwiftUI project.
  • I can reproduce this issue using the main branch of this package.
  • This bug hasn't been addressed in an existing GitHub issue.

Steps to reproduce

  1. Copy the code from the description into ContentView in the Demo project.
  2. Run the project.
  3. A crash occurs.

Expected behavior

I hope to resolve this crash as soon as possible. If needed, I can offer assistance.

Version information

  • MarkdownUI: 2.3.0
  • iOS: 17.4.1
  • Xcode: 15.2
@mas0n-sun mas0n-sun changed the title [Crash] Crash when rendering Array(repeating: "hello,\n", count: 250).joined() [Crash] Crash when rendering string of Array(repeating: "hello,\n", count: 250).joined() Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant