07-07-2018, 12:41 PM | #1 |
Enthusiast
Posts: 25
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. |
07-07-2018, 01:47 PM | #2 |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
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. |
07-07-2018, 04:40 PM | #3 |
Enthusiast
Posts: 25
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 |
07-07-2018, 05:45 PM | #4 |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
showlog -f is your new friend
|
07-10-2018, 09:41 AM | #5 | |
Enthusiast
Posts: 45
Karma: 10
Join Date: Jul 2017
Device: Kindle
|
Quote:
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. |
|
07-10-2018, 01:46 PM | #6 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
07-10-2018, 04:23 PM | #7 |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
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 . |
07-10-2018, 10:28 PM | #8 | |
Enthusiast
Posts: 45
Karma: 10
Join Date: Jul 2017
Device: Kindle
|
Quote:
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 |
|
07-26-2018, 06:43 AM | #9 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Mar 2012
Location: CZ, EU
Device: K4NT (4.0.1), KT (5.3.7.3), KPW1 (sold), KPW2
|
The same for me, it's going to be a total conversion, perhaps even on the wall somewhere. Permanently on AC, never going to sleep.
I'm still investigating what's going on with that Application error (noticed NiLuJe's showlog -f just now, so I'm going to continue). It's happening even in the Experimental Browser. As soon as there are periodic XmlHttpRequest calls, it crashes eventually. Without XmlHttpRequest (but still refreshing the HTML page using JavaScript), it's stable. Cron and midnight restarts may not be sufficient, I have the feeling it crashes relatively randomly. Sometimes more often then just once in 24 hours. In the worst case I could restart the app more then just once a day, but then it may not be that pleasing to see flickering screen on the wall during the day. I'll keep this topic updated as soon as I find out more or which workaround I took. Thanks all, Aleq |
07-28-2018, 12:42 AM | #10 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Jul 2017
Device: Kindle
|
Well.
I tried a bit of stress testing. Code:
<html> <script src="http://console.re/connector.js" data-channel="projeto-abcdefgh" id="consolerescript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> var a = 0 setInterval(lucLoader, 100); function lucLoader () { $.get( "[SOMEWEBSITE you're not afraid to spam] ", function( data ) { $( "#luc" ).html( a++ ); if(a > 1000) { $( "#luc" ).html( data ); } }); } </script> <div id="luc"> </div> </html> I didn't manage to crash my experimental browser in 20 minutes of testing. |
07-29-2018, 01:13 PM | #11 | |||
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
Quote:
Quote:
Perhaps the situation might be helped in combination with something like this? |
|||
07-29-2018, 01:15 PM | #12 |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yep, although I'm not sure if anyone ever tried anything rtc related on a >= K5
|
Tags |
commandline, crash, kual, weblaunch |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WebLaunch - Fullscreen browser for web-applications | PaulFreund | Kindle Developer's Corner | 130 | 01-07-2023 01:39 PM |
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 |