Simple HTML paste that locks Scriv 1.9.7.0

JJ
JJSlote
Posts: 419
Joined: Tue Oct 26, 2010 5:44 pm
Platform: Windows
Location: NY, USA              Docs in Binder: 9800+

Mon Nov 06, 2017 8:44 pm Post

Yes, RTF and HTML are very different, so pasting into Scrivener from a web page will generally yield uncertain display results. But it's still worth pointing out instances where a particular paste freezes, locks or crashes the program.

The following is a boiled-down rendition of an HTML page found in the wild that froze my Scrivener session when pasted in. If you save it locally, it'll display with no difficulty in your browser, but if you then Select All and paste into Scriv for Windows, your session is as good as done. You'll have to end it with Task Manager or a similar tool.

Code: Select all

<html>
<body><img width="32">This page pasted in from a browser locks and freezes Scrivener 1.9.7.0
</body></html>

The problem is an IMG tag missing the SRC attribute. Improper, but doesn't warrant a freeze. While it may not be possible to code for specific cases, Scriv should time out and cancel the paste operation if it encounters a tag it can't handle or bypass.

Thanks for taking a look!

Jerome

User avatar
DavidR
Posts: 440
Joined: Fri Mar 08, 2013 12:21 am
Platform: Windows

Tue Nov 07, 2017 9:39 pm Post

I'm also using v. 1.9.7.0, and I was able to paste the text in without a problem, both into an existing document and into a new one. It displayed in green Courier New. I could continue to write, move to other documents, etc. Not questioning your experiencing, just reporting.
David
Scrivener for Windows Version 1.9.7
Windows 7 Pro 64-bit

What's the difference between a free lance and a loose cannon?

JJ
JJSlote
Posts: 419
Joined: Tue Oct 26, 2010 5:44 pm
Platform: Windows
Location: NY, USA              Docs in Binder: 9800+

Tue Nov 07, 2017 10:08 pm Post

Thanks, DavidR. Looks like you copied and pasted the code directly from the code box above. That's why your Scriv editor shows green Courier New, and presumably some HTML markup around the caption.

To test the freeze behavior, you'd have to copy and paste that content into Notepad, save the Notepad file with an HTML extension, view it in your browser, then copy and paste the entire page shown in the browser into Scrivener's editor pane.

In the graphic below, I've made a file called minimumcrash.html, am viewing in the browser, and have selected its contents for pasting into Scriv.

Hope you'll try it and let us know.

Rgds - Jerome

browserwithdoc.png
browserwithdoc.png (15.45 KiB) Viewed 324 times

User avatar
devinganger
Posts: 912
Joined: Sat Nov 06, 2010 1:55 pm
Platform: Mac + Windows
Location: Monroe, WA USA
Contact:

Wed Nov 08, 2017 1:04 am Post

Following the most recent repro steps from JJSlote, I was able to duplicate the lockup in Windows 10 Fall Creator's Edition 64-bit, using Edge browser.
--
Devin L. Ganger
Devin on Earth: http://www.devinonearth.com/
Plotter on the streets, pantser in the sheets

JJ
JJSlote
Posts: 419
Joined: Tue Oct 26, 2010 5:44 pm
Platform: Windows
Location: NY, USA              Docs in Binder: 9800+

Wed Nov 08, 2017 3:36 am Post

Devin, thank you for confirming the misbehavior!

Jerome

User avatar
DavidR
Posts: 440
Joined: Fri Mar 08, 2013 12:21 am
Platform: Windows

Wed Nov 08, 2017 4:38 pm Post

My bad, I misunderstood from where the copy and paste into Scriv was to be done. Yep, doing it as you prescribed crashed it definitively and absolutely under Win7 64-bit with Opera as the browser.
David
Scrivener for Windows Version 1.9.7
Windows 7 Pro 64-bit

What's the difference between a free lance and a loose cannon?

JJ
JJSlote
Posts: 419
Joined: Tue Oct 26, 2010 5:44 pm
Platform: Windows
Location: NY, USA              Docs in Binder: 9800+

Wed Nov 08, 2017 6:35 pm Post

Thanks for confirming, David. The fault lay in my vague instructions on how to reproduce the bug.

Cheers - Jerome

User avatar
garpu
Posts: 1807
Joined: Mon Oct 25, 2010 9:38 pm
Platform: Linux

Fri Nov 17, 2017 6:55 am Post

Yup, getting it, too. (WINE staging 2.17, pasted in from chrome 62.0.3202.94, linux version.)

Additionally I'm getting this spew in console:

Code: Select all

fixme:ole:snapshot_QueryGetData (0x1cc128, 0x33ccac {cf c097 ptd (nil) aspect 1 lindex -1 tymed 1})
fixme:ole:snapshot_QueryGetData (0x1cc128, 0x33ccac {cf c097 ptd (nil) aspect 1 lindex -1 tymed 4})
fixme:ole:snapshot_QueryGetData (0x1d4fc0, 0x33ccc4 {cf c01d ptd (nil) aspect 1 lindex -1 tymed 1})
fixme:ole:snapshot_QueryGetData (0x1cc128, 0x33cbac {cf c01d ptd (nil) aspect 1 lindex -1 tymed 1})
fixme:ole:snapshot_QueryGetData (0x1cc128, 0x33cb8c {cf c01d ptd (nil) aspect 1 lindex -1 tymed 1})
fixme:ole:get_tymed_from_nonole_cf returning TYMED_NULL for cf 0010


ETA: does not lock the native Linux version of Scrivener.
Slackware 64-bit 14.2, XFCE