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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-26-2012, 07:22 AM   #871
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 164
Karma: 164969
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Quote:
Originally Posted by ixtab View Post
Answering my own question: it's probably due to an idiosyncrasy of the JVM, namely the difference between checked and unchecked exceptions. In short: trying to load a named class can throw a (checked=must be caught) "ClassNotFoundException". But if that class is actually found, but isn't "initializable" because it itself depends on another non-found class, that produces an unchecked exception, namely "NoClassDefFoundError". Go figure.
You are correct but it's not the full picture.

It is correct that ClassNotFoundException is a checked Exception and NoClassDefFoundError is an unchecked one:
http://docs.oracle.com/javase/6/docs...Exception.html
http://docs.oracle.com/javase/6/docs...oundError.html

The reason for this is that normally, you don't expect NoClassDefFoundError to be thrown as this is a serious, unexpected fatal error. For example it will be thrown when your code compiled okay but while running, some of the previously compiled classes are missing.

If you compile and run the following code with "javac TestE.java && java TestE" everything is fine.
Code:
public class TestE {
        public static void main (String[] args) {
                System.out.println("Hello World!");
                TestKlass test = new TestKlass();
        }
}
class TestKlass {}
If you try "javac TestE.java; rm -f TestKlass.class; java TestE" you get an NoClassDefFoundError exception as the JVM completely freaked out because of not finding a class that should have been there.

OTOH you get an checked ClassNotFoundException if you dynamically try to load a class (e.g. Class.forName("doesntexist")) as the compiler can't check during compilation if this class does exist and there this is a expected exception to occur.
bhaak is offline   Reply With Quote
Old 10-26-2012, 07:58 AM   #872
dung.saga
Junior Member
dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.dung.saga can tame squirrels without the assistance of a chair or a whip.
 
Posts: 7
Karma: 11342
Join Date: Oct 2012
Device: Kindle Touch
Wink seems like PDF zoom parameters

I've just decoded PDFReader-impl.jar with jad, and I've found something looks like PDF zoom parameters in source code of PDFPageImpl.class

Code:
    private void x()
    {
        D(1.0D);
        K(600, 800);
        D(1.0D);
        K(800, 600);
        D(2D);
        K(600, 800);
        D(2D);
        K(800, 600);
        D(2.5D);
        K(600, 800);
        D(2.5D);
        K(800, 600);
        D(3D);
        K(600, 800);
        D(3D);
        K(800, 600);
    }

    private void K(int a, int a)
    {
        displayWidth = a;
        displayHeight = a;
        try
        {
            J();
        }
        catch(Exception a)
        {
            LOG.error("Failed to initiate page", a);
        }
    }

    public void D(double a)
    {
        if(a == 1.0D && theScaleFactor != a)
        {
            _scrollOffsetX = 0;
            _scrollOffsetY = 0;
        }
        theScaleFactor = a;
        j();
    }
Method K assigns value to displayWidth and displayHeight.
Method D assigns value to theScaleFactor.

Method x calls D() repeatedly with values 1, 2, 2.5 and 3.
It also calls K() repeatedly with values 600 and 800.

I guess this related to zoom ratio in PDF reader. But I don't know how to test it with JBPatch yet. A job for next week .
dung.saga is offline   Reply With Quote
Old 10-29-2012, 02:23 PM   #873
kbaerwald
BioReader
kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'
 
kbaerwald's Avatar
 
Posts: 292
Karma: 42568
Join Date: Apr 2009
Location: Germany
Device: Various
Margins

I just tried to change margins on my K5 (latest JBPatch):

1. opened JBPatch/Margins
2. changed all margins for non-pdf to zero (0)
3. saved the setup and exited to main menue
4. restarted K5 through the settings menue
5. opened JBPatch/Margins again

There are still the standard values 40, 80 and 120 showing up.

I am using JBPatch now for a while with changing hyphenation only and followed the Wiki end-user documentation howto in detail.

Either I do a completely stupid mistake or my setup of JBPatch has a problem.
kbaerwald is offline   Reply With Quote
Old 10-29-2012, 02:39 PM   #874
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by kbaerwald View Post
I just tried to change margins on my K5 (latest JBPatch):

