From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jingtao Xu Newsgroups: gmane.emacs.bugs Subject: bug#17267: 24.3.50; 100% cpu usage of emacs when copy some lines to org buffer Date: Wed, 16 Apr 2014 14:18:18 +0800 Message-ID: References: <83vbubj5xu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=047d7bf0cc52ef48e804f722e1ba X-Trace: ger.gmane.org 1397629166 24641 80.91.229.3 (16 Apr 2014 06:19:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2014 06:19:26 +0000 (UTC) Cc: 17267@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 16 08:19: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 1WaJBl-0002gl-1u for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Apr 2014 08:19:17 +0200 Original-Received: from localhost ([::1]:53010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaJBk-0006bl-JD for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Apr 2014 02:19:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaJBd-0006bT-3s for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 02:19:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaJBY-0008W0-CX for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 02:19:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaJBY-0008Vw-9Y for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 02:19:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WaJBW-0005kS-Hd for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 02:19:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jingtao Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Apr 2014 06:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17267 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17267-submit@debbugs.gnu.org id=B17267.139762910822037 (code B ref 17267); Wed, 16 Apr 2014 06:19:02 +0000 Original-Received: (at 17267) by debbugs.gnu.org; 16 Apr 2014 06:18:28 +0000 Original-Received: from localhost ([127.0.0.1]:49354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WaJAx-0005jL-AV for submit@debbugs.gnu.org; Wed, 16 Apr 2014 02:18:27 -0400 Original-Received: from mail-qa0-f51.google.com ([209.85.216.51]:53997) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WaJAt-0005j4-TJ for 17267@debbugs.gnu.org; Wed, 16 Apr 2014 02:18:24 -0400 Original-Received: by mail-qa0-f51.google.com with SMTP id j7so10190636qaq.38 for <17267@debbugs.gnu.org>; Tue, 15 Apr 2014 23:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hxcJR5eWrYufhNxTBDRojGkrdjhWmIli09yDnQGxMCc=; b=DzlCBEmdwT/AIEacLalHR00sd9nnEp5hI/4tCbwsK2pLrZTh5h6t+EK+14h+TB8Oxi 0LTQJDjPCT4Z19ydLnbDGJye8/wTVwWxxddlxZlLIrsmhFhXpdjwmLgeFT62qS/nwUIc PeYhyfblRqcYdytxJdjdDACwNnYkG13ihy6Q8wlphrGLn99fbfXWIwmJ6FID6lv5JFlZ lHPZ0Qe5ryAyjLA1OIB0vznzkpguQxe9Ab3Ycf5354DNzADWRcxnw329tIbeQSHSNpVi s68+h4g90xWsa1j9iXxn//jfjt1t5LQyU5f6vu8YUCWFpjzz5dBgpQKBKwxvU8njrBLl AhOQ== X-Received: by 10.224.29.206 with SMTP id r14mr286455qac.91.1397629098341; Tue, 15 Apr 2014 23:18:18 -0700 (PDT) Original-Received: by 10.140.92.147 with HTTP; Tue, 15 Apr 2014 23:18:18 -0700 (PDT) In-Reply-To: <83vbubj5xu.fsf@gnu.org> 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:88049 Archived-At: --047d7bf0cc52ef48e804f722e1ba Content-Type: text/plain; charset=UTF-8 I create test files /tmp/test.el and /tmp/test.diff,see them in attach. Then I start emacs with -q and create a empty file /tmp/test.org,and press M-x then invoke function "my-changes",it fails with error "line-move: Args out of range: 160, 160". But If I invoke this function in buffer test.el,it runs fine. Of course it's not a bug of 100% cpu usage,but It also works fine in my old emacs whether I invoke this command in buffer test.org or not. Hope this help you indicate the issue position. Thanks. With Best Regards. jingtao. ------------------------------------------------------------------------------------------------------------------------- On Tue, Apr 15, 2014 at 5:30 PM, Eli Zaretskii wrote: >> From: Jingtao Xu >> Date: Tue, 15 Apr 2014 15:46:13 +0800 >> >> >> I wrote one elisp function to collect the code changes of a svn diff file: >> ============================================================================================= >> (defun my-svn-codes-changes (&optional proj) >> (interactive) >> (if (null proj) >> (setf proj (my-select-project))) >> (with-current-buffer (find-file-noselect (my-path proj (concat (my-p-id proj) ".diff"))) >> (fundamental-mode) >> (goto-char (point-min)) >> (let (result-list cur-file cur-file-changes) >> (while (search-forward "Index: " nil t) >> (setf cur-file (buffer-substring-no-properties (point) (line-end-position))) >> (next-line 3) >> ;;(loop repeat 3 do (next-line)) >> (let ((start-pos (line-beginning-position)) >> (end-pos (point-max))) >> (when (search-forward "Index: " nil t) >> (previous-line) >> (setf end-pos (line-end-position))) >> (setf cur-file-changes (buffer-substring-no-properties start-pos end-pos)) >> (push (cons cur-file cur-file-changes) result-list) >> (goto-char end-pos))) >> (reverse result-list)))) >> ============================================================================================= >> It works fine in emacs 24.3.1,but in emacs 24.3.50,it will enter into an infinite loop and never return. >> >> I debugged emacs source code and find the infinite loop seems to happen in c function handle_stop,of file xdisp.c. >> emacs nerver return from this function,and in handle_stop,when it call function handle_invisible_prop,it will >> return HANDLED_RECOMPUTE_PROPS. > > Sorry, I don't see any obvious relation between the above function and > the part of xdisp.c where you see the infloop. Is it possible for you > to construct a reproducible recipe for this bug, starting with "emacs -Q", > including any external files necessary for reproducing the bug? If so, > please post the recipe and the files here. > > Thanks. --047d7bf0cc52ef48e804f722e1ba Content-Type: text/plain; charset=US-ASCII; name="test.diff" Content-Disposition: attachment; filename="test.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hu2800rb1 SW5kZXg6IGFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWEKPT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpD YW5ub3QgZGlzcGxheTogZmlsZSBtYXJrZWQgYXMgYSBiaW5hcnkgdHlwZS4Kc3ZuOm1pbWUtdHlw ZSA9IGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbQpJbmRleDogYmJiYmJiYmJiYmJiYmJiYmJiYmJi YmJiYmJiYmJiYmJiYgo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJi YmJiYmJiCSguLi4vY2NjY2NjY2NjY2NjY2NjY2NjYykJKHJldmlzaW9uIDExMTExMSkKKysrIGJi YmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmIJKC4uLi9kZGRkZGRkZGRkZGRkZGRkZGRk KQkocmV2aXNpb24gMjIyMjIyKQpAQCAtMjg3LDYgKzI4Nyw5IEBACit4Y29weSAlQUFBQUFBJVxi YmJiYmJiLmh0bWwgJURJUiVcIC9SDQogDQogQGVjaG8gLS0tIGZmZmZmZmZmZmYNCkluZGV4OiBj Y2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjYwo9PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09Ci0tLSBjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2Nj Y2NjY2NjYwkoLi4uL2NjY2NjY2NjY2NjY2NjY2NjY2MpCShyZXZpc2lvbiAxMTExMTEpCisrKyBj Y2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjYwkoLi4u L2RkZGRkZGRkZGRkZGRkZGRkZGQpCShyZXZpc2lvbiAyMjIyMjIpCkBAIC0xLDMgKzAsMCBAQAot QGVjaG8gb2ZmIA0KLQ0KLXJlZ3N2cjMyIC9zIC9jIGVlZWVlZWVlZS5vY3gNCg== --047d7bf0cc52ef48e804f722e1ba Content-Type: text/x-emacs-lisp; charset=US-ASCII; name="test.el" Content-Disposition: attachment; filename="test.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hu27zoqf0 Ozs7IC0qLSBlbmNvZGluZzp1dGYtOCAtKi0gIC0tLQooZGVmdW4gbXktY2hhbmdlcyAoKQogIChp bnRlcmFjdGl2ZSkKICAod2l0aC1jdXJyZW50LWJ1ZmZlciAoZmluZC1maWxlLW5vc2VsZWN0ICIv dG1wL3Rlc3QuZGlmZiIpCiAgICAoZnVuZGFtZW50YWwtbW9kZSkKICAgIChnb3RvLWNoYXIgKHBv aW50LW1pbikpCiAgICAobGV0IChyZXN1bHQtbGlzdCBjdXItZmlsZSBjdXItZmlsZS1jaGFuZ2Vz KQogICAgICAod2hpbGUgKHNlYXJjaC1mb3J3YXJkICJJbmRleDogIiBuaWwgdCkKICAgICAgICAo bWVzc2FnZSAicmFuZ2U6JWQsJWQiIChwb2ludCkgKGxpbmUtZW5kLXBvc2l0aW9uKSkKICAgICAg ICAoc2V0ZiBjdXItZmlsZSAoYnVmZmVyLXN1YnN0cmluZy1uby1wcm9wZXJ0aWVzIChwb2ludCkg KGxpbmUtZW5kLXBvc2l0aW9uKSkpCiAgICAgICAgKG5leHQtbGluZSAzKQogICAgICAgICcobG9v cCByZXBlYXQgMyBkbwogICAgICAgICAgKG1lc3NhZ2UgIm1vdmUgbGluZSIpCiAgICAgICAgICAo bmV4dC1saW5lKSkKICAgICAgICAobGV0ICgoc3RhcnQtcG9zIChsaW5lLWJlZ2lubmluZy1wb3Np dGlvbikpCiAgICAgICAgICAgICAgKGVuZC1wb3MgKHBvaW50LW1heCkpKQogICAgICAgICAgKHdo ZW4gKHNlYXJjaC1mb3J3YXJkICJJbmRleDogIiBuaWwgdCkKICAgICAgICAgICAgKHByZXZpb3Vz LWxpbmUpCiAgICAgICAgICAgIChzZXRmIGVuZC1wb3MgKGxpbmUtZW5kLXBvc2l0aW9uKSkpCiAg ICAgICAgICAoc2V0ZiBjdXItZmlsZS1jaGFuZ2VzIChidWZmZXItc3Vic3RyaW5nLW5vLXByb3Bl cnRpZXMgc3RhcnQtcG9zIGVuZC1wb3MpKQogICAgICAgICAgKHB1c2ggKGNvbnMgY3VyLWZpbGUg Y3VyLWZpbGUtY2hhbmdlcykgcmVzdWx0LWxpc3QpCiAgICAgICAgICAoZ290by1jaGFyIGVuZC1w b3MpKSkKICAgICAgKG1lc3NhZ2UgInJlc3VsdCBpcyAlcyIgKHJldmVyc2UgcmVzdWx0LWxpc3Qp KSkpKQo= --047d7bf0cc52ef48e804f722e1ba--