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

Rendering pane flashing #1104

Open
dpmccabe opened this issue Nov 18, 2019 · 75 comments · May be fixed by #1216
Open

Rendering pane flashing #1104

dpmccabe opened this issue Nov 18, 2019 · 75 comments · May be fixed by #1216

Comments

@dpmccabe
Copy link

Upgraded to 0.7.2 today and the rendering pane is flashing on almost every keypress:
https://i.imgur.com/F7OTGhH.mp4

It seems to happen with every combination of themes and syntax highlighting I've tried.

@MiroFurtado
Copy link

I have this same issue, somewhat renders the app unusable.

@akauppi
Copy link

akauppi commented Nov 19, 2019

Me too. macOS 10.15.1 on Mac Mini 2018. The precise build is 1008.

Happens regardless of macOS dark/light mode, or MacDown themes.

@FranklinYu FranklinYu added the bug label Nov 19, 2019
@machale
Copy link

machale commented Nov 20, 2019

When I tried 0.7.2 on macOS 10.14.6 I saw the same flashing, so I don't think this is Catalina-specific.

@homer0
Copy link

homer0 commented Nov 21, 2019

This is not Catalina specific; I haven't installed yet and I see the same blinking. I re-installed the previous version for now.

@jenstroeger
Copy link

jenstroeger commented Dec 4, 2019

Yes, same flickering issue with MacDown 0.7.2 on MacOS 10.14.6. I’m rolling back to the previous version 0.7.1 too.

@FranklinYu, any guesstimate as when this will be fixed?

@FranklinYu
Copy link
Member

@jenstroeger I haven't found the cause so I cannot provide any estimate. Sorry.

@homer0
Copy link

homer0 commented Dec 5, 2019

@FranklinYu no problem; the app is great as it is :D; I think there's no problem waiting a little bit more for all the new features.

@titanix
Copy link

titanix commented Dec 13, 2019

Same here. The software became totally unusable. I updated from 0.7.1 to 0.7.2 and I'm really surprised and disappointed by all the UI changes and instability that came in a 0.0.X version.

@FranklinYu
Copy link
Member

@titanix PR welcome 😄

@MiroFurtado
Copy link

Same here. The software became totally unusable. I updated from 0.7.1 to 0.7.2 and I'm really surprised and disappointed by all the UI changes and instability that came in a 0.0.X version.

Not hard to just use the older binary. I'm sure that the developer who donates his time to make this app has more than enough stuff to deal with.

@techdad
Copy link

techdad commented Dec 19, 2019

Also have the same, MacDown 0.7.2 (1008) on macOS Mojave 10.14.6, with OS in dark mode. Also just rolling back the latest update for now, but plus one that it happens for me.

@FranklinYu
Copy link
Member

This can easily be reproduced, but I’m still unable to find the cause of this issue. Will invest more time in it, but for the time being I plan to release a new version in stable channel addressing #1103. I guess it’s not bad to at least fix one issue.

@anatmela
Copy link

Updated from 0.7.1 to 0.7.3 (using Mojave 10.14.2), issue still exists (as predicted above). As a temporary measure, setting Update preview automatically as you type to off avoids the flicker.

@iJaack
Copy link

iJaack commented Jan 26, 2020

I'm trying to understand what is the cause that affects this. Any of you have Retina displays? which resolution? Just trying to understand a pattern :)
I have a MacBook Pro 2019 and I have this problem every now and then, but not for every character that I type.

@jenstroeger
Copy link

Any of you have Retina displays? which resolution?

Yes: 15.4-inch (2880 x 1800), Intel Iris Pro 1536 MB graphics. That’s a 2015 MacBook Pro, and it flickers consistently with every keypress.

@SSteve
Copy link

SSteve commented Jan 26, 2020

Any of you have Retina displays? which resolution?

I have a 27" late-2015 iMac with a retina screen and see the flickering. I also have a non-retina monitor attached and the flickering happens there, too.

@FranklinYu
Copy link
Member

FranklinYu commented Jan 27, 2020

I can also reproduce it on Retina iMac 2019 version. The flickering doesn’t happen every time, but only when I type fast. I suspect that when I type slowly the CPU processes it so fast that I didn’t notice it, which means that when we have a fix we need to test it on old hardware. I also have a Mac mini 2014 for this purpose.

I recommend everyone to use @anatmela’s workaround until we fix this bug.

@AHBruns
Copy link

AHBruns commented Jan 27, 2020

Having this problem on as well. Using the work around for the time being. Just wanted to add my laptop's specs to help with finding a pattern for debugging:
Screen Shot 2020-01-27 at 11 57 44 AM

@AHBruns
Copy link

AHBruns commented Jan 27, 2020

I can give more if needed.

@jpweg1993
Copy link

Having the same issue on Mojave (10.14.6). Specs are below:

Screenshot 2020-01-28 at 09 30 12

Thanks @anatmela, that workaround works great!

@craigrouse
Copy link

Same issue, 2019 MBP 32GB Ram, 8-core i9 2.4GHz, AMD Radeon Pro 5300M 4 GB graphics card. Catalina 10.15.2

