From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#17392: 24.3.90; cursor blinks faster and faster Date: Sun, 11 May 2014 13:09:30 +0200 Message-ID: <87ppjkfu6t.fsf@web.de> References: <87r44b1vrh.fsf@web.de> <8738gq67av.fsf@web.de> <87sioqcx7n.fsf@web.de> <8761lkugic.fsf@web.de> <877g5zygco.fsf@web.de> <87a9au5o8l.fsf@web.de> <8761ld3ota.fsf@web.de> <83ppjlvqo1.fsf@gnu.org> <871tw150b9.fsf@web.de> <83oaz5vmph.fsf@gnu.org> <83k39tvcb0.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1399806627 11297 80.91.229.3 (11 May 2014 11:10:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 May 2014 11:10:27 +0000 (UTC) Cc: 17392@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 11 13:10:20 2014 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 1WjRe7-0000Fm-Ak for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 May 2014 13:10:19 +0200 Original-Received: from localhost ([::1]:60603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRe6-0002XG-BD for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 May 2014 07:10:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRdx-0002Wu-5C for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 07:10:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjRdr-00027F-8u for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 07:10:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjRdr-00026W-4f for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 07:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WjRdq-0005MZ-Bl for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 07:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 May 2014 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17392 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17392-submit@debbugs.gnu.org id=B17392.139980659220589 (code B ref 17392); Sun, 11 May 2014 11:10:02 +0000 Original-Received: (at 17392) by debbugs.gnu.org; 11 May 2014 11:09:52 +0000 Original-Received: from localhost ([127.0.0.1]:58818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjRdf-0005M0-Ao for submit@debbugs.gnu.org; Sun, 11 May 2014 07:09:51 -0400 Original-Received: from mout.web.de ([212.227.17.12]:62202) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjRdd-0005Lj-Io for 17392@debbugs.gnu.org; Sun, 11 May 2014 07:09:50 -0400 Original-Received: from drachen.dragon ([90.186.181.129]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0LheZV-1XE7k01U5B-00mq31; Sun, 11 May 2014 13:09:37 +0200 In-Reply-To: <83k39tvcb0.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 May 2014 19:16:51 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.90 (gnu/linux) X-Provags-ID: V03:K0:3k3DugOs/94oYJxMTGY1NcntNpU07iKOeQTCB7a4XcUoRc0Yuh0 KzJKnlWelsuerXXhCCoAtPexDtwQG+Y5sr5uY70s26pGqd9yz+mLfsO6Q7iRLb2aoJoGXuy n3VgOW33ZdbWDfDBPi2x1nNK2DfstDO9qlCt2GF4ZCVLMq723WwUIj76FSfwCl/g738LDH9 6RrXhUn9Mel550B27bjig== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:88891 Archived-At: Eli Zaretskii writes: > So I'm asking whether you are sure what you see is a real problem, and > not some artifact of how you look for a problem. No, I'm not sure. And I didn't want to convince you, on the contrary, I need help to find it out. My knowledge of the C code is limited. Here is what I do know for sure: Evaluating --8<---------------cut here---------------start------------->8--- (progn (defun provoke (&rest _) (run-with-idle-timer .001 nil (lambda () (sit-for 2.) (message "%s" (length timer-idle-list))))) (defadvice handle-switch-frame (after provoke activate) (provoke))) --8<---------------cut here---------------end--------------->8--- and switching frames with M-TAB leads to a situation where multiple timers running blink-cursor-start are present in timer-idle-list. These timers are all `equal', but not `eq' - they are different objects. I advised all functions named timer-... to count the number of _different_ timers running `blink-cursor-start' (those in timer-idle-list, plus the one maybe bound to blink-cursor-idle-timer) before and after the call to the function. I can post the code if you want. This count should always be <= 1, right? With the advices, I was interested in the first time when the count is > 1, i.e., when the state switched from sane to pathological. And I found that the count was > 1 for the first time after `timer-event-handler' had been called (from C). Before that call the count had still been 1. And I know why the count increased: namely because the timer object that timer-event-handler was called with was not present (referable) from the Lisp level at that point of time. But another (equal, but not eq) timer was present in timer-idle-list. Due to lack of C knowledge, I can't interpret that result. But it shows that the C level is definitely involved, and the bug is not in timer.el, at least, not only. Summa summarum: no, I don't know if this `timer-event-handler' call from C is unkosher, but it is the mechanism that leads to successive additions of blink-cursor-start timers to timer-idle-list. Michael.