Strange behavior during Search and Replace

Apologies if this has been raised before but I just encountered it.

When working in a large file (who knows, it might happen in a small file too) I did a search and replace in one of my character files I’d copied from the character template.

Strange behavior:

  1. The search failed to turn up Upper case instances, even though “ignore case” was selected.

  2. The search and replace turned up fewer instances than it should have.

  3. The text began to disappear from the file. When I clicked into another file and back into the file in question, all the text was gone. When I rebooted Scrivener, the text had returned.

Weird, and disconcerting.

Which version of Scrivener are you running? There was a similar bug in an older version, but it was fixed somewhere around 1.01 or 1.02, I believe.

Also, could you please read the bug report procedure thread:

literatureandlatte.com/forum … c.php?t=52

And post the required information so that I can reproduce this (step-by-step instructions to reproduce)? That will make tracking and fixing something like this a lot easier. Also, if you open console.app whilst doing this, do you see any console errors?

Thanks,
Keith

Hi Kieth,

Sorry, I’m running 1.03

The step-by-step is:

  • Open a file in a big document (in my case, a character file based on the character template you provided),
  • do a search and replace of a phrase
  • watch the text in the file gradually disappear, first a few lines, and then, as you scroll around, more and more text.
  • Click out of the file, click back into the file, and all text is gone.
  • Reboot, and it’s back again.

But I have to say, I’ve tried reproducing it and I haven’t been able to. Which is useless to you, I know. If it happens again, I’ll let you know right away.

I noticed a few days ago something like: Hey, didn’t I change the name of this location in all chapters?

Yes, I did - but the old name had returned …

I’m able to reproduce it.

  • Latest Beta.
  • iBook G4
  • OS 10.4.10
  1. Create a new Project Binder
  2. In the default text file write “bla bla good bla bla”
  3. Create a folder
  4. Press Enter to create a new text file in this folder
  5. Write “bla bla good bla bla” there, too
  6. Click “Draft” in Binder
  7. Select “Edit Scrivenings”
  8. Click in the editor to have the cursor there - make it the first line and the first character, the uppermost left corner
  9. Apple-key + F - the search dialogue appears
  10. Find: “good” / Replace: “bad” / Click: Replace All. Result: 2 replaced
  11. Close search dialogue
  12. Save or wait till autosave, then close Project
  13. Open Project - the 2nd “bad” has returned to its previous “good” state

I’ve fiddled with it - seems to depend where the cursor is when Replace All is clicked. Sometimes everything is acutally there after close & re-open - but I even had one case, where “good” was on the screen, but could not be found - “internally” the two words were “bad” …

Hope this helps?

TCole - that sounds like an exception is getting thrown. Once an exception gets thrown, things will start acting odd - such as the drawing of text may not occur properly. Next time this happens, check out Console.app - I bet an error gets written out. That will help me find it. Unfortunately it is one for which I will have to wait to happen again.

Typo - I’ll take a look into it.

Thanks!
Keith

Following up on this. To be sure that it’s not some individual thing on my iBook I tried the exact same thing on my iMac Core Duo with 10.4.10 and the latest beta - and had the same behaviour.