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?

Replies

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.