Urgent help needed

Tinderbox crashed after I introduced an agent query into one file, and now it will not open that document or any other .tbxfile. It appears to hang on launch, possibly because it is trying to reopen the problematic file automatically.

I’ve already emailed the crash log to Eastgate, but I may miss my deadline if I can’t get back into Tinderbox soon.

log.txt (3.6 MB)

Does anyone know the quickest way to force Tinderbox to open without restoring the last document or windows, or how to disable the offending agent from outside the app?

Crash log attached.

Resolved. Received a quick response from Eastgate by email, and I am back to working on my project again. Thanks.

2 Likes

BTW, in the future, you can open the TBX file (first make a copy) with a text editor. You can search for the offending string, delete it, save the file, and then re-open the file. This works most of the time for me. Again, make sure you make a copy of the file first.

2 Likes

Thanks, Michael.

I completed the assignment, but just as a follow-up on your suggestion:

When I opened the document in BBEdit, I found 17 instances of the word “agent.” I’m not entirely sure how to determine which one might be responsible for the issue.

From what I can see, several of these occurrences appear to be part of Tinderbox’s internal XML structure rather than anything I’ve added myself. For example:

<attrib Name="Agent" parent="System" editable="0" visibleInEditor="1" lines="1" type="4" default="false" >
<attrib Name="AgentAction" parent="Agent" editable="1" visibleInEditor="1" lines="1" type="7" default="" >
</attrib>
<attrib Name="AgentCaseSensitive" parent="Agent" editable="1" visibleInEditor="1" lines="1" type="4" default="true" >
</attrib>
<attrib Name="AgentPriority" parent="Agent" editable="1" visibleInEditor="1" lines="1" type="2" default="1" >
</attrib>
<attrib Name="AgentQuery" parent="Agent" editable="1" visibleInEditor="1" lines="1" default="" >
</attrib>
<attrib Name="CleanupAction" parent="Agent" editable="1" visibleInEditor="1" lines="1" canInherit="0" default="grid" >
</attrib>

</attrib>
<attrib Name="IsAgent" parent="General" editable="0" visibleInEditor="1" lines="1" type="4" default="false" >
</attrib>

</attrib>
<attrib Name="TextHighlightMagenta" parent="TextFormat" editable="1" visibleInEditor="1" lines="1" type="1" default="#ff66ff" >
</attrib>

These look structural rather than user content, so I’m unsure how to narrow things down further. Any guidance on identifying the problematic instance would be much appreciated.

You are actually looking for “AgentQuery”, the attribute whose value hold’s your agent’s query.

image

you could edit the query string, or delete the whole offending agent, everything between …, which will include the agent itself and any aliased generated by it, e.g.,

There’s something a little odd about the last screen grab above as the last few XML tags have lost their opening < character. To explain this in a minimal fashion I made a TBX with one note and one agent whose query matches the note.

The screen grab below is the raw XML of that file seen in BBEdit. In that view I’ve collapsed (folder away as in a Tinderbox Outline) all the bits not of interest.

I’ve put boxes around the agent (<agent>...</agent>) element, the note 'foo' (…) at the bottom. Nested inside the agent is an <item> but note that it has no Name (attribute name="Name" >) but instead has an Alias attribute value which is the $ID of the matched note (1775637769 for alias and ‘foo’). Also marked in where the agent’s query is stored: the value of attribute AgentQuery).

So using this minimal example you could do any of:

  • delete the agent’s query. Just the value, not the whole line so it looks like <attribute name="AgentQuery" ></attribute> when done.
  • delete the query and the alias. But, if you delete the query and re-open, on first evaluation of the agent the now non-matching alias(es) are deleted and in a real situation there might be 10s or 100s.
  • delete the whole agent. To do this:
    • Work on a copy of your file in case of error.
    • Find the correct agent in the XML. Note the line number/position.
    • Scroll down to the first <agent> element after the main agent data above. Note the position
    • Select from the starting <agent... to the closing <agent> and delete. If this leave a blank line delete that so no gaps in the code.
    • Save the document.
    • Open the TBX and check everything works OK.

If that works make that TBX your new main TBX and you can return to work.

I’ve laboured the description here as it covers the general case of rolling back an agent via XML edit. In due course we can probably extract this as a ‘tip’ thread for general reference.

You do not have to use BBEdit, other such apps are available, but it is not recommended to use a word processor like MS word. In a pinch you can use TextEdit, but ensure it is in plain text mode and that smart linking, quote type substitution, etc. are all disabled else you editing may add unseen error. FWIW, Barebones Software’s BBEdit can be downloaded and used as a free demo.

Here is the TBX used to make the above grab: test-agent1.tbx (72.2 KB)

Note: the eagle-eyed may note the TBX was made in a current beta but the file will work just fine in the current release—we are only using basic features that go back to the start of Tinderbox.

NOT necessary for the solution above, but if you want to understand a little more about the XML structure of a TBX file, please see The XML TBX format.

1 Like