InDesign CS5.5 Crash during EPUB export caused by endnote reference character in imported text

Problem: Book or file crashes when exporting to EPUB.

Cause: In this one very limited, strange case, the cause was endnote markers. I suspect corrupted character encoding in the source MS Word file, but this is unverified.

Solution: Manually delete and retype all endnote references in affected files.

I stumbled upon an extremely strange and frustrating problem tonight. InDesign would crash when exporting a specific 200 page book to EPUB. This isn’t in and of itself that strange (unfortunately), and I geared myself up for yet another lengthy round of troubleshooting. I narrowed it down to just several documents in the book, so I picked one of them to focus on. I tried exporting to IDML and then reimporting, no effect. I first suspected either frame anchoring or graphics, so I eliminated those, but no results. I then started deleting chunks of text until I found one page that caused the problem. Then I removed all paragraph and character styles — still no affect. I then narrowed it down to one paragraph…one sentence…then…


Yeah. It’s a “2.” But not just any “2.” Oh no, this one is special. Exporting it to EPUB causes InD CS5.5 to crash. Exporting to IDML and reimporting did not fix the problem. Removing all style tagging did not fix the problem. Deleting and retyping it DID fix the problem. Go figure. I’ve saved the infamous “2” in a new, blank CS5.5 document for your puzzlement. I figured after taking me two hours to find in a 200 page book it should get some recognition.

Specifically, the “2” was originally imported into InDesign in a MS Word document as an endnote marker. Hmm… could it be using some sort of strange unicode or corrupted font reference that’s messing up the export? InD exports to PDF, prints, and does everything else I ask it to just fine. It might be a problem with the new EPUB export not recognizing some font encodings.

Here is the sample InD CS5.5 file.  Note that opening the file will not cause InD to crash; it’s only when you try to export to EPUB. If you delete the 2 and type a new one, it will fix it. If you change the font, it won’t have any effect (at least not when I changed from Garamond Premiere Pro to Minion Pro). I trashed my InD prefs with no effect. I’d love to hear what a developer or someone with scripting experience has to say about it. The source file that I placed was a MS Word file that had been passed from the author to at least 2 editors back and forth before finally getting to me for layout in the book; the problem could have happened anywhere along the way.  I work with hundreds of MS Word files and I make many EPUBs; I’ve done about 8 now since I started using CS5.5 and this is the first time I’ve ever experienced this.

Now I’m off to finally export my book to EPUB (hopefully)!

, , , ,

