Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-12-2016, 06:25 PM   #1
Blokk
Junior Member
Blokk began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2016
Device: Kindle Touch (K5)
browsers exit after some time

Hello,

I have a Kindle touch (K5), Firmware is: 5.3.7.3
I have jail-breaked it successfully following the description here: https://wiki.mobileread.com/wiki/K5_Index
After the jailbreak I have installed KUAL, and finally an extension to get full screen browser:
https://www.mobileread.com/forums/sho...d.php?t=210210

All works nice, and I have programmed a little test server app for my PC (using LabVIEW) which has a webserver in order to display images in the Kindle's browser. I reach the PC from the Kindle via my local wifi.
It works, however I face a strange bug: after some minutes, the WebLaunch browser quits without error msg. The same happens with the official browser, but with the following msg: "Application Error
The selected application could not be started. Please try again."

The web server was set up to autorefresh at every 10 seconds. If I set the auto refresh rate to some high value (lets say 1 hour), then I do not get any problem (or I did not wait enough), the browser just statically shows the loaded web site obviously (I have disabled the screensaver of the Kindle).

Here is the javascript and html code side of the LabVIEW webserver. How could I fix this problem? (if needed, I can share the LabVIEW project too).
Thanks very much for any help and guide!

index.js:
Code:
/*global $*/

/*
updateFPimage gets the newest version of the Front Panel
image from the server. To prevent the browser from loading
a cached version of the image, we add a query to the URL 
for the image. We're using the time, but any query that is
guaranteed not to repeat would be fine.
*/
function updateFPimage() {
    //use strict prevents the use of undeclared variables
    "use strict";
    var d = new Date();
    $("#fpimg").attr("src", "getFPimage?" + d.getTime());
}

$(document).ready(function () {
    //use strict prevents the use of undeclared variables
    "use strict";
    
    //setInterval calls updateFPimage every 200 ms --> changed to 30 minutes to test bug...
    setInterval(updateFPimage, 1800000);
});
index.html:

Code:
<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>

  <title>Auto-Updating Image</title>
  <meta name="description" content="Auto-Update Image">
  <meta name="author" content="SitePoint">
</head>

<body>

  <script src="js/index.js"></script>
  <!-
    'id' is the hook we're going to use for our JS, and
    'getFPImage' is the name of our VI that returns an image
    of the front panel.
->
  <img id="fpimg" src="getFPImage">


</body>
</html>
Blokk is offline   Reply With Quote
Old 03-12-2016, 06:33 PM   #2
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
https://www.mobileread.com/forums/sho...d.php?t=237083
Try: #5
knc1 is offline   Reply With Quote
Old 03-12-2016, 06:38 PM   #3
Blokk
Junior Member
Blokk began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2016
Device: Kindle Touch (K5)
Quote:
Originally Posted by knc1 View Post
"My Kindle has some sort of connection problem:
Disable Network Manager if running Linux on your PC.
"
I use Windows 10 x64.

edit: more info: after the browser quits (either the built-in, or either the KUAL extension), I can just restart the browser, and it works again without problem til the next exit....

Last edited by Blokk; 03-12-2016 at 06:40 PM.
Blokk is offline   Reply With Quote
Old 03-13-2016, 06:40 AM   #4
Blokk
Junior Member
Blokk began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2016
Device: Kindle Touch (K5)
Update: I have found some related info about the javascript functions used in the above code. A possible bug was mentioned involving usage of getTime(), something about large numbers might crash browsers, anyway it was not clear.
But after changing the above function to getSeconds(), it looks like my full screen Kindle browser does not exit any more
Blokk is offline   Reply With Quote
Reply

Tags
browser, bug, timeout


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web browsers for K4? Glorfindel Kindle Developer's Corner 11 06-14-2014 10:45 AM
Other Browsers? 49Kat Kobo Tablets 1 11-10-2011 09:24 PM
Favorite Browsers =X= Android Devices 10 06-23-2011 08:01 PM
Browsers not connecting lesliesch enTourage eDGe 9 06-06-2011 08:59 PM
What's the differerence between the K2 and K3 browsers? gollu Amazon Kindle 0 08-28-2010 10:49 AM


All times are GMT -4. The time now is 07:48 PM.


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