wbrawner / SimpleMarkdown

SimpleMarkdown is an Android app for editing Markdown!
https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown
Apache License 2.0
137 stars 18 forks source link

App Crashes on Menu #88

Closed thtgb closed 3 weeks ago

thtgb commented 1 month ago

Android 14 One UI 6.0 Samsung SM-G990W2 App Version: 1.0 Play Store

Description: App crashes whenever trying to access menu items on Edit tab. No crashes on Preview tab.

Steps to reproduce:

  1. Stays at Edit Section
  2. Press the top left menu button
  3. Click on any entry (i.e. settings, about, help etc.)
  4. App crashes and force closes

Thank you for your attention.

wbrawner commented 1 month ago

Thanks for the issue! I'm unfortunately not able to reproduce this on my Google Pixel 7. It sounds like it might be a bug in Jetpack Compose though, so I'll keep an eye on the issue tracker and push out updates as the upstream updates are available and hopefully something there resolves the crash you're seeing. If you or anyone else is able to reproduce the issue and is interested in contributing a fix in the meantime, PRs are welcome!

Lafred commented 1 month ago

I'm seeing the same issue on my Motorola Razr 2023.

Version 1.0.0

Also it won't open files from a mounted storage like one drive. Could be related to the app closing when clicking on a menu item.

On Mon, Aug 12, 2024, 5:11 PM William Brawner @.***> wrote:

Thanks for the issue! I'm unfortunately not able to reproduce this on my Google Pixel 7 Pro. It sounds like it might be a bug in Jetpack Compose though, so I'll keep an eye on the issue tracker and push out updates as the upstream updates are available and hopefully something there resolves the crash you're seeing. If you or anyone else is able to reproduce the issue and is interested in contributing a fix in the meantime, PRs are welcome!

— Reply to this email directly, view it on GitHub https://github.com/wbrawner/SimpleMarkdown/issues/88#issuecomment-2285049744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4GOZBR6S4IBQJ6SUITKRLZRE6KLAVCNFSM6AAAAABMKCG65KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBVGA2DSNZUGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

wbrawner commented 4 weeks ago

I have some good news and some bad news here. The good news is that I was finally able to reproduce it myself, on an emulator. The bad news is that it appears to be a native crash that happens when the WebView that is being used for the Preview pane is cleaned up by the OS, similar to the issue reported in https://github.com/react-navigation/react-navigation/issues/9067. The suggested fix of disabling hardware acceleration does solve the crash, but it also breaks the preview for large files (even the Help and About pages fail to load). The WebView for the previews has always been a bit problematic for me, so I'm tempted to remove it entirely and just render the markdown as native text instead of HTML, but that will take a lot of effort so I can't make any promises on when that would be ready. I'd also like to continue to investigate alternative workarounds as this bug was only introduced with the migration to Jetpack Compose (Android's new UI toolkit).

Also it won't open files from a mounted storage like one drive

@Lafred If you could open a separate issue for this, I'd appreciate it! I haven't run into this problem on my personal device with files opened from Google Drive or Nextcloud but it would be good to keep track of the issue to see if it is indeed resolved when this issue is fixed.

wbrawner commented 4 weeks ago

Actually I may have a fix. I'll try to push it out this weekend

wbrawner commented 3 weeks ago

This should be fixed as of 1.0.2, rolling out now on the Play Store