12 Responses to InDesign CS5.5 Crash during EPUB export caused by endnote reference character in imported text

  1. Paul Erdman July 27, 2011 at 10:17 am #

    Follow-up: there were two documents out of 8 in the book that were having this problem. Once I went through them and retyped the endnote markers they were able to export to EPUB. Luckily the documents only had 4 and 7 endnotes respectively. Hopefully I don’t run into this problem with a document that has over 100. I’ll keep my fingers crossed.

  2. MarisMaris September 6, 2011 at 11:17 am #

    You just saved me hours of troubleshooting. I was having the same problem, but with CS5, crashing every time I exported to ePub (strangely exporting to .mobi with the kindle plugin works fine). Doc was also imported from MS word, with endnotes (123 of them to be exact), but it turned out my culprits were numbers 30, 83 and 90.


  3. Paul Erdman September 6, 2011 at 11:32 am #

    Interesting! I’m glad you found the post helpful. So it’s happening to at least one other person, not just in CS5.5, the Kindle plugin is unaffected. I wonder what it is with those endnote markers? Perhaps this is one worthy of Adobe’s attention at this point.

  4. Jennifer H. November 4, 2011 at 5:45 pm #

    Hi there. I think this might the problem with my indesign file that also freezes up when trying to export to an epub. How do I delete and retype the endnote reference number in the body text without losing the actual endnote (mine are footnotes actually, and must be on the exact pages of the reference) on the page itself? When I try and retype the reference superscript number, the endnote is deleted.

    Thanks for any help.

    • Paul Erdman November 7, 2011 at 8:52 am #

      Jennifer, good question. In my case I was not using InDesign’s footnotes since the client wanted endnotes. InDesign unfortunately does not properly support endnotes (I’ve written a separate article on this in the past) so my markers were simply typed numbers and my notes were just a numbered list at the end of the story. However, it’s true that when working with imported footnotes from Word this might be much more complicated.

      I’d recommend the first thing to check would be to find out if the footnotes are really the problem. In my troubleshooting I narrowed the problem down until I isolated the problem in a single character. You can do the same thing; if you suspect your footnotes, copy one into a new document and export it to EPUB. If it fails, you know that’s the problem. If it works, then you know the problem must be elsewhere. This would be the first step in determining if the problem is with your footnotes or elsewhere.

  5. Vo November 24, 2011 at 9:19 am #

    Hi, everyone!

    Not so far I’ve experienced the almost the same problem, but in my case the reason was hyperlink (actually, cross-reference to an empty destination) in .docx document. Hope, my issue will help someone to avoid problems.

  6. zaria December 1, 2011 at 8:25 pm #

    Hi i know its unrelated but i installed adobe flash pro cs5.5, two days ago and made a short animation, and saved it to destop. Today its completely gone, not in recycling bin and the shortcut doesnt work anymore. What happend please help can not ejecting your usb do this??

    • Paul Erdman December 2, 2011 at 10:50 am #

      Zaria, removing a USB storage device might damage information on the device, but it certainly would have no effect on something saved to your desktop, as items on the desktop are saved on your hard drive. A few things to try:

      If you remember the file name, search for it.
      In Flash, see if you can “Open Recent” and find it that way. Perhaps you didn’t actually save it to the desktop.
      (Not sure which shortcut you’re referring to that doesn’t work anymore–perhaps you’re talking about “Open Recent.” The shortcut should give your the exact file name to search for.)
      If this is a work computer, check with your network/IT staff.
      The most likely cause, if it isn’t in the trash, is that it got accidentally moved into another folder.

      Hope this helps.

  7. Anders Liane March 5, 2012 at 10:48 am #

    @Vo: I found invalid links to be the problem as well. My issue was that a lot of work has gone into this document since it was a .docx, so fixing the original .docx wasn’t really an option.

    In order to see if this is your problem, save the indd as a new file, delete all hyperlinks from the hyperlinks panel, select all your text, and see if your’re allowed to make a hyperlink from your entire document. If not, read on:

    My trick for finding the offending references were as follows (Windows 7): Indesign won’t let you create a link containing these points, so open the Hyperlinks window, go to the start of your document, and start marking paragraphs. If the “URL:”-field becomes inactive (grey), isolate which paragraph you selected in order for it to be grey, and see if you have a legitimate link in that paragraph. If not, that means your faulty text is there. At this point you can use the same technique (select word for word) until you find the exact characters that contain the invalid link, retype them (or copy to/from Notepad or another editor which only understands text), and continue searching for more errors. If you don’t have a lot of legitimate hyperlinks the debugging can be faster if you delete them and recreate them afterwards.

    Hope this helps anyone else which had my and Vo’s issue 🙂

    BTW I tried the same trick on the infamous “2” above, but that was not the issue with that one. To the original comment poster: Have you submitted it to Adobe? These kinds of undefined and untraceable errors frankly drive me crazy these days…

  8. Michael Campbell March 23, 2012 at 10:06 am #

    Anders: Great trick! I selected entire book text, and the hyperlink panel indeed was grayed out even though there were no intended links. Trouble was cross-references imported from Word, to a TOC that had been deleted. Retyping text was the solution to clear the broken links and win a successful ePub export.

    Tip: those broken links are easy to spot in Story Editor View. They show up with hyperlink brackets.

    Thank you Anders and Vo for taking the time to share your solution. You saved me hours, which I can now spend enjoying a sunny spring day.

    • Matt Judd November 23, 2012 at 9:09 am #

      Hi Michael,

      I missed your comment, but will look to the Story Editor window next time!

  9. Matt Judd November 23, 2012 at 9:08 am #

    I have had EPUB exports crash on me for two reasons, both of which were eventually detectable and solvable. The second solution here was discovered, in part thanks to this thread:

    1) One or more of my URL hyperlinks were ‘shared hyperlinks’. I now always uncheck that box when placing hyperlinks.

    2) There was hidden information attached to numbered in-text references that had been imported from (presumably) a Word document having used some form of referencing tool/plug-in. These were almost completely undetectable, in that there are no visual indicators that they are any different from ‘normal’ supertext numbers. The only way I have found to flush them out involved manually highlighting chunks of text while watching the hyperlink panel to see if it would let me place a hyperlink there. If not, the hyperlink URL bar would ‘grey out’. Manually retyping all reference numbers discovered in this fashion have solved my export problems.

Leave a Reply