MSP Save Error: "Attempted to read or write protected memory..." due to line breaks in notes
search cancel

MSP Save Error: "Attempted to read or write protected memory..." due to line breaks in notes

book

Article ID: 133360

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

When trying to save a project from Microsoft Project (MSP) back to Clarity if there are line breaks in the notes section of one or more tasks, the below error is generated:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Screenshot of error below:

 

Reviewing the Notes, a special character is generated for one or more notes showing a circle with an arrow above it. 

Steps to Reproduce :

(This is one example, but breaks can be created in email line breaks, etc)

  1. In Microsoft Word, type text into one line.
  2. Click Shift then Enter on your keyboard (This will create a line break and second-line)
  3. Type text into the second line
  4. Copy the data in the word document for the two lines and paste it into a Note for a task in MSP
  5. Note. If you hover over the note for the task if you add the Notes column to your project view, you will see a circle with an arrow pointing above it in place of the line break. (This is translated in XML as a "VT" character)
  6. Attempt to save the project back from MSP to Clarity

Expected Results: Project is saved successfully

Actual Results: Project does not save and a target error is generated with an error referencing: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Environment

Component : Clarity Microsoft Project New Driver

Release : All Supported

Cause

This is due to an issue with MSP not allowing line breaks in Notes. One way a line break is generated is in emails (in the auto generated lines such as From, Sent, etc). It can happen when notes are copied over from Word, Excel, etc as well if one or more lines are created using line break functionality. 

The issue with the character issue in Notes is reproducible in MSP standalone using the steps in the Issue/Introduction section, but instead of saving the project back to Clarity,  use the below steps:

  1. Save the project as an XML using File->Save As
  2. Try to open the XML in MSP

Results: You get an error saying "We're sorry. There seems to be a problem with this file that keeps us from opening it. Please try using a backup copy if available."

Additionally, if you drag the XML file into a Chrome browser tab, you'll see an error at the top of the page similar to "error on line 1494 at column 172: PCDATA invalid Char value 11" for the first line in the XML that has the character. If you go to that line in the XML, you'll see a "VT" character (Once that issue is corrected in MSP, it will error on the next invalid character in the file)

Resolution

Option 1: Update any notes to remove line breaks

  1. Hit the backspace button/delete where the line break is to bring the second line up to the same line as the previous line
  2. Then hit return on the keyboard to generate a new line without the break.

Option 2: Use Notepad to remove line breaks

If there is a large amount of data in the notes for a task, a quick way to ensure all breaks are removed is to:

  1. Copy the notes from the task in MSP into Notepad
  2. Then copy the text from Notepad into MSP and any line breaks will be automatically removed. 

Option 3: Delete the notes if they aren't needed

The third option is to delete the notes with the issue if they aren't needed in the project. 

Avoidance:

Before pasting any notes into MSP, to avoid this issue, paste the text first into Notepad, then copy the text from Notepad into MSP and any line breaks will be automatically removed. 

Additional Information

For other known causes of this error, see: MSP Error on Save: Attempted to Read or Write protected Memory