The Haystack

InDesign scripters and developers are faced with many bug species. We have to deal with both implementation errors, compatibility issues, unexpected or borderline contexts of use, cascading errors resulting from InDesign's own bugs, OS-related side effects, and so on. Furthermore, most of those events may occur at any level: ExtendScript, user interface layer(s), scripting DOM, InDesign's execution space, external libraries, I/O devices, operating system, memory… In large projects, tracking and fixing bugs is just like looking for a needle in a haystack!

In the worst case we cannot even “experience” the problem by ourselves. Unhappy users report an error message that appears to come from the beyond:

The “Infamous Pasteboard Bug,” as captured by an unhappy user.

Seriously?

The Needle

Of course, the first impulse is to suspect we made a miscalculation somewhere. Well, this sounds surprising, since many beta tests didn't reveal it, but that shouldn't be a big deal anyway. As Wordalizer is intended to support a large range of InDesign versions (CS4, CS5, CS5.5, CS6, CC 9, and CC 10) it is plausible that some user setting interferes with the process under circumstances we did not anticipate.

But day after day, night after night, despite all the tests we run, the mystery deepens and unprecedented questions proliferate. Even in the most exotic configurations, there is definitely no reason why an object should “leave the pasteboard.”

The Volunteer

This is where Pedro comes in. Living at a five-hour time difference behind Paris, he was in testing the trial version of Wordalizer when he stumbled upon the bug. He outlined the symptoms giving a lot of attention to details. “Let me know if I can help you furthermore” he wrote. Two weeks later, I must say he helped beyond expectations!

In studying in depth the state of the wrongly generated document, we finally discovered a crucial fact: if and when certain factors are combined, InDesign 9.0 (and maybe only that version) does not manage page coordinate space in a consistent way. Through a series of “trial and error” stages, Pedro and I have identified those multiple factors.

Note. — I will not go into technical details, but there is no doubt to me this is an internal bug of InDesign. Partial clues can be found in this thread although the whole puzzle is more complicated.

The Workaround

From there, a fix has been designed and tested. It first attempts to purely circumvent the obstacle—and I'm very confident with this strategy. However, as one can never be sure of anything where internal bugs are concerned, an additional routine is responsible for checking that all is fine. In the wrong case, a rescue process is automatically run.

Now, our word cloud generator should properly operate even in InDesign biased environments. Give it a try and tell me!

A big thank you to Pedro Eisner.

Download Wordalizer 1.5 Manual” (PDF)

Purchase now Wordalizer Pro