scripting / drummerSupport

Support for Drummer users.
19 stars 0 forks source link

Empty tab as a result of invalid OPML #151

Open PostMonsterG opened 2 years ago

PostMonsterG commented 2 years ago

Some empty tabs in Drummer may actually be the result of invalid OPML. This issue is not about how the file got to be invalid, this is more how to detect this type of problem.

Discussion

Determining if a blank tab is caused by invalid OPML

opml.parse( file.readWholeFile( "potential-bad-file.opml" ))

Fixing the bad file

scripting commented 2 years ago

Is there a reason you can't provide the file itself?

PostMonsterG commented 2 years ago

Because it wasn't relevant. I think I misunderstood what drummerSupport is for, you can close and delete this.

scripting commented 2 years ago

Of course I can close the issue, but you seem to be reporting a bug. Why did you post this? Do you want me to investigate?

scripting commented 2 years ago

I re-read your post and I think what you're doing is trying to provide support not asking for support. If that is the case, that is not what this place is for, and you should delete the post.

However, I think the best way to deal with this is to teach Drummer not to have a problem with such files. For that I would need an example of how to produce the problem. Of course I can create a file that has invalid OPML and see what happens (and I will do that), or you could help me out and save some time and give me a pointer to the file that caused the problem. That would be an appropriate use of this forum.

Gary, I have so little time, and am so stretched, I don't want these kinds of issues to keep popping up. Please stop trying to test the boundaries. Thanks.

PostMonsterG commented 2 years ago

As I said, and you confirmed, I misunderstood the purpose. Your question immediately clarified that for me, and I instantly regretted the intrusion.

Any pushing of boundaries was unintentional. I didn't delete this myself because I didn't realize I can do that sort of thing.

scripting commented 2 years ago

Thank you. 'd like to investigate the problem and make Drummer more resilient so the blank tabs don't happen. Are you willing to help?

PostMonsterG commented 2 years ago

Yes, of course.

PostMonsterG commented 2 years ago

The previous example wasn't a public outline, but I have one in my Drummer account right now that is. The file is at http://drummer.scripting.com/PostMonsterG/blog.opml and currently shows as empty in Drummer. I have an automated backup of all my Drummer files in GitHub, so I plan on restoring it. That will be later today after work (Pacific time) in case you want to take a snapshot of the file before then.

Unfortunately I do not have good repro steps. I can describe what I was doing. Nothing involving editing icon bars or menus, no scripting, just normal outline editing. Some copy-pasting of outline nodes with embedded a href links but nothing else fancy (I think). I forgot to note which tabs were open at the time, there were several, but none have been problematic for months.

I had copied and pasted the bottom two nodes from http://drummer.scripting.com/PostMonsterG/Previously.opml into http://drummer.scripting.com/PostMonsterG/about.opml and was about to do the same to update the most recent post in blog.opml when I noticed the blank tab. I was unable to close it manually. Hard reload… did not fix that, but Reset tabs… did. I've re-opened the file since but it's still empty for now.

Please let me know if there's anything I can do to assist, including providing previous versions of the file, holding off on fixing it myself, etc. Thanks!

scripting commented 2 years ago

I don't have any time right now to dig into this, but I did check the file for validity and it's not valid XML.

It's definitely not empty.

In line 308 there are two created atts.

Did you edit the file by hand by an chance?

Dave

PostMonsterG commented 2 years ago

No, everything is edited in Drummer, using Drummer's UI. Whatever is in that file—I have not looked yet—was written by Drummer.

PostMonsterG commented 2 years ago

I pulled my latest backup from GitHub. This version has dateModified Thu, 16 Jun 2022 21:32:34 GMT. The broken file has dateModified Thu, 16 Jun 2022 21:33:22 GMT, less than a minute later. Line 308 looks OK in the backup version, but the broken file looks pretty broken from that point on down. I will be looking into the diffs to see if I can determine a specific string that can trigger this, and thereby construct an appropriate test case that isn't 650K.

blog-broken.opml.zip blog-lastbackup.opml.zip