zsh-workers
 help / color / mirror / code / Atom feed
* A serious bug in execution – where to debug?
@ 2019-07-30 17:00 Sebastian Gniazdowski
  2019-07-30 17:05 ` Sebastian Gniazdowski
                   ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Sebastian Gniazdowski @ 2019-07-30 17:00 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
I have a zle function that shadows the zle builtin. The bug is: the
function exits after a certain function get's called, if the arguments
are: -F {descriptor-#} _gitstatus_process_response_POWERLEVEL9K (I
didn't yet eliminate the second argument's so I'm pasting it as is).

The symptoms are:
- print before the call does output, after the call – doesn't (as
arranged as in here: http://psprint.blinkenshell.org/zle-exit-fun.png)
- the plugin's following zle -F {descriptor-#} call reports error:
--zplg-shadow-zle:zle:64: No handler installed for fd 21
meaning that the execution didn't really reach the point where an
actual builtin zle is being called by the shadowing function.

Now, what's interesting is the certain function that causes the exit
(https://github.com/zdharma/zplugin/blob/1ddc4a2c69adec7895b4acf53e3db837720663ac/zplugin.zsh#L1261-L1264).
If I remove the conditional from its third line, i.e. change the line
to:

ZPLG_REPORTS[_dtrace/_dtrace]+="$2"$'\n'

then the problem disappears. Not that this practically eliminates that
the bug report is something wrong with some other area of the code.

I find this impossible to narrow down, because e.g. doing the zle -F
call from some other, short plugin doesn't cause the problem. This
must be a lucky set of circumstances.

But I can debug it. Where to add debug printfs / breakpoints, what to
check in them?

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2019-07-31 17:57 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 17:00 A serious bug in execution – where to debug? Sebastian Gniazdowski
2019-07-30 17:05 ` Sebastian Gniazdowski
2019-07-30 17:41 ` Roman Perepelitsa
2019-07-30 17:55   ` Sebastian Gniazdowski
2019-07-30 18:12     ` Roman Perepelitsa
2019-07-30 18:16       ` Sebastian Gniazdowski
2019-07-30 18:22         ` Roman Perepelitsa
2019-07-30 18:53           ` Sebastian Gniazdowski
2019-07-30 19:23             ` Roman Perepelitsa
2019-07-30 19:34               ` Sebastian Gniazdowski
2019-07-30 19:41                 ` Roman Perepelitsa
2019-07-30 19:59                   ` Sebastian Gniazdowski
2019-07-30 20:08                     ` Roman Perepelitsa
2019-07-30 20:38                       ` Sebastian Gniazdowski
2019-07-30 18:27 ` Bart Schaefer
2019-07-30 18:46   ` Sebastian Gniazdowski
2019-07-30 21:02     ` Roman Perepelitsa
2019-07-30 21:38       ` Sebastian Gniazdowski
2019-07-30 21:45         ` Roman Perepelitsa
2019-07-30 21:54           ` Sebastian Gniazdowski
2019-07-30 22:11             ` Roman Perepelitsa
2019-07-30 22:18           ` Daniel Shahaf
2019-07-30 22:32             ` Roman Perepelitsa
2019-07-31  1:30               ` Sebastian Gniazdowski
2019-07-31  7:23                 ` Roman Perepelitsa
2019-07-31 11:41                   ` Sebastian Gniazdowski
2019-07-31 12:40                     ` Roman Perepelitsa
2019-07-31 13:10                       ` Sebastian Gniazdowski
2019-07-31 13:34                         ` Roman Perepelitsa
2019-07-31 13:40                           ` Sebastian Gniazdowski
2019-07-31 14:11                             ` Roman Perepelitsa
2019-07-31 17:56                               ` Sebastian Gniazdowski
2019-07-31  1:42               ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).