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 07-07-2018, 12:41 PM   #1
aleq
Member
aleq began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2012
Location: CZ, EU
Device: K4NT (4.0.1), KT (5.3.7.3), KPW1 (sold), KPW2
WebLaunch fullscreen browser crash after few hours

Hi,
this may be hard to crack, I wonder if anyone has any advice. I was planning to use Kindle Touch as Smart Home control panel. Just a local HTML page doing regular HTTP (REST) calls and displaying results. My test page runs JavaScript code every second, doing screen updates (and calling JQuery ajax method every 30 seconds). It crashes after several hours of flawless operation (ie. overnight) - you can see the error message in the attachment. The calls are to localhost, to my tiny python sever which forwards the call to Smart home (mainly handles the HTTP authentication, which doesn't work reliably from WAF (for some reason, it sometimes displays a popup asking for a login and password although I have filled that in JavaScript)).

The crash happened to me twice already (I haven't been testing it for longer, so it seems it does crash always, eventually). I have been monitoring free memory via SSH, seems not to drop down significantly, at least not in the first several hours.

This basically destroys my plan to use it as a permanent Smart Home control panel on the wall.

Any advice, tip?

I was thinking of workaround - in the Python script I could trigger an action if no request came in for certain amount of time. Is there a way to start KUAL extension (WebLaunch) from a command line? This way I could restart WebLaunch as soon as it crashes.

I liked the idea of developing it in HTML since it's very flexible and rather easy, compared to let's say custom Python PyGTK app.
Attached Thumbnails
Click image for larger version

Name:	kindle-error.PNG
Views:	46
Size:	953.0 KB
ID:	164922  
aleq is offline   Reply With Quote
Old 07-07-2018, 01:47 PM   #2
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: 7,321
Karma: 7000011
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
The system enforces specific memory limits per service, so you may want to check the logs if it's not simply pmond having killed it out of spite .

But that's just for science, that won't really help you if memory usage keeps growing for real (you can tweak pmond's quotas [it's not fun, but you can], but if there's a leak, the OOM killer will eventually take care of it, so, not a solution).

Since KUAL is a launcher, you can of course launch a specific action/params pair yourself, just look at the json of the specific extension you're using.

Last edited by NiLuJe; 07-07-2018 at 01:49 PM.
NiLuJe is online now   Reply With Quote
Old 07-07-2018, 04:40 PM   #3
aleq
Member
aleq began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2012
Location: CZ, EU
Device: K4NT (4.0.1), KT (5.3.7.3), KPW1 (sold), KPW2
Thank you, NiLuJe!
Geez, that was easy, there was a shell command in the JSON indeed. For some reason I was worried the framework is completely separated from linux (like Android). Cool. So in the worst case, there may be a chance to restart the application when it crashes. Some "flickering", but still better than nothing.

I haven't found any suitable log (/var/log/*) so I might need to investigate here more. For the time being, the rough test - I have stopped pmond and restarted the extension. And added periodic reloads to that page. Let's see tomorrow, if it survives.

If there is memory leak, then it's the WAF itself :-/ WebLaunch doesn't seem to do much, just launches mesquite, does some tweaking and then loads an URL. There goes my HTML with jQuery. So I wonder is it likely that there is a memory leak in there? It's used everywhere else, isn't it?
Plus, I have monitored the memory using "free" command in the console. It drop
aleq is offline   Reply With Quote
Old 07-07-2018, 05:45 PM   #4
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: 7,321
Karma: 7000011
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
showlog -f is your new friend
NiLuJe is online now   Reply With Quote
Old 07-10-2018, 09:41 AM   #5
lucasmpr
Enthusiast
lucasmpr began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jul 2017
Device: Kindle
Quote:
Originally Posted by aleq View Post
Is there a way to start KUAL extension (WebLaunch) from a command line?

lipc-set-prop com.lab126.appmgrd stop app://com.PaulFreund.WebLaunch

and

lipc-set-prop com.lab126.appmgrd start app://com.PaulFreund.WebLaunch


This way you can restart the application. If you wish. You can even use once a day in a cron script or make your server do the call via ssh. It's very easy and may be a nice workaround.

I don't know wich version you're using. I have some troubles with my weblaunch version sometimes. But it never crashes like that. The javascript just seem not to work anymore.
lucasmpr is offline   Reply With Quote
Old 07-10-2018, 01:46 PM   #6
knc1
Analog Forever!
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: 16,171
Karma: 17256900
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by lucasmpr View Post
- - - -
You can even use once a day in a cron script
- - - -
Rethink that bit of advice.
"cron" is a computer utility, it requires an running CPU, only that when a Kindle goes to sleep, the CPU is not running.
knc1 is offline   Reply With Quote
Old 07-10-2018, 04:23 PM   #7
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: 7,321
Karma: 7000011
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
Yeah, that sort of advice only works for full conversion projects that happens to be stationary and always connected to a power source .

Otherwise, cron is a no go .
NiLuJe is online now   Reply With Quote
Old 07-10-2018, 10:28 PM   #8
lucasmpr
Enthusiast
lucasmpr began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jul 2017
Device: Kindle
Quote:
Originally Posted by knc1 View Post
Rethink that bit of advice.
"cron" is a computer utility, it requires an running CPU, only that when a Kindle goes to sleep, the CPU is not running.
My kindles never go to sleep. They are full time on and powered. But whatever you like.

I didn't mind to ask if it was the case. It was a workaround anyway. A Fairly easy one to do. I didn't think too much.

Peace
lucasmpr is offline   Reply With Quote
Reply

Tags
commandline, crash, kual, weblaunch

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WebLaunch - Fullscreen browser for web-applications PaulFreund Kindle Developer's Corner 128 01-19-2018 08:33 AM
Is GTK lighter on battery than WebLaunch or similar? aditya3098 Kindle Developer's Corner 4 12-19-2014 04:45 AM
looking to buy jail-broken Kindle PW running fullscreen web browser spaceyam Kindle Developer's Corner 3 04-14-2013 08:45 AM
Kindle 2 Browser Always Crash and Cause Reboot kurlez Amazon Kindle 0 03-18-2011 02:22 AM
FullScreen on Kindle Browser SunLight Amazon Kindle 7 10-11-2010 04:30 PM


All times are GMT -4. The time now is 04:26 PM.


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