Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 10-21-2010, 09:22 PM   #1
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 583
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
Is there a size limit for TOC.ncx?

Working on a large (source file 52Mb in UTF-8) mobi book that requires a large toc.ncx (about 1Mb, 6,703 links/waypoints). When compiling I get this with MPC and kindlegen:

Code:
Info(prcgen): Building table of content     URL: C:\kindlegen\toc.ncx

Warning(index build): string too long (max=255). Truncated.

Warning(index build): string too long (max=255). Truncated.
I do not have any individual strings within toc.ncx that long; however, the entire toc.ncx is large. Is there some size limit on toc.ncx? I have not seen it anywhere.

I had pretty large toc.ncx before that worked but not as large as this one. They definitely were larger than 255 bytes.

Last edited by osnova; 10-21-2010 at 10:16 PM.
osnova is offline   Reply With Quote
Old 10-21-2010, 09:29 PM   #2
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 6,094
Karma: 14841004
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International & Sony PRS-T1
I think that error message refers to a single line within the toc.ncx to be too long. Do you have maybe a really long link inside?
ATDrake is online now   Reply With Quote
 
Enthusiast
Old 10-21-2010, 09:47 PM   #3
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 583
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
The largest link string is 17 characters long (preceded by MHC.html# for a total of 26 ASCII characters). Is that more than 255 bytes (for UTF-8)?

Plus the resulting book misses the entire toc.ncx navigation on the Kindle. So, I guess it does not just strip one or two waypoints but the entire thing.

Last edited by osnova; 10-21-2010 at 09:53 PM.
osnova is offline   Reply With Quote
Old 10-21-2010, 09:57 PM   #4
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 6,094
Karma: 14841004
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International & Sony PRS-T1
Is it perhaps part of a longer line, like say, if you/your editing program have put the entire <navPoint><navLabel> etc. contents all in a single chunk with no breaks?

Because while the individual data strings involved may be pretty short, if KindleGen counts all the characters including spaces until it hits a linebreak as a "string" in its program, then that may account for it.

I did a quick copy-paste of my usual bare-bones <navPoint> entry, and it was already 122 characters long. If I had both a long chapter title in the <text>, and the id= and src= contents were descriptive instead of cryptically short like I usually do, I think it could easily hit 255 chars.

Or maybe it's just KindleGen being wonky without real reason, which happens often enough.

If you don't mind my asking, did the build fail partway through, or do you have a finished .mobi file with an error message? Because sometimes KindleGen likes to spit up non-fatal error messages that actually have to do with some other part of the file, instead of the one that the preceding stuff would make you think was the culprit.
ATDrake is online now   Reply With Quote
Old 10-21-2010, 10:00 PM   #5
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 583
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
Here is an example of my navPoints:

Code:
     <navPoint id="navPoint-" playOrder="">
         <navLabel>
            <text>Label</text>
         </navLabel>
         <content src="M.html#toc"/>
      </navPoint>
I always break the text up for easy reading.

This same thing happens on Mobipocket Creator. The file is created at the end but without waypoint navigation. Thank you for brainstorming with me though. I appreciate it.

I'll pare down toc.ncx and see if that affects the warnings.

P.S. I am pushing the envelope on the Kindle. About a year ago I submitted a 89Mb dictionary for publication on DTP, they said they couldn't handle such a large file. After a month of back and forth they added the support for large files.

Last edited by osnova; 10-21-2010 at 10:11 PM.
osnova is offline   Reply With Quote
Old 10-22-2010, 12:01 AM   #6
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 6,094
Karma: 14841004
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International & Sony PRS-T1
One additional thought: perhaps the error message refers not to anything within your source NCX, but a problem with the resulting waypoints that are supposed to be built for the book.

I'm not sure exactly how they're stored internally, but perhaps trying to generate whatever records are needed to quickly get to the farthest points in a 56 meg-equivalent book is what's giving the "index" error, if it's done in some way that overspills the 255-byte limit for however Mobi files reference their waypoints. Especially if they do it in some sort of special supplementary fashion so the entire book doesn't have to be loaded at once before the navigation is accessible.

Depending on whether it's a conversion-time error and KindleGen is just plain choking on a large input file, or a limitation of the overall format, you may or may not want to try splitting your file up and referencing the various parts via an OPF and see if that helps any (assuming you're not already working from split files to avoid having to deal with 52 megs of text at once).

