drummerSupport icon indicating copy to clipboard operation
drummerSupport copied to clipboard

Outlines being overwritten

Open scotthansonde opened this issue 4 years ago • 14 comments

I saw a report of the contents of an open outline being overwritten by the contents of an open public outline. Something similar had happened to me as well. I decided to use a test Twitter account (papascottpork) to try to reproduce this behavior. I was able to do it twice.

The first time I started Drummer and immediately opened the console in DevTools. I opened a test outline with a couple of lines of text, then opened the DW Demo Menu. I clicked around back and forth, tried to run a couple of scripts, and noticed that the title and the contents of the test outline had changed to those of DW Demo Menu. I can't say exactly what action I took right before this happened. I did save the console output and downloaded the files (console log 1.txt, pork-myfiles 1.zip).

The second time I paid more attention to my steps. I started Drummer, opened a new test outline and the DW Demo Menu. From the DW menu I ran the I/O permalink script. That opened a new tab with Drummer, as expected (the previous tab opened the About Drummer page). In the new tab the test outline had the title DW Demo Menu and no content. When I reloaded the tab the contents of the test outline were now that of the DW Demo Menu. I saved the console output for both tabs and downloaded the files (console log 2-1st tab.txt, console log 2-2nd tab.txt, pork-myfiles 2.zip).

I tried two or three times to get this to occur again, by having a test outline and a public outline open then running the I/O permalink script, but I was not able to repeat the behavior.

scotthansonde avatar Oct 17 '21 12:10 scotthansonde

@papascott -- thanks for starting this thread with a concrete report. obviously there aren't reproducible steps for this problem yet, but it's on the way.

These notes are not just for Scott, they are for anyone else who wants to help by trying to reproduce the problem.

Here's what i took away from the report.

  1. There are two outlines involved. One is a new outline you created for the test and added some text to, and the other is a public outline.

  2. You clicked back and forth between the outlines.

  3. The test outline at some point was overwritten by the contents of the DW Test Menu. Both the title in the tab and the contents had changed.

  4. Next time, a screen shot of the tabs would help.

  5. Big difference appears to be in one case the test outline was changed, in the second it was blank. But when you reloaded the app it also contained the contents of DW Test Menu.

scripting avatar Oct 17 '21 13:10 scripting

This is very much like what I experienced. Although I didn’t spend the time to reproduce, so thanks for that.

I had an I/O open of my own: the original file and then the file opened via its URL plus my blog. A series of clicking back and forth resulted in blog become the I/O file.

I was going to do it anyway but setting up a back up mechanism is straightforward. I have a script on my computer to download and commit my public opml to git.

alexjj avatar Oct 19 '21 06:10 alexjj

@alexj -- thanks for getting back in the flow on this. I am sorry for deleting your initial comment on this topic. It had been a rough day here. To make a long story short, I have been involved in online dev communities that got abusive and unproductive and other posts that day were headed in that direction (not yours). It came at the end of the day, I was trying to watch baseball, with a knot in my stomach that I recognized. I love making software and working with smart people in a collegial fashion. But in past communities all that disappeared and it turned into an angry, resentful place -- and I'm not going back there. Anyway none of this is your problem -- you obviously are helping, and that's much appreciated.

scripting avatar Oct 19 '21 12:10 scripting

I want to try to sum up what we know about this problem.

  1. An instant outline is involved. And a non-instant outline.

  2. Under some set of circumstances, the contents of the normal outline is overwritten with the contents of the instant outline.

  3. Since Scott reported that the I/O involved in his situation was the DW Test Menu outline, and I wasn't updating the outline, it's fair to say that the I/O does not have to update in order for the problem to appear. Updating of I/Os is a tricky time for Drummer. But we're almost certainly not looking at that here. Just switching tabs is involved.

  4. But there may be some other operation that causes the mess. Scott reports that he ran a script from the DW menu. I'd like to suggest for the next tests that people NOT run scripts, unless you want to take notes on which scripts you ran. Scripts, obviously can do a wide variety of things. Just saying "a script" tells us almost nothing about what happened.

