Big RTF problems - pasting, searching, blank files

I just installed the latest update, and some bad things started to happen, which I have been able to reproduce. BTW - I’m running OS X Yosemite 10.10.1 on a Mac mini (Late 2102) with a 2.6 GHz i7 CPU, 8 GB of RAM, and a 1T Fusion drive.

  1. I created a large text document, using (Scripts)->Export->Listing…, then imported it into DEVONthink Pro Office, although I could probably have used any file (it was 544 KB in size).

  2. I then created a new empty new Rich Text inside of DTPO.

— Just to help you with my terminology, I call anything I create and edit inside of DTPO a “page”, to distinguish it from a file external to the application that was created and modified with other applications, such as TextEdit.

  1. I copied all the content of the text page, and pasted it into the Rich Text page. Everything appeared as expected, in the text style I usually use.

Then the fun began.

I tried searching for a string that I knew was there, and the search dialog box could not find it.

I edited the page and saved it - still nothing odd.

I then selected (in the list view) a different page to look at, and came back again - lo and behold, although the list still showed a large size, the text I pasted into the view/edit pane was completely blank. Just to be sure, I exported it as an RTF file, and looked at it with a text editor - every character was replaced with a slash:

\f0\b0\fs28 \cf0






\

[I didn’t count them, but I would guess that there were at least 20,000 slashes :wink:]

The Verify & Repair tool couldn’t find anything wrong.

I quit the application, then opened it again - all my data was intact (except for the one blank page), and I tried it all again - copying text to a new Rich Text page, and doing the same thing. It behaved exactly the same way as before.

I just tried it again, and discovered that although the status bar shows:
14651 paragraphs, 180754 words, 544152 characters
and nothing appears to be missing in the view/edit window,
the saved document shows a size of only 28.8 KB in the list view and the Info window. I recall that the status bar accurately showed the number of characters when I deleted text.

I’ll first download a fresh copy of the application and install it again. If that doesn’t work, I will try to reinstall the previous version of the software and work from a backup database I exported last night. That should isolate the problem to a specific version - if need be, I can go back several versions (I save the application bundle to a zip archive whenever I update).

In the meantime, please look into the problem (DEVONtechnologies folks and users - if you have time) and see what I’m missing.

Thank you,
Ed

Ugh - I just found that TextEdit does exactly the same thing, so it’s a bug in Yosemite. If one creates a blank RTF document, and pastes a lot of text into it (not sure how much is “a lot”), then saves it, it will result in a 30KB document that’s all blank.

Since I’m not a developer, I can’t open a bug report with Apple.

Could one of you check this out and file a report?

Thank you,
Ed

Confirmed. It doesn’t matter what the document size is – make a small .txt document in DEVONthink and use Data > Convert > To Rich Text and you get an RTF with no content. Paste the raw text content into TextEdit and save as RTF and get the same result. Also see the problem in Bean, but not in Mellel. The text document crashes Pages.

The “codes” you mentioned in your note are the raw RTF coding – this is what an RTF file looks like when it is opened as plain text.

I don’t think installing a back release of DEVONthink will solve the problem – but let us know how that goes. It seems to be an Yosemite issue. Because Mellel thought the file was an RTFD document (styled text + images) I’m wondering if the real root cause is some corruption in the clipboard. Just conjecture.

I think I found the answer - it’s in the Export->Index… Script, although it should work as written.

The script creates the index file as Unicode (UTF-16), which it should, since not everyone using DTPO uses Latin text in their native languages.

The text-handling classes in OS X apparently don’t know how to convert UTF-16 text to RTF properly. When I used BBEdit to convert the index file from UTF-16 to UTF-8, the conversion to RTF works properly.

In the meantime I’ll edit the script so it creates a UTF-8 document, but that won’t benefit the entire DEVONthink user community.

I leave it as an exercise to the developers as to whether it’s a DEVONtechnologies problem or an Apple problem, and to do whatever’s appropriate.

For at least a couple of hours I felt I could not trust DEVONthink Pro Office - now, since I know the very limited extent of the problem, I trust it again :slight_smile:

Thank you for your confirmation of the problem!

Ed

One more thing :smiley:

Simply opening the UTF-16 text document in TextEdit (BTW, it displays perfectly in the text window), and selecting Format->Make Rich Text creates a blank RTF document. So I think I’ve pretty much confirmed is an Apple problem.

I am not going to downgrade the application - it works fine the way it is!

Good diagnostic info.

You can fix the script by opening it in AppleScript editor and change the line


write theListing to writeFile as Unicode text

to


write theListing to writeFile as text

Yosemite’s AppleScript compiler has bugs – this might be one of them.