The other possibility that I'd suggest is that perhaps you have a very minor error in the NCX file. I discovered that if I accidentally put in a superfluous empty end-tag, KindleGen would completely ignore the entire thing without even giving me an error message.

But you do seem to have gotten error messages, so that's probably not it.

Anyway, I hope you manage to find a way to fix whatever it is that's doing it.

ETA: Maybe check your version of KindleGen? They did update it at some point to support Kindle Audio/Video and correspondingly larger image files than the older Mobi tools allowed; maybe they upgraded the overall filesize it could handle, too.
ATDrake is online now   Reply With Quote
Old 10-22-2010, 12:59 AM   #7
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 583
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
Thanks. I'll check your ideas.

So far, after wasting a lot of time I have figured out that up to 4,064 links in toc.ncx files work fine. Between 4,065 and 4,080 links gives as many warnings (Warning(index build): string too long (max=255). Truncated.); however, the resulting mobi file actually includes all the links. 4,081 and more links in toc.ncx gives only two of the above warnings and does not include any toc.ncx links/waypoints into the resulting mobi file.

I feel (I don't know programming) that there is some connection to some variable in the code (unsigned integer on some systems is 0 to 255). I don't know if there is a data type that has 4,064 limitation
osnova is offline   Reply With Quote
Old 10-22-2010, 11:07 AM   #8
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,786
Karma: 7999034
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Well, 4064 == (4096 - 32) and those are both nice round binary numbers, so you may be on to something - but I'm not sure what
pholy is offline   Reply With Quote
Old 10-11-2011, 02:34 AM   #9
zdavatz
Connoisseur
zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.
 
zdavatz's Avatar
 
Posts: 64
Karma: 496222
Join Date: Dec 2009
Location: Zürich, Switzerland
Device: Kindle, iPhone, HTC D2 not Sony.
What version of Kindlegen are you guys using? 1.0, 1.1 or 1.2? There seems to be a fix related to NCX for kindlegen 1.1. We used kindlegen 1.0 and have the same error with a very big TOC.
zdavatz is offline   Reply With Quote
Old 10-14-2011, 01:12 AM   #10
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 583
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
Thanks, I'll try it out.
osnova is offline   Reply With Quote
Old 10-21-2011, 01:41 AM   #11
zdavatz
Connoisseur
zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.zdavatz ought to be getting tired of karma fortunes by now.
 
zdavatz's Avatar
 
Posts: 64
Karma: 496222
Join Date: Dec 2009
Location: Zürich, Switzerland
Device: Kindle, iPhone, HTC D2 not Sony.
Kindlegen 1.2 includes the source file

Kindlegen 1.2 will result in an awfully large file because kindlegen 1.2 includes the source file. Use kindlestrip to trim the file back down to its original size.

TOCs with more then 4026 entires will work though. They did not work on kindlegen V1.0.

Best
Zeno
zdavatz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a toc.ncx file to the .prc package cyberbaffled Amazon Kindle 4 09-14-2010 02:21 PM
Page Mapping Using toc.ncx lorddon ePub 6 07-22-2010 08:59 AM
Can you bypass first two items in TOC.ncx? sueneu Kindle Formats 4 07-14-2010 08:36 AM
toc.ncx playOrder question aarcane ePub 8 05-25-2010 05:00 AM
toc.ncx navpoint content=src empty? KevinH Sigil 6 11-23-2009 01:39 PM


All times are GMT -4. The time now is 08:14 PM.


MobileRead.com is a privately owned, operated and funded community.