Scapple XML save error

Hi - I keep getting the error "The document “documentname.scap"could not be saved. There was a problem creating the XML data.” I have deleted and reinstalled scapple to no avail. If anyone can help it would be great because if I can’t fix this I can’t actually use scapple anymore. I’ve been using it for years now and suddenly I can’t. On a MacBook pro 2018 with the latest os (monterey 12.5)

Firstly, you are never stuck with whatever version you last installed. We always make the previous version available for this very reason: sometimes a bug can keep you from working, and we aren’t Apple. We aren’t going to force you to use only the buggiest latest version. :slight_smile:

Before doing that though, if you have the time to do some testing, here is what I’d check:

  1. First, try a simple reinstall using a fresh download of the latest version. We may have just been looking at an installation/upgrader script glitch that resulted in a corrupted installation. This is not terribly uncommon.

  2. If the problem persists, then in Finder use the Go/Utilities menu command, and double-click on the Console icon. In the search bar, type in “scapple”, and then click the “Start streaming” button in the middle of the view. Leave this open as you test, paying particular attention whenever hitting the problem. You can copy and paste any logging output you get into a response, here.

  3. Check to see if you can create a new document. You should have an empty one already if you launched Scapple on its own. Just put a note in there, and Cmd-S to save it somewhere. Close and re-open. Does this act normally or do you get the XML error?

  4. Next try an existing file. Do you get any logging information in Console if the XML error appears?

Thanks for any help you can provide! We do not have many reports of this, so I don’t think there are any broad problems with the software. What we’re likely looking at is something very specific. A copy of one of the .scap files that causes this error could be useful to us. If you’re willing to send on, click on my avatar above this post, and then the “Message” button to send a private message. You can drag the .scap file into the composition window to attach it.

There is a problem saving my diagram.

I get a techno dialog box with the message:

"The document “Untitled 2” could not be saved.

There was a problem creating the XML data."

The other person reporting this never got back with us, if you get a chance to go through the above troubleshooting it would be appreciated. We currently have no idea what this error means, because none of us know how to make it happen.

I closed the document, and am trying to reproduce it for you.

UnfortunatelyI can’t reproduce the error. I made a screenshot of the diagram and re-draw it. It now saves correctly. Very strange.

It’s true - I never did get back to you sorry about that. Your response to my problem was so lovely too. I put it on the list of things to have a look at and then I wandered off and by the time I got back to it it had fixed itself. I couldn’t reproduce it I’m sorry. It was really annoying though. If it EVER happens again I will return to this thread and answer all the questions. Thanks.

1 Like

Thanks for the updates, both! That it comes and goes and is difficult to reproduce could explain why we haven’t seen it. For all we know at this point it’s completely unrelated to the data itself and is an issue with saving at a much lower level. E.g. maybe the system is giving a failure to save response, and we’re getting mixed signals about it, producing a confusing error message. This disk spins up, or whatever locked file goes away, and it mysteriously starts working again.

I have been able to re-create this error by creating a bubble and then cutting the text. The bubble remains with no text content or formatting. When trying to save I get the xml error but if i remove the empty bubbles then it saves normally.

Thanks! With the software working properly, empty notes (what I presume to be “bubbles”) are automatically deleted since they no longer server any purpose. So that you are left with an empty note is in itself a problem—maybe not the project, and only another symptom of it, but it’s a clue nonethless!

I cannot, unfortunately, reproduce this with the given data though, with default settings:

  1. Press ⌘N to create a new board.

  2. Press ⌘↩ to add a new note.

  3. Press ⌘X to cut the “New Note” starter text.

  4. Press Esc to toggle editing off.

    At this point the board is empty again, because we didn’t leave any content in the note and it was cleaned up. But we try to save anyway.

  5. Press ⌘S and save it somewhere.

Dependong on whether following this checklist causes an error for you or not, proceed with one of the following secondary tests:

Expanding the Checklist

If you also have no issues, and do not get an error when saving the above test board, then let me know what it takes to change that checklist so that it does show an error. Maybe I need to click outside of the note after cutting, instead of pressing Esc; maybe you dragged a note out from one of the styles in the Styles inspector pane instead of using the shortcut, et cetera. Every little thing can matter.

Checking Preferences

Now if you try that checklist and you get the warning message, then try resetting your preferences and trying again:

  1. From Finder, use Go ▸ Utilities and double-click Terminal.

  2. Issue the following two commands into the shell:

    mv ~/Library/Preferences/com.literatureandlatte.scapple.plist ~/Desktop
    killall -u $USER cfprefsd
    

Now run the test again with default settings (as I did), and if that now works, then go through the settings and try restoring them to what you prefer using until you get the problem again. If that’s what it takes, let me know which settings to change.

Once you’re done testing, you can drag the plist file from your Desktop back into ~/Library/Preferences and run the same “killall” command to force the Mac to restore its preference cache from the disk.