View Full Version : Bug - with book or with Sony ePub renderer?


HarryT
10-14-2009, 03:13 AM
As many readers of this forum will know, I have converted all of Dickens' novels into ePub format. I've discovered, however, that one of them (attached below) exhibits a VERY annoying bug on the Sony PRS-600 - it randomly "skips over" pages.

If you have a Sony Reader, try this:

1. Load the book ("Miscellaneous Papers" by Charles Dickens).
2. Set the text size to "Medium".
3. Go to the chapter called "Capital Punishment"

and page through it. What I find is that 7 "screens" into it (the page which ends with the text "With the entrance of the Punishment into his thoughts,") it will skip over a page and display the next page (starting "about her") having missed out a complete page between the two. There are several other points in this chapter at which it has problems, too; I have even had it get entirely "stuck" and just display the same page over and over when you press the "Next Page" key. These issues arise right through this book.

On any other font size except "Medium" the book displays correctly. On the PC ADE Reader, and on the CyBook Opus the book displays correctly. On the Sony eBook Library program on the PC it displays correctly. I am coming to the conclusion that this is a bug in the Sony ADE renderer.

This is the ONLY book that I've created which seems to have this problem. Would one of the ePub experts among us be kind enough to have a quick look at the book and see if there is anything obviously wrong with it?

Thanks!

comtrjl
10-14-2009, 05:51 AM
Seems to be OK on a 505 - it goes from 'With the entrance ...' at the bottom of the page to '.. the shadow of the fatal beam' at the top of the next.
That's on Medium. Small and Large are OK too.

bob

HarryT
10-14-2009, 07:19 AM
Seems to be OK on a 505 - it goes from 'With the entrance ...' at the bottom of the page to '.. the shadow of the fatal beam' at the top of the next.
That's on Medium. Small and Large are OK too.

bob

Thanks, Bob - that's what it should do.

For me, though, the behavior on the PRS-600 is absolutely consistent - it skips over the "shadow of the fatal beam" page every time.

Is there anyone else with a PRS-600 who could try it and see if they get the same thing?

kennyc
10-14-2009, 07:52 AM
I don't have a 600, but I'm interested in hearing if there are differences. You may have found a software bug...

HarryT
10-14-2009, 07:56 AM
It's either a problem with the book, or a bug in the PRS-600, and I'm inclined to think it's the latter, given that it behaves correctly on all the other devices I've tried it with.

kennyc
10-14-2009, 08:08 AM
I just paged though pages of that chapter with my Pocket Pro at a couple of mediumish font sizes and it seemed to be fine. I did not specifically look/find the particular passage you indicated but didn't see any "missing" pages as best I could tell.

pdurrant
10-14-2009, 08:28 AM
I'm away from my usual machine, so I don't have all my tools to hand. But on a Windows XP machine, changing it to .zip and trying to Extract All using the built-in de-zipper gives two mysterious warnings about password protected files. The file names given seem to be gibberish. Perhaps it's a (slightly) corrupted zip file?

The only weird thing is that there seems to be four odd characters at the start of every paragraph. As I said, I'm not at my usual machine, so I can't tell what these are exactly. Perhaps they're fixed width spaces to give an indent. In which case - ugh!



Would one of the ePub experts among us be kind enough to have a quick look at the book and see if there is anything obviously wrong with it?

Thanks!

HarryT
10-14-2009, 08:40 AM
I'm away from my usual machine, so I don't have all my tools to hand. But on a Windows XP machine, changing it to .zip and trying to Extract All using the built-in de-zipper gives two mysterious warnings about password protected files. The file names given seem to be gibberish. Perhaps it's a (slightly) corrupted zip file?

I've just done the same using "WinZip" and it works fine - no warnings, and the file contents are exactly what one would expect.

The only weird thing is that there seems to be four odd characters at the start of every paragraph. As I said, I'm not at my usual machine, so I can't tell what these are exactly. Perhaps they're fixed width spaces to give an indent. In which case - ugh!

Yes, those are four non-breaking spaces, courtesy of BD, used as a paragraph indent. Ugh! indeed :).

JSWolf
10-14-2009, 09:24 AM
IYes, those are four non-breaking spaces, courtesy of BD, used as a paragraph indent. Ugh! indeed :).
That's easy to fix. Just remove them. Then set a CSS style for <p> and remember to fix the paragraphs that have no indent separately. Just look at the Agatha Christie book I converted from Mobipocket to ePub. I had to fix the 4 non-breaking spaces.

comtrjl
10-14-2009, 09:41 AM
Looking at the html files, after the heading 'Capital punishment': CAPITAL PUNISHMENT</span></span></span></span></span></span></span></span></div>
</a></span></span></span></span>
****</div>
there are 15 consecutive closures. Random looks at similar points in e.g. David Copperfield or Edwin Drood seem to have only half-a-dozen or so.
I wonder if this has somehow bumped up against an internal limit.
This is a chapter heading in DC: IV. I Fall Into Disgrace</span></span></div>
</a>
</span>

Could of course be a complete coincidence.

bob

