From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#12326: 24.2.50; js2-mode freezes on current trunk Date: Sun, 02 Sep 2012 21:27:18 +0400 Message-ID: <504396F6.1080309@yandex.ru> References: <504284CE.3040203@yandex.ru> <44BE28C5-1BC9-4346-873D-84D052F2A338@swipnet.se> <50435939.6070104@yandex.ru> <2F6F9AFA-23C7-4480-BBDD-288CEB5E88C6@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1346606862 12049 80.91.229.3 (2 Sep 2012 17:27:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Sep 2012 17:27:42 +0000 (UTC) Cc: 12326@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 02 19:27:43 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8DxW-0006Zm-KF for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Sep 2012 19:27:42 +0200 Original-Received: from localhost ([::1]:57849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8DxT-00025X-NI for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Sep 2012 13:27:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8DxQ-00025G-MM for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 13:27:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8DxP-0008Jz-Ku for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 13:27:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8DxP-0008Jp-Cq for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 13:27:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T8Dyo-00005m-EN for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 13:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Sep 2012 17:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12326 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12326-submit@debbugs.gnu.org id=B12326.1346606930337 (code B ref 12326); Sun, 02 Sep 2012 17:29:02 +0000 Original-Received: (at 12326) by debbugs.gnu.org; 2 Sep 2012 17:28:50 +0000 Original-Received: from localhost ([127.0.0.1]:34713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8Dyc-00005N-A7 for submit@debbugs.gnu.org; Sun, 02 Sep 2012 13:28:50 -0400 Original-Received: from forward14.mail.yandex.net ([95.108.130.92]:38615) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8DyZ-00005E-An for 12326@debbugs.gnu.org; Sun, 02 Sep 2012 13:28:49 -0400 Original-Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward14.mail.yandex.net (Yandex) with ESMTP id ECCF5198107D; Sun, 2 Sep 2012 21:27:17 +0400 (MSK) Original-Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id C80CB1B60753; Sun, 2 Sep 2012 21:27:17 +0400 (MSK) Original-Received: from 5x166x243x132.dynamic.spb.ertelecom.ru (5x166x243x132.dynamic.spb.ertelecom.ru [5.166.243.132]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id RGZeCTnt-RHZ46Lcu; Sun, 2 Sep 2012 21:27:17 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1346606837; bh=SD5+S9QePH71Zyu0PoHsPCkL3SgdrDi69yNCsgqcezk=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=VStqEyx7UkAnact7wjUP8u+HDWz/Ze3azjOY3IZE31yDvzH0AxHVHvqGjyJIaMf+t IFLR+tiVQdyFcWU3ZTtuP8qu+nxTBAZ6ZpsEnuum56i/ihFGYk3aEtJteyjWPhpYv9 lZr83oMHmEo/hzgbKGpaLqomcC7vuFBuSHYwvmXE= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 In-Reply-To: <2F6F9AFA-23C7-4480-BBDD-288CEB5E88C6@swipnet.se> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63680 Archived-At: On 02.09.2012 20:06, Jan Dj=E4rv wrote: > That is not the problem. > Previously timer_check_2 found a timer to run, ran that, and continued = to search in the list. > If the timer callback added a timer, it may happen that that timer is i= nserted in the front of the list, and not checked by timer_check_2. I see. That's probably the reason why it worked. > Now timer_check_2 finds a timer, runs that, and then returns so timer_c= heck can call timer_check_2 again. This makes timer_check_2 start over, = checking from the beginning of the list. > >> >>> When a dialog i shown, the time to the next time is checked with time= r_check and when that time is reached, the timer is run. If timer_check = returns an out of order time, timers are not run when they should be. >> >> Didn't they they just run a little late, due to the time values, again= st which the difference was calculated, being slightly outdated? > > The case I had was one repeating 20 second timer, and one repeating 2 s= econd timer. > The 2 second timer would be run once, then timer_check_2 would return t= he difference to the 20 second timer, thus skipping some 10 invokations o= f the 2 second timer. > >> >>> I'm surprised that js2 functions with undefined behaviour and not wit= h defined behaviour. >> >> Looks like the previous behavior was more conservative. > > And wrong. > >> >> I think js2-mode is only unusual in that it may schedule a new timer f= rom within a timer callback function. > > It may be that some timing issues in the handling of the timer lists st= ill remain. Indeed. I wonder if scheduling an idle timer from within its callback=20 with `run-with-idle-timer' is supposed to work at all.