GNU bug report logs -
#22012
25.1.50; gdb broken by (json-string-format "doesn't start with `\"'!")
Previous Next
Reported by: martin rudalics <rudalics <at> gmx.at>
Date: Wed, 25 Nov 2015 17:50:02 UTC
Severity: normal
Found in version 25.1.50
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22012 in the body.
You can then email your comments to 22012 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Wed, 25 Nov 2015 17:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
martin rudalics <rudalics <at> gmx.at>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 25 Nov 2015 17:50:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Setting a breakpoint in gdb currently fails with a message like
Debugger entered--Lisp error: (json-string-format "doesn't start with `\"'!")
signal(json-string-format ("doesn't start with `\"'!"))
json-read-string()
json-read-object()
apply(json-read-object nil)
json-read()
json-read-object()
apply(json-read-object nil)
json-read()
gdb-json-read-buffer("bkpt" "script")
gdb-json-partial-output("bkpt" "script")
gdb-breakpoints-list-handler-custom()
gdb-breakpoints-list-handler()
apply(gdb-breakpoints-list-handler nil)
(save-current-buffer (set-buffer #<buffer *breakpoints of emacs.exe*>) (apply (quote gdb-breakpoints-list-handler) args))
(with-current-buffer #<buffer *breakpoints of emacs.exe*> (apply (quote gdb-breakpoints-list-handler) args))
(lambda (&rest args) (with-current-buffer #<buffer *breakpoints of emacs.exe*> (apply (quote gdb-breakpoints-list-handler) args)))()
gdb-handle-reply(21)
gdb-done-or-error("21" done "BreakpointTable={nr_rows=\"3\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x01149c82\",func=\"terminate_due_to_signal\",file=\"../../src/emacs.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\emacs.c\",line=\"371\",times=\"0\",original-location=\"terminate_due_to_signal\"},bkpt={number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"0x011819c2\",func=\"init_sys_modes\",file=\"../../src/sysdep.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\sysdep.c\",line=\"905\",times=\"0\",script={\"silen
t\",\"xgetptr globals.f_Vinitial_window_system\",\"xsymname $ptr\",\"xgetptr $symname\",\"set $tem = (struct Lisp_String *) $ptr\",\"set $tem = (char *) $tem->data\",\"if $tem[0] == 'x' && $tem[1] == '\\0'\",\"break x_error_quitter\",\"end\",\"continue\"},original-location=\"init_sys_modes\"},bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x010c13e5\",func=\"Fsplit_window_internal\",file=\"../../src/window.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\window.c\",line=\"4253\",times=\"0\",original-location=\"window.c:4253\"}]}" t)
gdb-done("21" "BreakpointTable={nr_rows=\"3\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x01149c82\",func=\"terminate_due_to_signal\",file=\"../../src/emacs.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\emacs.c\",line=\"371\",times=\"0\",original-location=\"terminate_due_to_signal\"},bkpt={number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"0x011819c2\",func=\"init_sys_modes\",file=\"../../src/sysdep.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\sysdep.c\",line=\"905\",times=\"0\",script={\"silent\",\"xgetptr
globals.f_Vinitial_window_system\",\"xsymname $ptr\",\"xgetptr $symname\",\"set $tem = (struct Lisp_String *) $ptr\",\"set $tem = (char *) $tem->data\",\"if $tem[0] == 'x' && $tem[1] == '\\0'\",\"break x_error_quitter\",\"end\",\"continue\"},original-location=\"init_sys_modes\"},bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x010c13e5\",func=\"Fsplit_window_internal\",file=\"../../src/window.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\window.c\",line=\"4253\",times=\"0\",original-location=\"window.c:4253\"}]}" t)
gdbmi-bnf-incomplete-record-result("21" (gdb-done . progressive))
#[0 "\302\300\301\242\"\207" ["21" ((gdb-done . progressive)) gdbmi-bnf-incomplete-record-result] 3]()
gdbmi-bnf-result-and-async-record-impl()
gdbmi-bnf-async-record()
gdbmi-bnf-out-of-band-record()
gdbmi-bnf-output()
gud-gdbmi-marker-filter("19^error,msg=\"No registers.\"\n(gdb) \n20^done,threads=[]\n(gdb) \n21^done,BreakpointTable={nr_rows=\"3\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x01149c82\",func=\"terminate_due_to_signal\",file=\"../../src/emacs.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\emacs.c\",line=\"371\",times=\"0\",original-location=\"terminate_due_to_signal\"},bkpt={number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"0x011819c2\",func=\"init_sys_modes\",file=\"../../src/sysdep.c\",fullname=\"c:\\\\emacs-gi
t\\\\trunk\\\\src\\\\sysdep.c\",line=\"905\",times=\"0\",script={\"silent\",\"xgetptr globals.f_Vinitial_window_system\",\"xsymname $ptr\",\"xgetptr $symname\",\"set $tem = (struct Lisp_String *) $ptr\",\"set $tem = (char *) $tem->data\",\"if $tem[0] == 'x' && $tem[1] == '\\0'\",\"break
x_error_quitter\",\"end\",\"continue\"},original-location=\"init_sys_modes\"},bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x010c13e5\",func=\"Fsplit_window_internal\",file=\"../../src/window.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\window.c\",line=\"4253\",times=\"0\",original-location=\"window.c:4253\"}]}\n(gdb) \n")
apply(gud-gdbmi-marker-filter "19^error,msg=\"No registers.\"\n(gdb) \n20^done,threads=[]\n(gdb) \n21^done,BreakpointTable={nr_rows=\"3\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x01149c82\",func=\"terminate_due_to_signal\",file=\"../../src/emacs.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\emacs.c\",line=\"371\",times=\"0\",original-location=\"terminate_due_to_signal\"},bkpt={number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"0x011819c2\",func=\"init_sys_modes\",file=\"../../src/sysdep.c\",fullname=\"c:\\\\em
acs-git\\\\trunk\\\\src\\\\sysdep.c\",line=\"905\",times=\"0\",script={\"silent\",\"xgetptr globals.f_Vinitial_window_system\",\"xsymname $ptr\",\"xgetptr $symname\",\"set $tem = (struct Lisp_String *) $ptr\",\"set $tem = (char *) $tem->data\",\"if $tem[0] == 'x' && $tem[1] == '\\0'\",\"break
x_error_quitter\",\"end\",\"continue\"},original-location=\"init_sys_modes\"},bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x010c13e5\",func=\"Fsplit_window_internal\",file=\"../../src/window.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\window.c\",line=\"4253\",times=\"0\",original-location=\"window.c:4253\"}]}\n(gdb) \n")
gud-marker-filter("19^error,msg=\"No registers.\"\n(gdb) \n20^done,threads=[]\n(gdb) \n21^done,BreakpointTable={nr_rows=\"3\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x01149c82\",func=\"terminate_due_to_signal\",file=\"../../src/emacs.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\emacs.c\",line=\"371\",times=\"0\",original-location=\"terminate_due_to_signal\"},bkpt={number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"0x011819c2\",func=\"init_sys_modes\",file=\"../../src/sysdep.c\",fullname=\"c:\\\\emacs-git\\\\t
runk\\\\src\\\\sysdep.c\",line=\"905\",times=\"0\",script={\"silent\",\"xgetptr globals.f_Vinitial_window_system\",\"xsymname $ptr\",\"xgetptr $symname\",\"set $tem = (struct Lisp_String *) $ptr\",\"set $tem = (char *) $tem->data\",\"if $tem[0] == 'x' && $tem[1] == '\\0'\",\"break
x_error_quitter\",\"end\",\"continue\"},original-location=\"init_sys_modes\"},bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x010c13e5\",func=\"Fsplit_window_internal\",file=\"../../src/window.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\window.c\",line=\"4253\",times=\"0\",original-location=\"window.c:4253\"}]}\n(gdb) \n")
gud-filter(#<process gud-emacs.exe> "19^error,msg=\"No registers.\"\n(gdb) \n20^done,threads=[]\n(gdb) \n21^done,BreakpointTable={nr_rows=\"3\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x01149c82\",func=\"terminate_due_to_signal\",file=\"../../src/emacs.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\emacs.c\",line=\"371\",times=\"0\",original-location=\"terminate_due_to_signal\"},bkpt={number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"0x011819c2\",func=\"init_sys_modes\",file=\"../../src/sysdep.c\",fullname=\"c:
\\\\emacs-git\\\\trunk\\\\src\\\\sysdep.c\",line=\"905\",times=\"0\",script={\"silent\",\"xgetptr globals.f_Vinitial_window_system\",\"xsymname $ptr\",\"xgetptr $symname\",\"set $tem = (struct Lisp_String *) $ptr\",\"set $tem = (char *) $tem->data\",\"if $tem[0] == 'x' && $tem[1] == '\\0'\",\"break
x_error_quitter\",\"end\",\"continue\"},original-location=\"init_sys_modes\"},bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x010c13e5\",func=\"Fsplit_window_internal\",file=\"../../src/window.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\window.c\",line=\"4253\",times=\"0\",original-location=\"window.c:4253\"}]}\n(gdb) \n")
In GNU Emacs 25.1.50.1 (i686-pc-mingw32)
of 2015-11-24
Repository revision: e53b310fdecd7e3f130295b85b15289046d7a430
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
Configured using:
'configure --prefix=/c/emacs-git/ CFLAGS=-O3'
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 02:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 22012 <at> debbugs.gnu.org (full text, mbox):
On 11/25/2015 07:49 PM, martin rudalics wrote:
> Setting a breakpoint in gdb currently fails with a message like
>
>
> Debugger entered--Lisp error: (json-string-format "doesn't start with
> `\"'!")
> signal(json-string-format ("doesn't start with `\"'!"))
> json-read-string()
> json-read-object()
> apply(json-read-object nil)
> json-read()
> json-read-object()
> apply(json-read-object nil)
> json-read()
Could you find out the contents of the buffer it's trying to read?
A bisect would be great too, of course. Is this a recent problem?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 08:25:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 22012 <at> debbugs.gnu.org (full text, mbox):
>> Setting a breakpoint in gdb currently fails with a message like
>>
>>
>> Debugger entered--Lisp error: (json-string-format "doesn't start with
>> `\"'!")
>> signal(json-string-format ("doesn't start with `\"'!"))
>> json-read-string()
>> json-read-object()
>> apply(json-read-object nil)
>> json-read()
>> json-read-object()
>> apply(json-read-object nil)
>> json-read()
>
> Could you find out the contents of the buffer it's trying to read?
I'm trying to debug window.c. But I have no idea if that's what
‘json-read-string’ tries to read.
> A bisect would be great too, of course. Is this a recent problem?
I've seen it yesterday for the first time. I can't reproduce it
reliably but it can hit any time, often when next stepping with gdb.
Also I wasn't able to reproduce it on Debian so far. Bisecting on
Windows is a pain here.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 10:52:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 22012 <at> debbugs.gnu.org (full text, mbox):
On 11/26/2015 10:24 AM, martin rudalics wrote:
> I'm trying to debug window.c. But I have no idea if that's what
> ‘json-read-string’ tries to read.
Ah, so the problem is likely not in json.el? I figured it was.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 13:33:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 22012 <at> debbugs.gnu.org (full text, mbox):
>> I'm trying to debug window.c. But I have no idea if that's what
>> ‘json-read-string’ tries to read.
>
> Ah, so the problem is likely not in json.el? I figured it was.
How would I know what what ‘json-read-string’ tries to read at that
moment? Am I supposed to instrument it? Maybe
(unless (char-equal (json-peek) ?\")
(signal 'json-string-format (list "doesn't start with `\"'!")))
should report the current buffer and its value of point.
Anyway, if I understand the backtrace correctly, the current buffer
should have been "*breakpoints of emacs.exe*".
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 14:27:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 22012 <at> debbugs.gnu.org (full text, mbox):
On 11/26/2015 03:31 PM, martin rudalics wrote:
> How would I know what what ‘json-read-string’ tries to read at that
> moment? Am I supposed to instrument it?
Why not? Alternatively...
> Maybe
>
> (unless (char-equal (json-peek) ?\")
> (signal 'json-string-format (list "doesn't start with `\"'!")))
...you can add a (debug) call before (signal ...). And when the debugger
hits, press `e' and evaluate (buffer-string) and (point).
Seeing the value of buffer-string might be sufficient if json-read is
being called in a wrong buffer.
> should report the current buffer and its value of point.
I wouldn't mind if it did. Though that would need to be done in all such
places.
But for the purposes of debugging, you can modify just that function's
definition to report what's required.
> Anyway, if I understand the backtrace correctly, the current buffer
> should have been "*breakpoints of emacs.exe*".
I'm not sure what that implies. Does it have JSON content?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 15:50:03 GMT)
Full text and
rfc822 format available.
Message #23 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 26 Nov 2015 09:24:30 +0100
> From: martin rudalics <rudalics <at> gmx.at>
>
> >> Setting a breakpoint in gdb currently fails with a message like
> >>
> >>
> >> Debugger entered--Lisp error: (json-string-format "doesn't start with
> >> `\"'!")
> >> signal(json-string-format ("doesn't start with `\"'!"))
> >> json-read-string()
> >> json-read-object()
> >> apply(json-read-object nil)
> >> json-read()
> >> json-read-object()
> >> apply(json-read-object nil)
> >> json-read()
> >
> > Could you find out the contents of the buffer it's trying to read?
>
> I'm trying to debug window.c. But I have no idea if that's what
> ‘json-read-string’ tries to read.
It is reading from the buffer where we insert the GDB response, you
can see that as a string in the backtrace you posted.
Martin, can you try coming up with a reproducible recipe? It's hard
to debug a problem that one cannot reproduce. (I tried to start
gdb-mi and step a few steps through the Emacs code, but never saw the
problem.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 16:01:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 26 Nov 2015 14:31:53 +0100
> From: martin rudalics <rudalics <at> gmx.at>
>
> >> I'm trying to debug window.c. But I have no idea if that's what
> >> ‘json-read-string’ tries to read.
> >
> > Ah, so the problem is likely not in json.el? I figured it was.
>
> How would I know what what ‘json-read-string’ tries to read at that
> moment?
Can you switch to that buffer and look what's at point? And while at
that, post here the full contents of that buffer?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 16:59:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 22012 <at> debbugs.gnu.org (full text, mbox):
>> How would I know what what ‘json-read-string’ tries to read at that
>> moment? Am I supposed to instrument it?
>
> Why not?
Debugging the debugger while debugging?
> Alternatively...
You mean there's none?
>> Maybe
>>
>> (unless (char-equal (json-peek) ?\")
>> (signal 'json-string-format (list "doesn't start with `\"'!")))
>
> ...you can add a (debug) call before (signal ...). And when the debugger hits, press `e' and evaluate (buffer-string) and (point).
>
> Seeing the value of buffer-string might be sufficient if json-read is being called in a wrong buffer.
But what is the use of the above signal when it doesn't tell me where to
find the source of the problem?
>> should report the current buffer and its value of point.
>
> I wouldn't mind if it did. Though that would need to be done in all such places.
Which places?
> But for the purposes of debugging, you can modify just that function's definition to report what's required.
I do so already. Now it stopped complaining. Yet another Heisenbug.
>> Anyway, if I understand the backtrace correctly, the current buffer
>> should have been "*breakpoints of emacs.exe*".
>
> I'm not sure what that implies. Does it have JSON content?
What is JSON content?
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 16:59:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> It is reading from the buffer where we insert the GDB response, you
> can see that as a string in the backtrace you posted.
You mean *breakpoints of emacs.exe*? This is the only buffer I see
mentioned in the backtrace.
> Martin, can you try coming up with a reproducible recipe?
I would like to. Yesterday I wasn't able to get around it. Since
today's morning I'm not able to reproduce it.
> It's hard
> to debug a problem that one cannot reproduce. (I tried to start
> gdb-mi and step a few steps through the Emacs code, but never saw the
> problem.)
When I manage to reproduce it, I will post the contents of the buffer.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 17:15:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 26 Nov 2015 17:58:48 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: dgutov <at> yandex.ru, 22012 <at> debbugs.gnu.org
>
> > It is reading from the buffer where we insert the GDB response, you
> > can see that as a string in the backtrace you posted.
>
> You mean *breakpoints of emacs.exe*? This is the only buffer I see
> mentioned in the backtrace.
Yes, probably.
> When I manage to reproduce it, I will post the contents of the buffer.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 17:37:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 22012 <at> debbugs.gnu.org (full text, mbox):
On 11/26/2015 06:58 PM, martin rudalics wrote:
> Debugging the debugger while debugging?
Just debugging the debugger, I'd say.
> You mean there's none?
json.el is written in Lisp, so there are many ways you can get the
needed information. All of them are relatively easy, IMHO.
> But what is the use of the above signal when it doesn't tell me where to
> find the source of the problem?
I agree that it can be improved.
> >> should report the current buffer and its value of point.
> >
> > I wouldn't mind if it did. Though that would need to be done in all
> such places.
>
> Which places?
Every place in json.el that contains "(signal 'json-", probably. We
should be consistent.
> > But for the purposes of debugging, you can modify just that
> function's definition to report what's required.
>
> I do so already. Now it stopped complaining. Yet another Heisenbug.
Too bad.
> >> Anyway, if I understand the backtrace correctly, the current buffer
> >> should have been "*breakpoints of emacs.exe*".
> >
> > I'm not sure what that implies. Does it have JSON content?
>
> What is JSON content?
String in JSON format.
Basically, the question is whether we're calling json-read in a wrong
buffer, or if the buffer is right but contains unparseable content, or
if we fail to parse valid JSON.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Thu, 26 Nov 2015 18:02:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Thu, 26 Nov 2015 19:36:38 +0200
>
> Basically, the question is whether we're calling json-read in a wrong
> buffer, or if the buffer is right but contains unparseable content, or
> if we fail to parse valid JSON.
Definitely not the first alternative. Either the 2nd or the 3rd.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Sat, 28 Nov 2015 14:14:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 22012 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Can you switch to that buffer and look what's at point? And while at
> that, post here the full contents of that buffer?
It just happened again while debugging xdisp.c. The buffer is called
*partial-output-emacs.exe* (with a leading space) it contains 2295
characters and its position of point was 2. The contents of that buffer
are hopefully in the attached file partial-output-emacs.txt (for reasons
that elude me I was not able to inline them with Thunderbird).
The contents of *backtrace* are:
Debugger entered--Lisp error: (json-string-format "doesn't start with `\"'!")
signal(json-string-format ("doesn't start with `\"'!"))
(if (char-equal (json-peek) 34) nil (message "%s ... %s" (current-buffer) (point)) (signal (quote json-string-format) (list "doesn't start with `\"'!")))
json-read-string()
json-read-object()
apply(json-read-object nil)
json-read()
gdb-json-read-buffer(nil nil)
gdb-json-partial-output()
gdb-thread-list-handler-custom()
gdb-thread-list-handler()
apply(gdb-thread-list-handler nil)
(save-current-buffer (set-buffer #<buffer *threads of emacs.exe*>) (apply (quote gdb-thread-list-handler) args))
(with-current-buffer #<buffer *threads of emacs.exe*> (apply (quote gdb-thread-list-handler) args))
(lambda (&rest args) (with-current-buffer #<buffer *threads of emacs.exe*> (apply (quote gdb-thread-list-handler) args)))()
gdb-handle-reply(57)
gdb-done-or-error("57" done "threads=[{id=\"3\",target-id=\"Thread 2608.0xa60\",frame={level=\"0\",addr=\"0x7c91eb94\",func=\"ntdll!LdrAccessResource\",args=[],from=\"C:\\\\WINDOWS\\\\system32\\\\ntdll.dll\"},state=\"stopped\"},{id=\"2\",target-id=\"Thread 2608.0xa64\",frame={level=\"0\",addr=\"0x7c91eb94\",func=\"ntdll!LdrAccessResource\",args=[],from=\"C:\\\\WINDOWS\\\\system32\\\\ntdll.dll\"},state=\"stopped\"},{id=\"1\",target-id=\"Thread 2608.0xb0c\",frame={level=\"0\",addr=\"0x0105ee62\",func=\"redisplay_internal\",args=[],file=\"../../src/xdisp.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\xdisp.c\",line=\"13512\"},state=\"stopped\"}],current-thread-id=\"1\"" t)
gdb-done("57" "threads=[{id=\"3\",target-id=\"Thread 2608.0xa60\",frame={level=\"0\",addr=\"0x7c91eb94\",func=\"ntdll!LdrAccessResource\",args=[],from=\"C:\\\\WINDOWS\\\\system32\\\\ntdll.dll\"},state=\"stopped\"},{id=\"2\",target-id=\"Thread 2608.0xa64\",frame={level=\"0\",addr=\"0x7c91eb94\",func=\"ntdll!LdrAccessResource\",args=[],from=\"C:\\\\WINDOWS\\\\system32\\\\ntdll.dll\"},state=\"stopped\"},{id=\"1\",target-id=\"Thread 2608.0xb0c\",frame={level=\"0\",addr=\"0x0105ee62\",func=\"redisplay_internal\",args=[],file=\"../../src/xdisp.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\xdisp.c\",line=\"13512\"},state=\"stopped\"}],current-thread-id=\"1\"" t)
gdbmi-bnf-incomplete-record-result("57" (gdb-done . progressive))
#[0 "\302\300\301\242\"\207" ["57" ((gdb-done . progressive)) gdbmi-bnf-incomplete-record-result] 3]()
gdbmi-bnf-result-and-async-record-impl()
gdbmi-bnf-async-record()
gdbmi-bnf-out-of-band-record()
gdbmi-bnf-output()
gud-gdbmi-marker-filter("~\"Continuing.\\n\"\n^running\n*running,thread-id=\"1\"\n(gdb) \n*running,thread-id=\"all\"\n&\"warning: frame 01b50060 (emacs <at> MACHNO) obscured\\n\"\n&\"\\n\"\n=breakpoint-modified,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0105ee62\",func=\"redisplay_internal\",file=\"../../src/xdisp.c\",fullname=\"c:\\\\\\\\emacs-git\\\\\\\\trunk\\\\\\\\src\\\\\\\\xdisp.c\",line=\"13512\",times=\"13\",original-location=\"xdisp.c:13512\"}\n~\"\\nBreakpoint \"\n~\"3, redisplay_internal () at ../../src/xdisp.c:13512\\n\"\n~\"13512\\t if ((!NILP (echo_area_buffer[0]) && !display_last_displayed_message_p)\\n\"\n*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"3\",frame={addr=\"0x0105ee62\",func=\"redisplay_internal\",args=[],file=\"../../src/xdisp.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\xdisp.c\",line=\"13512\"},thread-id=\"1\",stopped-threads=\"all\"\n(gdb) \n")
apply(gud-gdbmi-marker-filter "~\"Continuing.\\n\"\n^running\n*running,thread-id=\"1\"\n(gdb) \n*running,thread-id=\"all\"\n&\"warning: frame 01b50060 (emacs <at> MACHNO) obscured\\n\"\n&\"\\n\"\n=breakpoint-modified,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0105ee62\",func=\"redisplay_internal\",file=\"../../src/xdisp.c\",fullname=\"c:\\\\\\\\emacs-git\\\\\\\\trunk\\\\\\\\src\\\\\\\\xdisp.c\",line=\"13512\",times=\"13\",original-location=\"xdisp.c:13512\"}\n~\"\\nBreakpoint \"\n~\"3, redisplay_internal () at ../../src/xdisp.c:13512\\n\"\n~\"13512\\t if ((!NILP (echo_area_buffer[0]) && !display_last_displayed_message_p)\\n\"\n*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"3\",frame={addr=\"0x0105ee62\",func=\"redisplay_internal\",args=[],file=\"../../src/xdisp.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\xdisp.c\",line=\"13512\"},thread-id=\"1\",stopped-threads=\"all\"\n(gdb) \n")
gud-marker-filter("~\"Continuing.\\n\"\n^running\n*running,thread-id=\"1\"\n(gdb) \n*running,thread-id=\"all\"\n&\"warning: frame 01b50060 (emacs <at> MACHNO) obscured\\n\"\n&\"\\n\"\n=breakpoint-modified,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0105ee62\",func=\"redisplay_internal\",file=\"../../src/xdisp.c\",fullname=\"c:\\\\\\\\emacs-git\\\\\\\\trunk\\\\\\\\src\\\\\\\\xdisp.c\",line=\"13512\",times=\"13\",original-location=\"xdisp.c:13512\"}\n~\"\\nBreakpoint \"\n~\"3, redisplay_internal () at ../../src/xdisp.c:13512\\n\"\n~\"13512\\t if ((!NILP (echo_area_buffer[0]) && !display_last_displayed_message_p)\\n\"\n*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"3\",frame={addr=\"0x0105ee62\",func=\"redisplay_internal\",args=[],file=\"../../src/xdisp.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\xdisp.c\",line=\"13512\"},thread-id=\"1\",stopped-threads=\"all\"\n(gdb) \n")
gud-filter(#<process gud-emacs.exe> "~\"Continuing.\\n\"\n^running\n*running,thread-id=\"1\"\n(gdb) \n*running,thread-id=\"all\"\n&\"warning: frame 01b50060 (emacs <at> MACHNO) obscured\\n\"\n&\"\\n\"\n=breakpoint-modified,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0105ee62\",func=\"redisplay_internal\",file=\"../../src/xdisp.c\",fullname=\"c:\\\\\\\\emacs-git\\\\\\\\trunk\\\\\\\\src\\\\\\\\xdisp.c\",line=\"13512\",times=\"13\",original-location=\"xdisp.c:13512\"}\n~\"\\nBreakpoint \"\n~\"3, redisplay_internal () at ../../src/xdisp.c:13512\\n\"\n~\"13512\\t if ((!NILP (echo_area_buffer[0]) && !display_last_displayed_message_p)\\n\"\n*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"3\",frame={addr=\"0x0105ee62\",func=\"redisplay_internal\",args=[],file=\"../../src/xdisp.c\",fullname=\"c:\\\\emacs-git\\\\trunk\\\\src\\\\xdisp.c\",line=\"13512\"},thread-id=\"1\",stopped-threads=\"all\"\n(gdb) \n")
martin
[partial-output-emacs.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Sat, 28 Nov 2015 14:36:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 28 Nov 2015 15:13:14 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: dgutov <at> yandex.ru, 22012 <at> debbugs.gnu.org
>
> > Can you switch to that buffer and look what's at point? And while at
> > that, post here the full contents of that buffer?
>
> It just happened again while debugging xdisp.c. The buffer is called
> *partial-output-emacs.exe* (with a leading space) it contains 2295
> characters and its position of point was 2. The contents of that buffer
> are hopefully in the attached file partial-output-emacs.txt (for reasons
> that elude me I was not able to inline them with Thunderbird).
There are null bytes after `{"width":"4","alignment":"-1",'. So it's
a small wonder that json.el chokes. IOW, this is not a problem with
either json.el not gdb-mi.el, but a much more fundamental problem with
low-level Emacs functions that insert text into a buffer.
When did you last update from the emacs-25 branch?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Sat, 28 Nov 2015 15:50:04 GMT)
Full text and
rfc822 format available.
Message #50 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> There are null bytes after `{"width":"4","alignment":"-1",'. So it's
> a small wonder that json.el chokes.
I see. Thunderbird choked as well, but I did not investigate.
> IOW, this is not a problem with
> either json.el not gdb-mi.el, but a much more fundamental problem with
> low-level Emacs functions that insert text into a buffer.
Maybe related to the loaddefs.el case. That one stroke again here a few
days ago on my Debian machine.
> When did you last update from the emacs-25 branch?
This happend on my patched version of master/trunk. So if anything we
could conclude that we may have been injecting null bytes already before
cutting the release branch.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Sat, 28 Nov 2015 16:35:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 28 Nov 2015 16:48:29 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: dgutov <at> yandex.ru, 22012 <at> debbugs.gnu.org
>
> Maybe related to the loaddefs.el case. That one stroke again here a few
> days ago on my Debian machine.
Yes. But I haven't seen it for the last few days.
> > When did you last update from the emacs-25 branch?
>
> This happend on my patched version of master/trunk. So if anything we
> could conclude that we may have been injecting null bytes already before
> cutting the release branch.
I suspect the undo changes, and the fact that they caused running Lisp
and could trigger GC in the middle of fiddling with the buffer's gap.
They were committed to master before the branch was cut. That's why I
asked about your update: that hole was plugged 2 days ago on the
emacs-25 branch.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Mon, 30 Nov 2015 13:41:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> I suspect the undo changes, and the fact that they caused running Lisp
> and could trigger GC in the middle of fiddling with the buffer's gap.
> They were committed to master before the branch was cut. That's why I
> asked about your update: that hole was plugged 2 days ago on the
> emacs-25 branch.
This also means that some bug reports we got over the past weeks are
unreliable. And we might get more of them for master/trunk if we don't
merge the changes back soon.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22012
; Package
emacs
.
(Mon, 30 Nov 2015 15:58:01 GMT)
Full text and
rfc822 format available.
Message #59 received at 22012 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 30 Nov 2015 14:40:36 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: dgutov <at> yandex.ru, 22012 <at> debbugs.gnu.org
>
> > I suspect the undo changes, and the fact that they caused running Lisp
> > and could trigger GC in the middle of fiddling with the buffer's gap.
> > They were committed to master before the branch was cut. That's why I
> > asked about your update: that hole was plugged 2 days ago on the
> > emacs-25 branch.
>
> This also means that some bug reports we got over the past weeks are
> unreliable. And we might get more of them for master/trunk if we don't
> merge the changes back soon.
Assuming my suspicion is right, yes.
Reply sent
to
martin rudalics <rudalics <at> gmx.at>
:
You have taken responsibility.
(Tue, 13 Feb 2018 10:24:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
martin rudalics <rudalics <at> gmx.at>
:
bug acknowledged by developer.
(Tue, 13 Feb 2018 10:24:02 GMT)
Full text and
rfc822 format available.
Message #64 received at 22012-close <at> debbugs.gnu.org (full text, mbox):
> When I manage to reproduce it, I will post the contents of the buffer.
Apparently I didn't manage to do that in the past two years so I'm
closing this bug.
Thanks to all involved, martin
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 13 Mar 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 105 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.