1. opened JBPatch/Margins
2. changed all margins for non-pdf to zero (0)
3. saved the setup and exited to main menue
4. restarted K5 through the settings menue
5. opened JBPatch/Margins again

There are still the standard values 40, 80 and 120 showing up.

I am using JBPatch now for a while with changing hyphenation only and followed the Wiki end-user documentation howto in detail.

Either I do a completely stupid mistake or my setup of JBPatch has a problem.
I have been receiving a similar request lately via PM (concerning the Cover View Patch, where settings would simply not have any effect). I'm currently a bit busy, so I can't promise a date when it will be fixed (or even when I can look into it).

It may well be that Amazon has lately pushed some silent update which breaks part of JBPatch's functionality. Try to restart the device and see if the error persists. If so, please do the following:
  1. Set the margin values in JBPatch, and save them.
  2. Perform a "Sync" operation ("System" tab).
  3. plug the kindle to the PC, and verify that the content of opt/jbpatch/com.mobileread.ixtab.patch.margins.txt contains the selected settings.

If you notice anything odd, please let me know. Well in fact, let me know in any case. Thanks!
ixtab is offline   Reply With Quote
Old 10-29-2012, 02:40 PM   #875
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
@kbaerwald post the logs if you can find anything meaningful. and have access to the device.

@Ixtab I did note my Font size alterations don't work. thought it might be the book (I only have one)

Could dig deeper. Maybe get two books... yeah

Cheers.

Last edited by twobob; 10-29-2012 at 02:42 PM. Reason: @'s
twobob is offline   Reply With Quote
Old 10-29-2012, 02:50 PM   #876
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Quote:
Originally Posted by twobob View Post
@kbaerwald post the logs if you can find anything meaningful. and have access to the device.
@Ixtab I did note my Font size alterations don't work. thought it might be the book (I only have one)
Could dig deeper. Maybe get two books... yeah
Cheers.
Only one? I have 9!
qlob is offline   Reply With Quote
Old 10-29-2012, 02:56 PM   #877
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by qlob View Post
Only one? I have 9!


With all the fiddling, resetting etc. ... I usually have no books at all on my Kindle

(Well, except on holidays or travel. Then I just put a book or two, and actually do use it as an e-reader, instead of constantly messing around with its internals and breaking everything )
ixtab is offline   Reply With Quote
Old 10-29-2012, 02:58 PM   #878
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
The only way I can even find my Kindle is to follow the maze of cables and test leads.
knc1 is offline   Reply With Quote
Old 10-29-2012, 04:31 PM   #879
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by kbaerwald View Post
I just tried to change margins on my K5 (latest JBPatch):

1. opened JBPatch/Margins
2. changed all margins for non-pdf to zero (0)
3. saved the setup and exited to main menue
4. restarted K5 through the settings menue
5. opened JBPatch/Margins again

There are still the standard values 40, 80 and 120 showing up.
OK, so I just read this again. What do you mean by "showing up"?

Are you talking about the reader, or about JBPatch not respecting your saved settings? If the latter, this is indeed something that needs to be fixed in JBPatch. If the former, I'll be quoting myself from the first post:
  • Questions: Feel free to post your questions in this thread. However, please try not to ask questions that have already been answered many times before. No, I'm not asking you to read all the hundreds of posts in this thread, but please read at least the *entire* Wiki page, and use the forum's search function, before asking your question.

... and more specifically: Modify Reader Margins
ixtab is offline   Reply With Quote
Old 10-29-2012, 04:53 PM   #880
kbaerwald
BioReader
kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'
 
kbaerwald's Avatar
 
Posts: 292
Karma: 42568
Join Date: Apr 2009
Location: Germany
Device: Various
... standard values are showing up in JBPatch i.e. in the in Modify Reader Margins section. This is before I even open an ebook and switch the margins. It means the data input fields have not changed after restart.

Further down you read "... and followed the Wiki end-user documentation howto in detail."
kbaerwald is offline   Reply With Quote
Old 10-29-2012, 05:10 PM   #881
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by kbaerwald View Post
... standard values are showing up in JBPatch i.e. in the in Modify Reader Margins section. This is before I even open an ebook and switch the margins. It means the data input fields have not changed after restart.