JSWolf
10-14-2009, 10:36 AM
I don't know what the issue is, but I've made a few edits to this and here is the new version. Give it a try and let us know how it works. I did fix the 4 spaces as an indent and fixed the book title page that was split in two.

comtrjl
10-14-2009, 11:40 AM
I think the problem shows up also with the Sony Ebook Library - if I load the book, switch to Medium font on the first page and then slowly page forward using the mouse wheel, I noticed several times in a few pages where the bottom of one page isn't logically followed at the top of the next. Also it comes to pages where it won't roll forward any more, although it will go back sometimes.
Smart money is on a problem with the file, I think.

bob

HarryT
10-14-2009, 01:28 PM
More information:

I have replaced the titles, to remove the long string of </div>s previously mentioned (which were the result of multiple edits). The behaviour is completely unchanged. I have also confirmed that the bug is reproducable in Sony eBook Library, as mentioned.

Bob - yes, clearly there is some "interaction" between the book and the PRS-600 that's causing the problem, but I can't see anything in this book that's any different to the others I've created, which all work fine. There's obviously something about it that the 600 doesn't like, but what? Windows Desktop ADE, the Opus, and apparently even the PRS-505 all display it correctly.

If anyone has any further thoughts on what the cause of this problem might be, they would be very welcome!

HarryT
10-14-2009, 02:18 PM
I've decided to recreate this book, from the original sources, one item at a time and see if I can pin-point exactly where it goes wrong. This is really bugging me now!

kennyc
10-14-2009, 03:16 PM
I've decided to recreate this book, from the original sources, one item at a time and see if I can pin-point exactly where it goes wrong. This is really bugging me now! :eek:

I'm sure you'll get to the bottom of it. It may very well be some strange interaction or bug in the Sony Software that is only there for certain tags or arrangements or tags etc etc etc....

Will be interested in what you discover.

JSWolf
10-14-2009, 10:31 PM
I've decided to recreate this book, from the original sources, one item at a time and see if I can pin-point exactly where it goes wrong. This is really bugging me now!
Did you try the copy I put up?

HarryT
10-15-2009, 02:49 AM
Sorry, Jon; I should have thanked you for that. Yes, your version works fine! But I want to find out just what it is about my version that the PRS-600 doesn't like.

HarryT
10-15-2009, 06:14 AM
I've now managed to reduce this to a "minimalist" case. One story, in a 13k HTML file which, when converted to ePub, fails.

Again for the PRS-600 select the "M" font size, and page through the book. It goes from "or pleasant in their..." at the bottom of one page, to "... difficulty of reduction" at the top of the next, missing out the page in between.

If anyone can see ANYTHING in this HTML or ePub file which might be an issue, I'd be VERY grateful to know what it is!

pdurrant
10-15-2009, 09:21 AM
I think your problem is down to the entire content being enclosed in a span. Removing this, without any other cleanup (which is needed) fixes the problem on my system. I enclose bug and bug2, which show the difference, and are even more minimal than yours.

I'd suggest working towards getting it to pass epubcheck at least.

I've now managed to reduce this to a "minimalist" case. One story, in a 13k HTML file which, when converted to ePub, fails.

Again for the PRS-600 select the "M" font size, and page through the book. It goes from "or pleasant in their..." at the bottom of one page, to "... difficulty of reduction" at the top of the next, missing out the page in between.

If anyone can see ANYTHING in this HTML or ePub file which might be an issue, I'd be VERY grateful to know what it is!

HarryT
10-15-2009, 09:50 AM
Brilliant - thanks, Paul; that does indeed fix the problem.

Many thanks!

comtrjl
10-15-2009, 12:44 PM
Well done, pdurrant. Must be the Norfolk air.
I've spent ages futzing around with this with little new to report.
But paging through the cut-down version (in the Sony software) which Harry posted today I had a missing page, as expected. I unzipped it, edited the 3rd html file to remove the 2 square brackets and the 2 following lines and when I paged through again, there was the missing page in all its glory. Then work intervened and I had to stop, but strange to say, everything did seem OK.
Glad it's fixed.

bob

HarryT
10-15-2009, 12:52 PM
Thanks to Paul for clearing this up.

The problem is caused by the fact the Book Designer (the tool I initially use to create my books) has a bug whereby when you add a table of contents entry, it puts a <span> tag in the wrong place, incorrectly nested with the surrounding tags.

Most devices seem to be pretty immune to this, but it seems that the PRS-600, for whatever reason, occasionally skips pages (presumably confused by the "never-ending span"). So, the error is in the file, but the PRS-600 is not as "fault tolerant" as perhaps it could be - this is not an error which affects the file "content" in any way, but it appears as though it can, from time to time, mess up the PRS-600's paging algorithm.

Unfortunately, this affects every ePub book that I've ever created, but luckily, with the overwhelming majority of them, it's harmless. For whatever reason, it really messed up this particular book on the PRS-600.

Obviously I'll make sure that I fix it on all my future books, and will correct it on the existing ones as and when I edit them. Luckily, as I say, even though the HTML is syntactically wrong, in the overwhelming majority of cases, it's completely harmless.

Thanks again to Paul for solving the perplexing problem!