Bugs :  K-Meleon Web Browser Forum
You can talk about issues with k-meleon here.  
Crash on injectJS with setTimeout?
Posted by: JohnHell
Date: April 06, 2017 04:57PM

Let's see if this is a bug only in K-meleon 75.0 or it happens, as well, to newer versions.

My opinion is that with the implementation of timeouts in K-meleon, something was forgotten and now a simple timeout kills K-meleon.


Use this code in a macro, be aware that, by default, on start K-meleon might crash:


settimeoutcrash{
	injectJS("setTimeout(alert,2000,'test');"); # this will crash K-meleon upon load.


#	injectJS("(function(){setTimeout(alert,2000,'test');})();"); # this uncommented and commented the previous, will not and will alert after 2 seconds. Javascript enabled, by the way winking smiley
}

$OnLoad = $OnLoad."settimeoutcrash;";


Note that this doesn't happen in webpages, just when the timeout is injected.


From here, reports smiling smiley



Edited 4 time(s). Last edit at 04/06/2017 05:04PM by JohnHell.

Options: ReplyQuote
Re: Crash on injectJS with setTimeout?
Posted by: rodocop
Date: April 06, 2017 05:07PM

Not tested yet your code, but I have 1 macro with native KM 'settimer' statement - and it works fine in KM.



Edited 1 time(s). Last edit at 04/06/2017 05:08PM by rodocop.

Options: ReplyQuote
Re: Crash on injectJS with setTimeout?
Posted by: JohnHell
Date: April 06, 2017 06:38PM

Quote
rodocop
Not tested yet your code, but I have 1 macro with native KM 'settimer' statement - and it works fine in KM.

Yes, but I don't mean that, I want to test if injecting JS with a settimeout crashes. The timeout I was using depended on a secondary load, not the page, so KM settimer wasn't useful now.

Options: ReplyQuote
Re: Crash on injectJS with setTimeout?
Posted by: JamesD
Date: April 07, 2017 12:39PM

It works just fine on my KM76RC2. Every time a page loads, I see a message about "test".

Yes, confirmed. Just got the message again on Preview.

Edit:

I just tested the 2nd method. The one that was commented out. It works too.



Edited 1 time(s). Last edit at 04/07/2017 12:45PM by JamesD.

Options: ReplyQuote
Re: Crash on injectJS with setTimeout?
Posted by: JohnHell
Date: April 07, 2017 02:51PM

Quote
JamesD
It works just fine on my KM76RC2. Every time a page loads, I see a message about "test".

Yes, confirmed. Just got the message again on Preview.

Edit:

I just tested the 2nd method. The one that was commented out. It works too.


Damn it.


Ok, a bug in 75.0 then. Thanks for confirming it smiling smiley

Options: ReplyQuote


K-Meleon forum is powered by Phorum.