Further down you read "... and followed the Wiki end-user documentation howto in detail."
OK, thanks for the clarification.

I have tried the exact same scenario on my device now (twice), and everything works exactly as it should. JBPatch saves and reads the values properly, and the reader uses them as well. I'm really clueless now, so please report back your results for this.
ixtab is offline   Reply With Quote
Old 10-29-2012, 05:12 PM   #882
kbaerwald
BioReader
kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'kbaerwald understands when you whisper 'The dog barks at midnight.'
 
kbaerwald's Avatar
 
Posts: 292
Karma: 42568
Join Date: Apr 2009
Location: Germany
Device: Various
o.k. some more information after changing the margin values and syncing JBPatch. This is the content of opt/jbpatch/com.mobileread.ixtab.patch.margins.txt:

# This file is a configuration file, and may contain important settings.
# Change this file at your own risk, and only if you know what you are doing.

reader.content.topMargin=30
reader.content.topMarginOffset=10
reader.content.bottomMargin=30
reader.progressbar.footer.height=30
reader.content.leftMargin=40
reader.content.rightMargin=40
font.wordsperline.margin.list.default=40
font.wordsperline.margin.list.fewer=80
font.wordsperline.margin.list.fewest=120

Next I changed the specific margin values inside the txt file by hand (all 0) and restarted the reader. Then opened JBPatch and found ... the values = 0. Exactly the values I changed by hand. And alas - inside the document the margin settings have changed visibly.

Looks like JBPatch did not change the com.mobileread.ixtab.patch.margins.txt - but why?
kbaerwald is offline   Reply With Quote
Old 10-29-2012, 05:27 PM   #883
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@kbaerwald: What's the complete firmware version/build rev of your device? (Check the 'Device Info' popup from the Setting's page menu).

@ixtab: Would the JBPatch UI start & appear to function normally without the Kindlet jailbreak?
NiLuJe is offline   Reply With Quote
Old 10-29-2012, 05:33 PM   #884
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by kbaerwald View Post
o.k. some more information after changing the margin values and syncing JBPatch. This is the content of opt/jbpatch/com.mobileread.ixtab.patch.margins.txt:

# This file is a configuration file, and may contain important settings.
# Change this file at your own risk, and only if you know what you are doing.

reader.content.topMargin=30
reader.content.topMarginOffset=10
reader.content.bottomMargin=30
reader.progressbar.footer.height=30
reader.content.leftMargin=40
reader.content.rightMargin=40
font.wordsperline.margin.list.default=40
font.wordsperline.margin.list.fewer=80
font.wordsperline.margin.list.fewest=120

Next I changed the specific margin values inside the txt file by hand (all 0) and restarted the reader. Then opened JBPatch and found ... the values = 0. Exactly the values I changed by hand. And alas - inside the document the margin settings have changed visibly.

Looks like JBPatch did not change the com.mobileread.ixtab.patch.margins.txt - but why?
Well, that brings us closer to the source of the problem.

Obviously, the settings are correctly read, but they aren't always correctly saved. Do you see anything strange in the JBPatch log file? (System tab; the scrolling method is a bit weird because of the way that Amazon implemented it. Essentially, just use it as if you were scrolling on a smartphone, i.e. "drag" the content).

As said, I can't reproduce the problem. I have double checked everything: I am logged in (=registered with Amazon), I have wireless turned on, and I also rebooted the device just in case. For me, everything continues to work just fine. I'm essentially helpless - I can't provide solutions for problems that I can't reproduce and therefore don't understand

So please, @kbaerwald, but also @anybody else who is affected by this: provide as much information as you can.
ixtab is offline   Reply With Quote
Old 10-29-2012, 05:35 PM   #885
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by NiLuJe View Post
@ixtab: Would the JBPatch UI start & appear to function normally without the Kindlet jailbreak?
Nope. JBPatch requires the Kindlet Jailbreak (and it says so if it's started without it).
ixtab is offline   Reply With Quote
Reply

Tags
jbpatch, kindle touch hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 06:33 AM.


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