Skip to content
Jefferson Bledsoe edited this page May 24, 2018 · 2 revisions

How to repair "corrupt" .integra files

These instructions are for Mac OS X and assume you have a clone of the latest IntegraLive repository available (develop branch).

  • Open Terminal.app
  • Navigate to the directory where the .integra file is stored
  • Unzip the file with the command unzip <filename>.integra. This should create a directory integra_data
  • Navigate inside the integra_data directory. There should be a file called nodes.ixd
  • Run the check_ixd.pyscript in the IntegraLive repository utilities directory i.e. type the following at the command prompt: $ python <path to IntegraLive>/utilities/check_ixd.py nodes.ixd
  • This should generate a report on the content of the file

If erroneous nodes are detected, these will provided as a list, showing the relative path to each node (i.e. .). This will be followed by additional details about each error.

If details for incorrect connections are given

The usual problem with corrupted files is that a Connection between a BlockEnvelope and its corresponding Block is broken. These Connections are managed by the GUI. The problem arises as a result of this issue. The GUI expects all BlockEnvelopes to be connected to a corresponding Block as follows:

BlockEnvelope.currentValue -> Connection.sourcePath | Connection.targetPath -> Block.active

The error usually occurs when the Connection.targetPath points to a Block that does not exist. This will leave a corresponding Block that has no Connection.targetPath pointing to it. The way to fix this is to update the Connection.targetPath to point to the correct Block.active

To do this, open the IXD file in a text editor and locate each connection for which an error has occurred (using the report generated by the Python script) and set its targetPath endpoint to that of the correct Block. A little guesswork may be required to get this right if there is more than one error! It is sometimes possible to guess how Connections and Blocks match up if they have differentiating names, but this is not always the case.

Example

The report may appear as follows:

Suspected erroneous nodes:

['Track1.BlockEnvelope1', 'Track1.BlockEnvelope2']

Details:

Track1: the following Blocks have no corresponding Connection targetPath: ['Foo', 'Block2']
Track1: the following Connection targetPaths have no corresponding Block: ['Violin', 'SoundfileLoop_____']

In this case, we can guess that Block2 should be connected to BlockEnvelope2. So we search the IXD file for the Connection that has a sourcePath of BlockEnvelope2 and a target of either Violin or SoundfileLoop_____ and change the targetPath to Block2.active. By a process of elimination we can then update the Connection for Foo so that it has a targetPath of SoundfileLoop____.active.

If no details are given and connections are reported as not found

This corrupt file is a result of a missing connection between a Block and its BlockEnvelope. The GUI expects all Blocks to be connected to a BlockEnvelope. The way to fix this is to create a new valid connection between the Block and it's BlockEnvelope.

To do this, open the IXD file in a text editor and copy the following code into a new line above the object with the name of the block reporting the error. Ensure that the copied code aligns with the code below it. Change the text in-between the square brackets with the name of the suspected erroneous block and block envelope and remove the square brackets.

<object moduleId="36c9c7c5-b954-0a12-84f2-ded0de687886" originId="5dfd7aa5-eed1-4666-9d19-844a5a9912c9" name="Connection1">
 <attribute name="active" typeCode="1">1</attribute>
 <attribute name="targetPath" typeCode="3">[BLOCK-NAME].active</attribute>
 <attribute name="sourcePath" typeCode="3">[BLOCK-ENVELOPE-NAME].currentValue</attribute>
</object>

Cleaning up

Once the ixd has an attempted fix, it should be saved. Then the following:

  • Navigate to the parent of integra_data
  • Type zip -r <original name of file>.integra integra_data
  • Test the repaired .integra file in Integra Live

Check the project works correctly, specifically the affected Blocks. If not, re-try with different targetPath assignments.