tag:support.multimarkdown.com,2013-02-12:/discussions/betas/150-b26-just-started-bouncingMultiMarkdown Software, LLC: Discussion 2017-09-05T19:13:37Ztag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-01T17:18:14Z2017-09-01T17:18:16ZB26 just started bouncing<div><p>Been using B26 for about an hour on my long file (like the sample I sent). It just started bouncing, i.e. moving the editor text vertically when typing. I'm scrolled all the way to the end on the editor side, i.e. the last line in the file is the bottom line of the screen. The cursor is almost at the end of the file, around 15-16 lines from the bottom. I started typing, and it moved the line I was typing on to the bottom of the screen.</p>
<p>Like before, once it starts happening it keeps happening, and it happens anywhere in the file, i.e. the bouncing happens anywhere in the file after the first screen (it can't scroll any further there).</p>
<p>I've closed and re-opened the file. I'll let you know if happens again. (The file is up to 756 lines, around 71K.)</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-01T19:27:55Z2017-09-01T19:27:55ZB26 just started bouncing<div><p>I can't reproduce the jumping, but did discover something else that may or may not be related.</p>
<p>I added a complex list to the end of the test document you sent and noticed that the range of text that had the highlighting updated toggled through several different ranges, leading to unusual highlighting results that would cycle through a few configurations. Long story short, there was a situation whereby multibyte UTF-8 characters were not being properly accounting for.</p>
<p>I fixed that, which fixes the unusual highlighting I saw, and which <em>may</em> fix the issues you had seen around a list.</p>
<p>I don't know that this is related to the jumping, but if it was causing enough strangeness in the highlighting that it was throwing the layout off, I guess it's possible??</p>
<p>If you find a way to reliably trigger the bouncing in B26 (or the upcoming B27), let me know and I'll keep digging.</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-01T19:45:49Z2017-09-01T19:45:49ZB26 just started bouncing<div><p>Can you send me a screenshot of your appearance preferences and your editing preferences?</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-01T20:00:11Z2017-09-01T20:00:15ZB26 just started bouncing<div><p>Sure.</p></div>Vince Ricetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-02T17:16:52Z2017-09-02T17:16:52ZB26 just started bouncing<div><p>To clarify, when you say bouncing -- is the <em>screen</em> bouncing around, but the letters you type end up in the proper place in the document? Or is the cursor moving around causing the keystrokes to be recorded in the wrong place?</p>
<p>I had an issue during testing this morning where the cursor was being moved, causing keystrokes to end up in the wrong place, but I am 99% sure that was because of the changes I was making <em>after</em> b26 to facilitate enabling spell check correction, and <em>not</em> related to what you saw. But better to ask.</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-02T17:42:45Z2017-09-02T17:42:47ZB26 just started bouncing<div><p>Same as it's been this whole time; I just used the same term to be consistent.</p>
<p>The line I'm typing on is, say, line 30 out of 60 on the screen. I start typing; the whole document is shifted such that what used to be line 30 is now line 58. Same type of behavior that Typewriter mode has (although it's typically moving everything to the center). When this happens, it's always moving the line I'm typing on to the bottom of the screen, i.e. within a line or two of the bottom of the screen.</p>
<p>And, as I've previously noted, sometimes this happens when I type the first letter, sometimes it happens after I hit Enter. And it's (AFAICT) completely random; I'll have been working in a document for 30 seconds or 30 minutes, and suddenly it starts moving everything. But once it happens, it happens almost every time (I would say every time, but there's probably been an exception), making MMD unusable (for me). I have to close and re-open the document.</p>
<p>I'm guessing it's size and/or complexity of document-related; if so, what I'm working on is a pretty good-sized document (78K+, 13K words, 80K characters, 271 paragraphs) and thus I'm seeing it more often. But if people are writing novels with it, mine's still not that big. :)</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-02T20:08:28Z2017-09-02T20:08:28ZB26 just started bouncing<div><p>Found two possible culprits -- there was a possible conflict when using auto save mode, and another that could cause false positive adjustments when typing caused an additional line of text to be created in the editor pane.</p>
<p>Should be fixed for b28!</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-03T07:12:40Z2017-09-03T07:12:41ZB26 just started bouncing<div><p>Sorry for the bad news, but I just loaded my file in B28, scrolled around for a bit (Preview still not synced initially), and the very first letter I typed caused the shift/bounce. And every subsequent edit throughout the file.</p>
<p>But after playing with it a bit, I think I've figured out that it's related to Preview scrolling. In my large file, when the last line of the editor side is at the bottom of the screen, there are still two paragraphs (two line numbers, but eight lines of text or so) off the screen to the bottom on the Preview side.</p>
<p>If I scroll to the bottom on the editor side, put my cursor where I want to edit (say two-thirds up the screen) and start editing, it works fine.<br>
However, if I scroll to the bottom on the editor side, <em>then scroll the Preview side to get the bottom line of the Preview</em> (which in turn causes the editor side to scroll up and add white space at the bottom of the screen), the any edit on the editor side does the bounce.</p>
<p>That is repeatable. Open the file, scroll to the bottom on the editor side, start editing, no problem. Open the file, scroll to the bottom on the Preview side so there is whitespace below on the editor side, then scroll the editor side so the bottom is the bottom again, then edit (anywhere), it bounces, and does so from that point forward. Because of the initial sync problem, you might have to scroll the editor first, then scroll the Preview side, but once the Preview side causes whitespace at the bottom of the editor side, the editor side will bounce on edit.</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-03T10:50:19Z2017-09-03T10:50:19ZB26 just started bouncing<div><p>Since you can now repeatedly make it happen, can you send a video so I<br>
can see exactly what is happening?</p>
<p>When I use your test file, I still don't see anything unusual repeating<br>
the process you describe.</p>
<p>When scrolling the preview such that the editor moves beyond its natural<br>
boundaries, there is an initial jump with the first keystroke to put the<br>
editing pane back where it belongs (since, as you describe, it was<br>
scrolled upwards "too" much). But after the first keystroke, all is<br>
well. (Unless I start typing while the scroll is still in motion, which<br>
as discussed earlier is going to cause "jumps" while the scroll is still<br>
in motion.)</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-03T15:55:17Z2017-09-03T15:55:18ZB26 just started bouncing<div><p>No, read what I wrote again.</p>
<blockquote>
<p>Open the file, scroll to the bottom on the Preview side so there is whitespace below on the editor side, then scroll the editor side so the bottom is the bottom again, then edit (anywhere), it bounces</p>
</blockquote>
<p>I put the editor side back in normal position before I start editing. This isn't "normal" bouncing — give me some credit, I've been reporting this problem for two weeks, I'm pretty familiar with it by now. :) I'm not typing when the scrolling is in motion. I'm doing exactly what I've always been doing — just normal editing. I just figured out something that happens before I'm typing that appears to cause the problem about 99.9% of the time.</p>
<p>I have the same problem with a video that I did before; first, it's too big, I can't email it, and second, I'll have to try to repeat this with my test file, I still can't give you pictures of my real one.</p></div>Vince Ricetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-03T19:25:37Z2017-09-03T19:25:40ZB26 just started bouncing<div><p>I had some time and tried it on the test file (which I don't believe I've touched since I sent it to you).</p>
<p>Open the file. Scroll to the bottom on the editor side; "Twelth Topic" is displayed on the bottom of the left, I have "Ninth Topic" on the bottom line on the Preview side. IOW, three topics, about six lines, below the screen on the right.</p>
<p>Put your cursor at, for example, the lorum just above Seventh Topic on the editor side. Type a character. I have no problem, i.e. nothing untoward happens except the character appearing. Normal behavior.</p>
<p>Now, scroll the Preview side so that you can at least see Twelfth Topic, which will of course put blank space on the bottom of the editor side. I've gone a little farther, and attached a screenshot of what it looks like.</p>
<p>Now, scroll on the editor side and go to the bottom. Things should look like exactly like they did above; the last line in the file is on the last line of the screen (white space gone), and the Preview side shows "Ninth Topic" (for me) again. Your cursor should still be at the lorum above the Seventh Topic (you haven't typed, just scrolled). Type a character. For me, that line immediately jumps to the next line from the bottom of the screen, which, for me, was over half the screen height. IOW, the "bounce".</p>
<p>I can repeat that all day long. Well, at least for the last five minutes. :)</p>
<p>So, if the above and the screenshot isn't enough, I can do a video, you just have to tell me how to get it to you. I can't email it, and the site says "files up to 10MB," which is not nearly enough.</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-03T19:26:27Z2017-09-03T19:26:28ZB26 just started bouncing<div><p>And of course the screenshot didn't come through again. Your site has real problems with attachments. :) Trying again.</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-03T22:01:52Z2017-09-03T22:01:52ZB26 just started bouncing<div><p>How tall is the window you use?</p>
<p>I was able to recreate this once, but now I can't. It's not clear what's changed.</p>
<p>I did find an issue that could cause the cursor to move to a different character offset if there was a spelling error that was automatically corrected. But nothing related to scrolling per se.</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-03T23:56:17Z2017-09-03T23:56:17ZB26 just started bouncing<div><p>In my test document, starting at the top of the document, I see from First Topic to the first line of the last paragraph before the third sub-topic. IOW I see all but one line of the second sub-topic. That's 49 lines in the file, but since several of them wrap, it's probably more like 80 lines total.</p>
<p>If I scroll all the way to the end and force the last line of the file (Twelfth Topic) to be the very bottom line of the screen (that's not where scrolling all the way to the end puts it; when scrolling, there's always two or three lines of blank space beneath it), the top line is the third-subtopic of the Sixth topic. But it's about half-way off screen.</p></div>Vince Ricetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T00:01:25Z2017-09-04T02:56:43ZB26 just started bouncing<div><p>But it doesn't seem to matter. I just shortened the window by almost half. With the Twelfth Topic as the last line on the screen, the top line is now that lorum just above the Seventh topic.</p>
<p>And the behavior was the same — scroll to the bottom on the left, no problem, scroll a little past the bottom on the right, then re-position to the bottom on the left, instant bounce.</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T00:06:30Z2017-09-04T00:06:30ZB26 just started bouncing<div><p>If you have a video, you can use this to upload:</p>
<p><a href="https://www.dropbox.com/request/LPcYtrW6nWogL3oYioBY">https://www.dropbox.com/request/LPcYtrW6nWogL3oYioBY</a></p>
<p>Maybe I can see something that will point me in the right direction.</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T02:58:10Z2017-09-04T02:58:10ZB26 just started bouncing<div><p>I assume it's still happening in b30??</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T04:15:11Z2017-09-04T04:15:13ZB26 just started bouncing<div><p>It wasn't available yet when I was testing earlier today. I just dl'd it and, interestingly, it didn't do it the first two times I tried, which are the first two times it hasn't done it since B28(7?). But, I just closed and re-opened the file, and it did it straightaway. I'll work on a video tomorrow; it's late here and I'm done for the day.</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T04:57:17Z2017-09-04T04:57:18ZB26 just started bouncing<div><p>All right, I couldn't resist. It's uploading. It did it immediately this time; I didn't show the opening of the file, but that's all that's happened before the video, no typing, scrolling, nothing. Hope it helps!</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T11:01:26Z2017-09-04T11:01:26ZB26 just started bouncing<div><p>Thanks for the video.</p>
<p>Does it happen when the window is smaller? I don't have a monitor that large to be able to precisely reproduce (1920x1080p is the largest I can do -- when testing this I usually make the window as large as I can, but also test smaller versions as well).</p>
<p>I still haven't been able to reproduce it since yesterday.</p>
<p>What happens after that? The video showed the initial repositioning and then ended. Does it continue to jump while you type?</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T11:06:49Z2017-09-04T11:06:49ZB26 just started bouncing<div><p>....Except when I turn on the scroll bars to be always visible like yours. Then it happens.</p>
<p>(And that's why I've been asking for the video for so long..... It's always the things people don't think to tell me (or even notice) that end up being important).</p>
<p>In system preferences, set scroll bars to only appear "when scrolling". See if that resolves the problem.</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T14:19:50Z2017-09-04T14:19:53ZB26 just started bouncing<div><p>I already answered the first question yesterday:</p>
<blockquote>
<p>But it doesn't seem to matter. I just shortened the window by almost half. With the Twelfth Topic as the last line on the screen, the top line is now that lorum just above the Seventh topic.</p>
</blockquote>
<p>And I don't have scroll bars always visible. It's "automatically based on mouse or trackpad". There are no scroll bars as I'm looking at the app right now.</p>
<p>And the proper way to form that sentence is "…It's always the things <em>I don't think to ask about</em> that end up being important." :) You persist in sounding like you're blaming your user. Words matter — the onus for this problem is on you, not me. I've answered every question you've asked, and a lot you haven't. If you didn't think to ask some, that's not my problem.</p></div>Vincetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T16:35:32Z2017-09-04T16:35:32ZB26 just started bouncing<div><p>I think this is now fixed in b31</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T16:36:08Z2017-09-04T16:36:08ZB26 just started bouncing<div><p>Just an FYI for anyone following the thread or finding it later (and to serve as a reminder to me):</p>
<p>(Written stream of consciousness as I tried to figure it out, and finally did part way through....)</p>
<p>I can now (generally) reproduce the issue. Unfortunately it disappears when running the debug version of the app in Xcode. Generally, this has meant that the problem was a "race condition" between two threads requiring proper timing for the issue to appear.</p>
<p>In this case:</p>
<ul>
<li>
<p>Everything that seems relevant is occuring on the main thread, so not likely to be a race condition</p>
</li>
<li>
<p>Typing 1 key every second or two still produces the problem</p>
</li>
<li>
<p>Noncontiguous Layout on the NSTextView is NO (when enabled, this allows portions of the text to be laid out for display while skipping other parts. This causes the "space jump" issue on the text view (which I believe is to the similar behavior in WebView's when a space is added to the text)) Setting it to YES didn't help, and causes other issues</p>
</li>
<li>
<p>The only scrolling that is being called is <code>scrollRangeToVisible:</code> -- I wrap it only to enable debugging, otherwise this is an Apple provided method. I added debugging statements to everything scroll related for NSTextView that I could find, and nothing else is being called. The character range for this call is correct (incremementing by 1 for each character I type since I'm typing in one place)</p>
</li>
<li>
<p>The issue occurs on 10.12.6 and 10.13 beta (I have not tested on 10.11)</p>
</li>
<li>
<p>The issue occurs whether synchronized scrolling is always on or not</p>
</li>
<li>
<p><em>BUT</em> it was necessary to use sync scrolling to scroll the text view above it's natural bounds (by scrolling the webview all the way up) to trigger the behavior. I could not get it to occur without doing this first</p>
</li>
<li>
<p>Once triggered, scrolling can remain entirely inside bounds and the behavior can continue</p>
</li>
</ul>
<p>I think it is finally resolved. As above, I could find nothing wrong in the textview. The sync scroll requirement finally let me to look elsewhere.</p>
<p>The problems seems to be using the following to scroll the editor or web view when sync scrolling:</p>
<pre>
<code>[[self contentView] scrollToPoint:curOffset];
[self reflectScrolledClipView:[self contentView]];</code>
</pre>
<p>I changed to the following:</p>
<pre>
<code>[[self documentView] scrollPoint:curOffset];
[self reflectScrolledClipView:[self contentView]];</code>
</pre>
<p>This <em>seems</em> to fix the issue. I can no longer replicate it. We'll see if anyone else can.</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T18:47:51Z2017-09-04T18:47:52ZB26 just started bouncing<div><p>I haven't stress tested it with an extended editing session, but I haven't been able to make it happen in 4-5 attempts (closing and re-opening the file each time) of doing the same steps that has been causing it the last several versions. So, yea!!</p>
<p>It's Labor Day here in the States (I don't know where you are, physically), so I'll get back to a more extended "test" (i.e. by doing real work) on it tomorrow.</p>
<p>Great job, and thanks for the explanation, it's interesting. If I knew more about Mac development (I know just enough to be dangerous), it would probably be even more interesting. :)</p></div>Vince Ricetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-04T18:55:13Z2017-09-04T18:55:13ZB26 just started bouncing<div><p>Also in the states, so working on Labor Day for me. but working from home still beats working at the hospital in many ways, so no complaints.</p>
<p>I just knew you were going to email to let me know the problem still existed for you, so failure to recreate thus far is still good news!</p>
<p>Thanks again for the video -- that helped me get to the right track to fix this.</p>
<p>I've always been intrigued by the stories of how problems are solved, even if the problem is not one I thoroughly understand. And reading those from others on the web have often helped me figure out the right direction for my own difficulties, even if the details are different. Hopefully this will help some other programmer sometime.</p>
<p>The remaining things on my to do list are either not high priority, or features I want to add to future versions. So I hope to wrap things up with "4.0" in the next few days and submit to App Store.</p>
<p>Again, thanks for helping me to sort through this one. It wins the prize for being the most troublesome bug to track down that I've had to deal with.</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-05T19:10:54Z2017-09-05T19:10:55ZB26 just started bouncing<div><p>Just a (good) update — I've been using it a couple of hours on my big file, and no bouncing. I don't think I've gone that long without bouncing since I started the beta. So yea again!</p></div>Vince Ricetag:support.multimarkdown.com,2013-02-12:Comment/433427322017-09-05T19:13:34Z2017-09-05T19:13:34ZB26 just started bouncing<div><p>I saw that you updated this thread and my heart dropped..... ;)</p>
<p>Glad it's a good update! I don't know that I have it in me to look for yet another cause for this issue....</p></div>Fletcher