unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: deng@randomsample.de, 22287@debbugs.gnu.org
Subject: bug#22287: 25.1.50; Sudden jumping point in buffer
Date: Wed, 6 Jan 2016 15:13:54 +0100	[thread overview]
Message-ID: <20160106141354.GA28490@scotty.home> (raw)
In-Reply-To: <834mer4wg7.fsf@gnu.org>

Mail von Eli Zaretskii, Tue, 05 Jan 2016 at 22:12:40 +0200:

Hello,

> > Date: Tue, 5 Jan 2016 20:51:30 +0100
> > From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
> > Cc: deng@randomsample.de, 22287@debbugs.gnu.org
> > 
> > > If you tell how you defined the watchpoint, I might be able to help
> > > you redefine it so that hardware-assisted watchpoints are used by GDB.
> > 
> > Any hint welcome.
> 
>   (gdb) watch -l current_buffer->pt if current_buffer->pt == POS
>   (gdb) commands
>     > xbacktrace
>     > continue
>     > end
>   (gdb)

Ok, I tried this. But then it was not reproducible... I tried several
things, also to enable the watchpoint if another variable set in
semanticdb-save-all-db-idle() etc. Typing hours and watching hours at debug
outputs... nothing happend.

Then I tried another thing, just M-x do-auto-save. And it happened again.
With debugging on I have to wait long minutes to see nothing happens in
emacs but tons of debug output from gdb.

Last try was to work with to watchpoints trying to trigger on writing 753 to
pt which should enable the watch to enable all writing. But worked not so
good. I also had problems with xbacktrace on eeePC I tried this morning,
because on my Core-2 machine it was not reproducible any more after
yesterday evening. And therefore defined an xbacktrace2 which just goes back
15 entries in backtrace.

I am watching pt in intervals.c having typed <ret> at the end of
set_point() ((point) = 49504), M-x do-auto-save, and then wating...

What is seen is several calls to semantic-idle-scheduler-function, which is
changing position of point, every time going back to 49504.

