Crash upon typing "="

I can’t remember when Scriv has crashed on me in my many years of using it almost every day.

I have two short lists of figures in the midst of other ordinary text in a file and was adding them up. I typed a “=” at the head of one list and typed in the total. I did the same on the second one: typed a “=” after a space next to something that says “ES-5N”.

Scriv crashed—it closed itself. I restarted, thinking this was a one-off, but I did the same thing three times and each time it crashed.

I’ve restarted and I’m avoiding "="symbols for now!

Any idea what’s going on here?

Running 3.3.6 Scriv on a Mac mini running 15.0.1.

Not a clue! It’s very unlikely to be the equals character itself though, but something else in the text. Two things to do when editing or loading a text file causes crashes:

  1. First use Edit ▸ Text Tidying ▸ Zap Gremlins.
  2. If that doesn’t clear the problem, then first take a Snapshot of the item, because this next one will be a bit destructive. Select all of the text and Cut it, then navigate to another item and back (this will clear any text data from the disk and reset the file back to defaults once you start typing). Now paste using Edit ▸ Paste and Match Style.

If the problem is gone now, there may be some formatting you need to restore, you can use the snapshot as a reference for doing that, but I would avoid copying and pasting from it, and I would mark it in the snapshot list as being potentially corrupt.

Thanks, Amber.

I’ve since cut the offending few lines out of the file concerned and put it in its own file—and now typing an equals symbol there causes no crash. I’m hoping that has fixed it.

But I’ll note your points just in case. Oh, and I didn’t know about Zap Gremlins. Always something to learn with Scriv and with your generous attention.

Interesting! What does “Zap Gremlins” do?

It tries to remove troublesome (invisible) “code” from the underlying RTF file.

Or, as the manual explains (“A.4. Edit Menu”, p. 725):

Strips Unicode and ASCII control characters from the text. If you are having difficulties compiling, or have found areas in your text where the cursor seems to get “stuck” when moving through ranges of text, your text may have acquired these invisible control characters from somewhere. This command will strip out all of the Unicode characters falling within the range of #x00 to #x1F, save for the necessary #x09, #x0A, #x0C and #X0D characters, which are used to print spaces, line returns, page breaks and tabs in your text.

(09 = Tabulator, 0A = Line Feed, 0C = Form Feed, 0D = Carriage Return)

4 Likes

Very cool. Thanks so much for the info.

1 Like

While we’re at it, @AmberV: Zap Gremlins doesn’t remove #0x7F (ASCII Char 127 = Delete). No biggie, but it also causes the cursor to get stuck.

Gremlin zapping is also a useful thing to try if text that’s present in Scrivener is mysteriously missing in your output document. I ran into that one recently: text copied from a PDF failed to paste, but apparently did leave a pair of invisible gremlins bracketing the next few words I typed.