GNU bug report logs - #17267
24.3.50; 100% cpu usage of emacs when copy some lines to org buffer

Previous Next

Package: emacs;

Reported by: Jingtao Xu <jingtaozf <at> gmail.com>

Date: Tue, 15 Apr 2014 07:48:02 UTC

Severity: normal

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 17267 <at> debbugs.gnu.org (full text, mbox):

From: Jingtao Xu <jingtaozf <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 17267 <at> debbugs.gnu.org
Subject: Re: 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 part 1 (text/plain, inline)]
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 <eliz <at> gnu.org> wrote:
>> From: Jingtao Xu <jingtaozf <at> gmail.com>
>> 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.
[test.diff (text/plain, attachment)]
[test.el (text/x-emacs-lisp, attachment)]

This bug report was last modified 11 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.