Error building instrumentspackage with latest Xcode 13.3

I have a schema building an instruments package. After updating to Xcode 13.3 it fails with:

BuildInstrumentsPackage ....instrdst...

/Applications/Xcode.app/Contents/Developer/usr/bin/instrumentbuilder ...

Assertion failed: (_columnToInterpolationExpressionMapping[column] == nil), function -[XRPackageModelingRuleSystem setColumnInterpolation:expression:definesLayoutScope:], file XRPackageModelingRuleSystem.m, line 422.

Command BuildInstrumentsPackage failed with a nonzero exit code

I don't have a clue what's going wrong. Any hint?

This sounds like you have the same column (same mnemonic) twice somewhere, maybe in a schema definition or when setting up a detail view.

But in any case, what should happen is that the instrumentbuilder should not accept input with a duplicate column and instead report a compiler error at the correct line telling you about the duplicate. This doesn't seem to happen for you and this is likely a bug in the instrumentbuilder.

Can you please file a bug report via Feedback Assitant.? If possible, please include the instrpkg file that is causing this issue or a simplified file that still reproduces the issue.

Hi, thank you for the hint. But this is not the case. The problem is that I create a column with an expression using start time and end time. Something like this:

<start-pattern>
    <time>?starttime</time>
    <message>...</message>
</start-pattern>
<end-pattern>
    <time>?endtime</time>
</end-pattern>
<column>
    <mnemonic>milliseconds</mnemonic>
    <title>msecs</title>
    <type>fixed-decimal</type>
    <expression>(/ (- ?endtime ?starttime) 1000000)</expression>
</column>

This worked with Xcode 13.2 and earlier and does not work with Xcode 13.3 anymore.

Thank you for following up! For this specific problem, I'm wondering whether you need this column. For an interval schema like this (I'm assuming you are using an os-signpost-interval-schema here?), there is already a duration column that Instruments will generate for you. It will contain the duration in nanoseconds, but upon display in the UI, Instruments will format it into a reasonable unit (so e.g. 1,700,000 would be displays as "1.7ms"). So maybe you can use the duration column as a workaround?

In any case, if this bug is still happening to you, can you please file a bug report via Feedback Assistant? Please make sure to include an .instrpkg file with your schema + instrument definition that compiles, so we can check whether the problem maybe resides in a different part of the code.

Hello,

Same issue here. We've isolated the column description that fails:

    <column>
      <mnemonic>label</mnemonic>
      <title>Label</title>
      <type>string</type>
      <expression>
        (str-cat ?step " " ?name)
      </expression>
    </column>

Note that it works well with Xcode 13.2.1 but not with Xcode 13.4

Note that (str-cat ?step "***") compiles with Xcode 13.4

Note that (str-cat "***" ?step "***") compiles with Xcode 13.4

Note that (str-cat ?name "***" ?step) doesn't compile with Xcode 13.4

Hi there,

thank you for the detailed description of what works and what doesn't!

A similar issue was fixed in Xcode 14. Xcode 14 was release in the AppStore a few days ago, could you try downloading it and see whether this still happens?

If so, please file a feedback via Feedback Assistant and ideally attach an instrpkg (or whole project) that reproduces the bug.

Hi,

Indeed, the issue is fixed in Xcode 14. Is there a way to have this bug fix in Xcode 13 as it's a regression between Xcode 13.2.1 and Xcode 13.4?

Best, Mathieu

Error building instrumentspackage with latest Xcode 13.3
 
 
Q