@ngocjr7
Copy link

ngocjr7 commented Jul 26, 2021

It happens even with v0.7.1 in macOS 11.5 :(

@djstevenson
Copy link

djstevenson commented Aug 11, 2021

This issue hasa made the current release of the app literally unusable.

I run 0.7.3 on Big Sur (Intel Mac, currently running macOS 11.5.2). I use dark mode.

I tried 0.7.1 which seemed initially promising, but it got flickery as soon as the MD document became non-trivial.

@dljessup
Copy link

I came across this issue because my work MacBook (MacBook Pro (Retina, 15-inch, Mid 2014)) was just upgraded from High Sierra to Catalina today and the flashing problem is bugging the living foo out of me. As it happens, I also have a personal MacBook (MacBook Pro (Retina, 15-inch, Late 2013)) that has been macOS Catalina for a little over a year, and I didn't recall seeing this problem there even tho' I use MacDown on a daily basis. Both Macbooks have MacDown version 0.7.3.

After examining the behavior of MacDown on my personal MacBook more carefully, it appears that the rerender-and-scroll is happening there, too, but that it happens so quickly that it's a non-annoying flicker, whereas it is slower and much more intrusive on my work MacBook. Here are the details for my personal MacBook:

personal-macbook-details

Here are the details for my work MacBook:

work-macbook-details

Looking at them, the difference is almost certainly the NVIDIA GeForce GT on my personal Macbook; my work Macbook is the same or marginally better on the other details.

The only lesson I can see from this is that more powerful graphics hardware may ameliorate this issue.

I hope that somebody finds value in these observations.

@akauppi
Copy link

akauppi commented Aug 19, 2021

@dljessup Thanks for the analysis. There used to be a way to switch off the dedicated GPU on Macbooks. Is there still - what is the behaviour on that machine if you make sure it’s using Intel Iris Pro, as well?

@throker
Copy link

throker commented Oct 7, 2021

A simple solution/workaround would be to add a delay to updating the live preview x number of seconds after the last input.
It would be nice if this was an on/off option with a configurable number of seconds/milliseconds.

My temporary fix:
I made a Rendering style that helps reduce the flashing effect of flickering, you can grab it Gist here:

Gist
This is a MacDown rendering style to reduce the precived effect of flickering when the preview pane updates if you are using DarkMode on your Mac. - GitHub2 Darkified.css

@roycetech
Copy link

I'm a new user of this app and I was so happy when I learned that it supports AppleScript. I think @throker 's proposed solution/workaround to have a set delay after the last user input would help mitigate if not solve the problem entirely. I'm on Big Sur and currently it is ridiculous that it flashes for every key I type. Switching to light mode didn't help me either. Another workaround I could think of is to turn off auto refresh and send a periodic refresh to the app when focused.

@buzzert
Copy link

buzzert commented Jan 11, 2022

It appears that this was caused by the changes for #747. By effectively reverting that change, I no longer see the flickering issue.

diff --git i/MacDown/Code/Application/MPMainController.m w/MacDown/Code/Application/MPMainController.m
index 5a46edc..4b53fb0 100644
--- i/MacDown/Code/Application/MPMainController.m
+++ w/MacDown/Code/Application/MPMainController.m
@@ -102,6 +102,7 @@ @implementation MPMainController
 
 - (void)applicationDidFinishLaunching:(NSNotification *)notification
 {
+#if 0
     // Using private API [WebCache setDisabled:YES] to disable WebView's cache
     id webCacheClass = (id)NSClassFromString(@"WebCache");
     if (webCacheClass) {
@@ -117,6 +118,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification
         [invocation invoke];
 #pragma clang diagnostic pop
     }
+#endif
+    
     [[NSAppleEventManager sharedAppleEventManager]
         setEventHandler:self
             andSelector:@selector(openUrlSchemeAppleEvent:withReplyEvent:)

@manngo
Copy link

manngo commented Jan 12, 2022

It appears that this was caused by the changes for #747. By effectively reverting that change, I no longer see the flickering issue.

OK, so:

  • where can we try this?
  • if this works, are you in a position to update this?
  • is anybody maintaining this any more?

MacDown is still the best MarkDown editor, so it would be good to see it working.

buzzert added a commit to buzzert/macdown that referenced this issue Jan 12, 2022
For issue MacDownApp#747, a change was introduced that uses private API to disable
caching on the preview pane's web view. This was ostensibly to make it
so that if images referenced in the markdown document are changed on
disk, their changes are reflected in the preview pane.

Unfortunately, perhaps due to some underlying changes to WebKit/WebView,
disabling caching will also disable caching for all sorts of other
things like stylesheets and the base html document loaded from disk.
This results in a momentary flash of empty content if one is typing
quickly.

Reverting the changes for MacDownApp#747 resolves the flashing issue, but does
regress the issue regarding images being persistently cached.

However, the flashing issue appears to be bothering more people than the
image issue, so I believe it would be appropriate to temporarily regress
the image caching bug to resolve the flashing bug. Supposedly, a plan
exists to migrate to WKWebView, which would hopefully resolve both of
these issues simultaneously.
@buzzert
Copy link

buzzert commented Jan 12, 2022

It appears that this was caused by the changes for #747. By effectively reverting that change, I no longer see the flickering issue.

OK, so:

  • where can we try this?
  • if this works, are you in a position to update this?
  • is anybody maintaining this any more?

MacDown is still the best MarkDown editor, so it would be good to see it working.

I just posted a pull request: #1288

A maintainer will need to make the judgement about whether or not temporarily regressing the image issue to resolve this is a worthwhile tradeoff (I'm sure everyone in this thread would agree, though).

@chrischma
Copy link

Having the same flashing problem here on Monetery 12.2.1...

@roycetech
Copy link

I moved on to a paid app Marked, which is available on Setapp.

@zoltanmaric
Copy link

@yuriymacdev I did plan to move to WKWebView (see #1181), but I’m still working on that. Would appreciate a PR whether it fixes this issue or not.

Hi @FranklinYu, @buzzert submitted PR #1288 in January. Would you have some time to review it so it can be merged or fixed? 🙏

@TikoyX
Copy link

TikoyX commented Aug 29, 2022

Really hopes this issue is going somewhere!

mdznr pushed a commit to mdznr/macdown that referenced this issue Oct 22, 2022
For issue MacDownApp#747, a change was introduced that uses private API to disable
caching on the preview pane's web view. This was ostensibly to make it
so that if images referenced in the markdown document are changed on
disk, their changes are reflected in the preview pane.

Unfortunately, perhaps due to some underlying changes to WebKit/WebView,
disabling caching will also disable caching for all sorts of other
things like stylesheets and the base html document loaded from disk.
This results in a momentary flash of empty content if one is typing
quickly.

Reverting the changes for MacDownApp#747 resolves the flashing issue, but does
regress the issue regarding images being persistently cached.

However, the flashing issue appears to be bothering more people than the
image issue, so I believe it would be appropriate to temporarily regress
the image caching bug to resolve the flashing bug. Supposedly, a plan
exists to migrate to WKWebView, which would hopefully resolve both of
these issues simultaneously.
shankerwangmiao pushed a commit to shankerwangmiao/macdown that referenced this issue Nov 12, 2022
For issue MacDownApp#747, a change was introduced that uses private API to disable
caching on the preview pane's web view. This was ostensibly to make it
so that if images referenced in the markdown document are changed on
disk, their changes are reflected in the preview pane.

Unfortunately, perhaps due to some underlying changes to WebKit/WebView,
disabling caching will also disable caching for all sorts of other
things like stylesheets and the base html document loaded from disk.
This results in a momentary flash of empty content if one is typing
quickly.

Reverting the changes for MacDownApp#747 resolves the flashing issue, but does
regress the issue regarding images being persistently cached.

However, the flashing issue appears to be bothering more people than the
image issue, so I believe it would be appropriate to temporarily regress
the image caching bug to resolve the flashing bug. Supposedly, a plan
exists to migrate to WKWebView, which would hopefully resolve both of
these issues simultaneously.
@p-i-c-o
Copy link

p-i-c-o commented Feb 27, 2023

Any Updates?

@TikoyX
Copy link

TikoyX commented Feb 28, 2023

Any Updates?

since it has been there for so many years with no updates i think this app might soon be declared dead (no more updates coming)

@yuletide
Copy link

yuletide commented Apr 2, 2023

This is super annoying and makes the app not usable sadly :(

@ghost
Copy link

ghost commented Jun 20, 2023

Can replicate with newest build (from website)...

macOS 12.6.6

@robValtech
Copy link

I'm here to say how much ❤️ MacDown! Unfortunately I am still having this issue - I just downloaded the latest version (0.7.3 (1008.4)) for macOS 13.5 (M1) and the preview is still flashing when I type.

@xiaohuzhang19
Copy link

I switched to Typora, but when I updated the MacDown, the same issue was still with both the M1 and Intel MacBook Pro...

@ghost
Copy link

ghost commented Oct 4, 2023

I switched to Typora, but when I updated the MacDown, the same issue was still with both the M1 and Intel MacBook Pro...

@xiaohuzhang19 - Does Typora work well/properly?

@xiaohuzhang19
Copy link

xiaohuzhang19 commented Oct 4, 2023

I switched to Typora, but when I updated the MacDown, the same issue was still with both the M1 and Intel MacBook Pro...

@xiaohuzhang19 - Does Typora work well/properly?

@dishb It depends on the purpose.. I mainly use markdown to take notes from those math classes. Typora did an excellent job on that. I like MacDown as the syntax view on the side is better.

@undavide
Copy link

undavide commented Oct 5, 2023

Although I've appreciated the app (kudos to the developer), I've switched to Obsidian, which I love. Just in case anyone wants to know about an MD alternative.

@zetolhousa
Copy link

This issue still persists on macbook M3 sequoia 🥲

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

Successfully merging a pull request may close this issue.