,----
| ...
| 
| Old value = 49505
| New value = 49504
| 0x0000000000615b63 in temp_set_point_both (bytepos=49504, charpos=49504, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-end-of-context-default" (0xffffb4b0)
| "semantic-end-of-context" (0xffffb670)
| "semantic-narrow-to-context" (0xffffb820)
| "semantic-end-of-command-default" (0xffffb9e0)
| "semantic-end-of-command" (0xffffbba8)
| "semantic-ctxt-current-assignment-default" (0xffffbd50)
| "semantic-ctxt-current-assignment" (0xffffbf10)
| "semantic-ctxt-current-thing" (0xffffc0b0)
| "semantic-idle-summary-current-symbol-info-brutish" (0xffffc270)
| "semantic-idle-summary-current-symbol-info-default" (0xffffc420)
| "semantic-idle-summary-current-symbol-info-c-mode" (0xffffc5f0)
| "semantic-idle-summary-current-symbol-info" (0xffffc7b0)
| "semantic-idle-summary-idle-function" (0xffffc970)
| "semantic-idle-core-handler" (0xffffcb50)
| "semantic-idle-scheduler-function" (0xffffce08)
| "apply" (0xffffce00)
| "timer-event-handler" (0xffffcfc8)
| Hardware watchpoint 5: -location current_buffer->pt
| 

now point is changing to 1 in semantic-c-lexer:

| Old value = 49504
| New value = 1
| 0x0000000000615b63 in temp_set_point_both (bytepos=1, charpos=1, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-c-lexer" (0xffffbb10)
| "semantic-lex" (0xffffbce8)
| "semantic-parse-region-default" (0xffffbea0)
| "semantic-parse-region-c-mode" (0xffffc070)
| "semantic-parse-region" (0xffffc240)
| "semantic-fetch-tags" (0xffffc410)
| "semantic-refresh-tags-safe" (0xffffc5c0)
| "semantic-analyze-current-context" (0xffffc7a0)
| "semantic-idle-local-symbol-highlight-idle-function" (0xffffc970)
| "semantic-idle-core-handler" (0xffffcb50)
| "semantic-idle-scheduler-function" (0xffffce08)
| "apply" (0xffffce00)
| "timer-event-handler" (0xffffcfc8)
| Hardware watchpoint 4: -location current_buffer->pt
|

going to 753, which is the end of the copyright message at begin of intervals.c:

| Old value = 1
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 1
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "forward-comment" (0xffffb930)
| "semantic-c-lexer" (0xffffbb10)
| "semantic-lex" (0xffffbce8)
| "semantic-parse-region-default" (0xffffbea0)
| "semantic-parse-region-c-mode" (0xffffc070)
| "semantic-parse-region" (0xffffc240)
| "semantic-fetch-tags" (0xffffc410)
| "semantic-refresh-tags-safe" (0xffffc5c0)
| "semantic-analyze-current-context" (0xffffc7a0)
| "semantic-idle-local-symbol-highlight-idle-function" (0xffffc970)
| "semantic-idle-core-handler" (0xffffcb50)
| "semantic-idle-scheduler-function" (0xffffce08)
| "apply" (0xffffce00)
| "timer-event-handler" (0xffffcfc8)
| Hardware watchpoint 5: -location current_buffer->pt
| 

and going back to 49504:

| Old value = 753
| New value = 49504
| 0x0000000000615b63 in temp_set_point_both (bytepos=49504, charpos=49504, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-refresh-tags-safe" (0xffffc5c0)
| "semantic-analyze-current-context" (0xffffc7a0)
| "semantic-idle-local-symbol-highlight-idle-function" (0xffffc970)
| "semantic-idle-core-handler" (0xffffcb50)
| "semantic-idle-scheduler-function" (0xffffce08)
| "apply" (0xffffce00)
| "timer-event-handler" (0xffffcfc8)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49504
| New value = 49210
| 0x0000000000615b63 in temp_set_point_both (bytepos=49210, charpos=49210, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff57b0)
| "list" (0xffff5960)
| "eval" (0xffff5af8)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49210
| New value = 49170
| 0x0000000000615b63 in temp_set_point_both (bytepos=49170, charpos=49170, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff57b0)
| "list" (0xffff5960)
| "eval" (0xffff5af8)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49170
| New value = 49209
| 0x0000000000615b63 in temp_set_point_both (bytepos=49209, charpos=49209, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff57b0)
| "list" (0xffff5960)
| "eval" (0xffff5af8)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49209
| New value = 49504
| 0x0000000000615b63 in temp_set_point_both (bytepos=49504, charpos=49504, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff57b0)
| "list" (0xffff5960)
| "eval" (0xffff5af8)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 5: -location current_buffer->pt
| 

no again semantic-c-lexer going to 1, but now not called from
timer-event-handler, but from semanticdb-save-all-db-idle:

| Old value = 49504
| New value = 1
| 0x0000000000615b63 in temp_set_point_both (bytepos=1, charpos=1, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-c-lexer" (0xffffa0c0)
| "semantic-lex" (0xffffa298)
| "semantic-parse-region-default" (0xffffa450)
| "semantic-parse-region-c-mode" (0xffffa620)
| "semantic-parse-region" (0xffffa7f0)
| "semantic-fetch-tags" (0xffffa9c0)
| 0x3462ed0 PVEC_COMPILED
| "apply" (0xffffac88)
| 0x3b4a008 PVEC_COMPILED
| "apply" (0xffffaf20)
| "object-write" (0xffffb0c8)
| "eieio-list-prin1" (0xffffb228)
| "eieio-override-prin1" (0xffffb3d8)
| 0x19a7e78 PVEC_COMPILED
| "apply" (0xffffb678)
| 0x4f0bfa0 PVEC_COMPILED
| 0x3108888 PVEC_COMPILED
| "apply" (0xffffba88)
| 0x16a4798 PVEC_COMPILED
| "apply" (0xffffbd20)
| "object-write" (0xffffbf00)
| 0x3108a40 PVEC_COMPILED
| "apply" (0xffffc180)
| "eieio-persistent-save" (0xffffc320)
| 0x3b636a0 PVEC_COMPILED
| "apply" (0xffffc5f0)
| "semanticdb-save-db" (0xffffc6e0)
| "let" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 1
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 1
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "forward-comment" (0xffff9ee0)
| "semantic-c-lexer" (0xffffa0c0)
| "semantic-lex" (0xffffa298)
| "semantic-parse-region-default" (0xffffa450)
| "semantic-parse-region-c-mode" (0xffffa620)
| "semantic-parse-region" (0xffffa7f0)
| "semantic-fetch-tags" (0xffffa9c0)
| 0x3462ed0 PVEC_COMPILED
| "apply" (0xffffac88)
| 0x3b4a008 PVEC_COMPILED
| "apply" (0xffffaf20)
| "object-write" (0xffffb0c8)
| "eieio-list-prin1" (0xffffb228)
| "eieio-override-prin1" (0xffffb3d8)
| 0x19a7e78 PVEC_COMPILED
| "apply" (0xffffb678)
| Hardware watchpoint 5: -location current_buffer->pt
|

to 753 and back to 49504, after this switching between 753, 49504 several times:

| Old value = 753
| New value = 49504
| 0x0000000000615b63 in temp_set_point_both (bytepos=49504, charpos=49504, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "goto-char" (0xffffc320)
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 753
| New value = 49504
| 0x0000000000615b63 in temp_set_point_both (bytepos=49504, charpos=49504, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "goto-char" (0xffffc320)
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 753
| New value = 49504
| 0x0000000000615b63 in temp_set_point_both (bytepos=49504, charpos=49504, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "goto-char" (0xffffc320)
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 753
| New value = 49504
| 0x0000000000615b63 in temp_set_point_both (bytepos=49504, charpos=49504, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "goto-char" (0xffffc320)
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 49504
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "save-excursion" (0xffffc410)
| "save-current-buffer" (0xffffc510)
| "let" (0xffffc660)
| "or" (0xffffc740)
| "and" (0xffffc820)
| "if" (0xffffc900)
| 0x3981060 Lisp type 3
| "mapc" (0xffffcb70)
| "catch" (0xffffcc60)
| "let" (0xffffcdb0)
| "let" (0xffffcf00)
| "progn" (0xffffcfe0)
| "condition-case" (0xffffd140)
| "if" (0xffffd220)
| "semanticdb-save-all-db-idle" (0xffffd3c0)
| Hardware watchpoint 5: -location current_buffer->pt

and now switching between 753 and 146/147, not going back to 49504 again:

| 
| Old value = 753
| New value = 147
| 0x0000000000615b63 in temp_set_point_both (bytepos=147, charpos=147, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff5bb0)
| "list" (0xffff5d60)
| "eval" (0xffff5ef8)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 147
| New value = 146
| 0x0000000000615b63 in temp_set_point_both (bytepos=146, charpos=146, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff5bb0)
| "list" (0xffff5d60)
| "eval" (0xffff5ef8)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 146
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 146
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff5bb0)
| "list" (0xffff5d60)
| "eval" (0xffff5ef8)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 753
| New value = 147
| 0x0000000000615b63 in temp_set_point_both (bytepos=147, charpos=147, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff56f0)
| "list" (0xffff58a0)
| "eval" (0xffff5a38)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 147
| New value = 146
| 0x0000000000615b63 in temp_set_point_both (bytepos=146, charpos=146, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff56f0)
| "list" (0xffff58a0)
| "eval" (0xffff5a38)
| "redisplay_internal (C function)" (0x0)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 146
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
| Old value = 146
| New value = 753
| 0x0000000000615b63 in temp_set_point_both (bytepos=753, charpos=753, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-stickyfunc-fetch-stickyline" (0xffff56f0)
| "list" (0xffff58a0)
| "eval" (0xffff5a38)
| "redisplay_internal (C function)" (0x0)
| 
| Program received signal SIGTSTP, Stopped (user).
| 0x00007ffff1e0852e in __pselect (nfds=17, readfds=<optimized out>, readfds@entry=0x7fffffffcb60, writefds=<optimized out>, exceptfds=<optimized out>, exceptfds@entry=0x0, timeout=<optimized out>, timeout@entry=0x7fffffffd160, sigmask=<optimized out>, sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:79
| 79	../sysdeps/unix/sysv/linux/pselect.c: No such file or directory.
| Continuing.
| Hardware watchpoint 5: -location current_buffer->pt

I stopped the debugger and continued after this a hile but it was not going
back to 49504.

With next call from timer-event-handler it switches between 753 and 1 and
147 again:

| 
| Old value = 753
| New value = 1
| 0x0000000000615b63 in temp_set_point_both (bytepos=1, charpos=1, buffer=0x385aa10) at intervals.c:1798
| 1798	  SET_BUF_PT_BOTH (buffer, charpos, bytepos);
| "semantic-c-lexer" (0xffffc2a0)
| "semantic-lex" (0xffffc478)
| "semantic-parse-region-default" (0xffffc630)
| "semantic-parse-region-c-mode" (0xffffc800)
| "semantic-parse-region" (0xffffc9d0)
| "semantic-fetch-tags" (0xffffcba0)
| "semantic-idle-scheduler-refresh-tags" (0xffffcd60)
| "semantic-idle-core-handler" (0xffffcf40)
| "semantic-idle-scheduler-function" (0xffffd1f8)
| "apply" (0xffffd1f0)
| "timer-event-handler" (0xffffd3b8)
| Hardware watchpoint 4: -location current_buffer->pt
| 
| Old value = 1
| New value = 753
| Hardware watchpoint 5: -location current_buffer->pt
| 
`----

For me the suspect function is semantic-c-lexer, which is defined via macro
define-lex:

,----
| (defmacro define-lex (name doc &rest analyzers)
|   "Create a new lexical analyzer with NAME.
| ...
|   `(defun ,name  (start end &optional depth length)
|      ,(concat doc "\nSee `semantic-lex' for more information.")
|      ;; Make sure the state of block parsing starts over.
|      (setq semantic-lex-block-streams nil)
|      ;; Allow specialty reset items.
|      (run-hook-with-args 'semantic-lex-reset-functions start end)
|      ;; Lexing state.
|      (let* (;(starttime (current-time))
| 	    (starting-position (point))
| ...
|        (with-syntax-table semantic-lex-syntax-table
|          (goto-char start)
|          (while (and (< (point) end)
|                      (or (not length)
| 			 (<= (length semantic-lex-token-stream) length)))
|            (semantic-lex-one-token ,analyzers)
| 	   (when (eq semantic-lex-end-point tmp-start)
| 	     (error ,(format "%s: endless loop at %%d, after %%S" name)
|                     tmp-start (car semantic-lex-token-stream)))
| 	   (setq tmp-start semantic-lex-end-point)
|            (goto-char semantic-lex-end-point)
| 	   ;;(when (> (semantic-elapsed-time starttime (current-time))
| 	   ;;	    semantic-lex-timeout)
| 	   ;;  (error "Timeout during lex at char %d" (point)))
| >>>>	   (semantic-throw-on-input 'lex)
| 	   (semantic-lex-debug-break (car semantic-lex-token-stream))
| 	   ))
| ...
|        ;; Return to where we started.
|        ;; Do not wrap in protective stuff so that if there is an error
|        ;; thrown, the user knows where.
|        (goto-char starting-position)
|        ;; Return the token stream
|        (nreverse semantic-lex-token-stream))))
`----

It is moving point, only wrapping a goto-char around it and it is throwing a
signal under specific circumstances.

If I see it right, then semantic-c-lexer will be called under save-excursion
from semantic-idle-core-handler whenn called via timer-event-handler:

,----
| "semantic-idle-core-handler" (0xffffcb50)
| "semantic-idle-scheduler-function" (0xffffce08)
| "apply" (0xffffce00)
| "timer-event-handler" (0xffffcfc8)
`----

but when called from semanticdb-save-all-db-idle (I think) it will be called
from semanticdb-save-db and

,----
|     (semantic-exit-on-input 'semanticdb-idle-save
|       (mapc (lambda (db)
| 	      (semantic-throw-on-input 'semanticdb-idle-save)
| 	      (semanticdb-save-db db t))
| 	    semanticdb-database-list))
`----

therefore from within semantic-exit-on-input, which is a catch. And with my
other observations I saw the catch exiting with moved point.

This seems to explains, why a save-excursion around this works for me.

I also tried a save-excursion around semantic-c-lexer and this seems to work
too.

So after all this: my opinion is that semantic-c-lexer is the problem.

@Eli: I can send you the complete log if you need it.

With kind regards,
Stefan


-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.





  parent reply	other threads:[~2016-01-06 14:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01 11:10 bug#22287: 25.1.50; Sudden jumping point in buffer Stefan-W. Hahn
2016-01-03 11:26 ` David Engster
2016-01-03 13:07   ` Stefan-W. Hahn
2016-01-03 15:47     ` David Engster
2016-01-03 20:51       ` Stefan-W. Hahn
2016-01-04 15:22         ` Eli Zaretskii
2016-01-05 15:01           ` Stefan-W. Hahn
2016-01-05 16:27             ` Eli Zaretskii
2016-01-05 19:51               ` Stefan-W. Hahn
2016-01-05 20:12                 ` Eli Zaretskii
2016-01-05 21:08                   ` Stefan-W. Hahn
2016-01-06 14:13                   ` Stefan-W. Hahn [this message]
2016-01-06 21:52                     ` David Engster
2016-02-21 16:29                       ` David Engster
2016-01-04 15:22       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160106141354.GA28490@scotty.home \
    --to=stefan.hahn@s-hahn.de \
    --cc=22287@debbugs.gnu.org \
    --cc=deng@randomsample.de \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).