So -- what else do we know and not know about this problem?

Remember -- we're trying to get reproducible steps. The shortest possible set of steps that gets us the desired (bad) result. Then we have an idea of when it's been fixed.

Finally -- thank you to everyone who is participating in the crusade to get Drummer 100 percent reliable in this area.

scripting avatar Oct 19 '21 12:10 scripting

I have a question that I think I know the answer to but I want to be sure.

  1. Every case involves an I/O.

  2. Were the I/Os all opened by double-clicking on a link to open the I/O?

  3. Were any of the outlines opened via the Open URL command in the File menu?

I think the answer to #2 is yes.

scripting avatar Oct 19 '21 13:10 scripting

Were the I/Os all opened by double-clicking on a link to open the I/O?

No. In my case I opened the I/Os through the top pull-down menus in Drummer (either Doc->Change notes or DW->View source).

scotthansonde avatar Oct 19 '21 13:10 scotthansonde

@papascott -- that's interesting and that matters.

scripting avatar Oct 19 '21 13:10 scripting

  1. Were the I/Os all opened by double-clicking on a link to open the I/O?
  2. Were any of the outlines opened via the Open URL command in the File menu?

I opened mine via a link. In the format:

http://drummer.scripting.com/?url=http://drummer.scripting.com/davewiner/drummer/changeNotes.opml

alexjj avatar Oct 19 '21 14:10 alexjj

BTW, I've been going back through the Change Notes archive, and came across this postmortem on a bug that was somewhat similar to the one we're chasing here. It might give us ideas...

http://scripting.com/drummer/blog/2021/09/21/165132.html?title=foundAndFixedTheUntitledProblem

scripting avatar Oct 19 '21 16:10 scripting

Another report on a similar problem.

http://drummer.scripting.com/?url=http://drummer.scripting.com/davewiner/drummer/changeNotes.opml&cursor=1630355265000

That might not open on it's own. Surprising that it did on my machine. The note is on August 30, if it doesn't open you can easily navigate there yourself.

scripting avatar Oct 19 '21 16:10 scripting

I have lost my blog.opml. I suspect it was overwritten. I have a backup for restoring.

Here's what happened:

I was out of town for the last three days, without my computer. I returned home tonight, got out the computer, opened a browser tab in Safari, and typed drummer.scripting.com.

I immediately saw two tabs and both were named Notes. I closed one, and attempted to open the blog outline but there is not a file named blog.opml anymore.

I don't see any errors in the console.

The last thing I remember doing Sunday was using the new Bookmarklet that opened the Notes outline. I would have had the blog.opml file opened at the time, and most likely closed the tab with both outlines open.

I will return to this tomorrow, rebuild my blog, and test the Bookmarklet again.

mistersugar avatar Oct 27 '21 01:10 mistersugar

Now I think we have steps to reproduce.

scripting avatar Oct 27 '21 01:10 scripting

This had already happened to me several times with Little Outliner, another @scripting project that predates Drummer. And in those cases there were no I/Os involved.

oevl avatar Nov 22 '21 22:11 oevl

@oevi -- believe me -- I want to get to the bottom of what's happening there.

we have as a community when drummer was in testing, worked on this, and managed to document steps to reproduce, and thus fixed problems.

but we sort of trailed off there, after a while, and there are outstanding issues. i just don't know what they are. ;-)

i put a lot of debugging code in there, to try to identify when it might be happening, but it doesn;'t do any good if no one is watching.

anyway....

this weekend I changed the code a bit. i don't know if the change will prevent the problem.

but here's how you (and everyone else) can help.

  1. If it happens to you, the instant you notice it, take your hands off the keyboard, and pause for a moment, please don't try to do anything for a bit of time.

  2. Now, if you know how to use the JavaScript console, open it, and look for messages that refer to this situation. Som instant outline has updated and the software did the wrong thing with it. There might be a clue there.

I'm confident that eventually we will nail all the problems -- because we have an active user community this time. LO2 never had that.

scripting avatar Nov 22 '21 22:11 scripting