Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Crash with virtualenvwrapper_lazy.sh
- X-seq: zsh-workers 33060
- From: Daniel Hahler <dhahler@xxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: Crash with virtualenvwrapper_lazy.sh
- Date: Wed, 27 Aug 2014 22:07:43 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=WAC6Nwi+m4Q4gvJfOk+icUHOsLxjU1htE2mwO5ZKWjk=; b=MRqqOW09v4r8sZHAj+iMkX7YVJeLkQeDhzzRIuuwUc/kAisu+dOz+HO+gHygnwEP53 wNqtm9teh9PN6pwgzps7SmV0/CkHEkj7CFCOZ+6L1Cu8KqOUARwiH75Wq70UCwvP0/pq F9LOPZERjpXnwD9D8UBP7ZN1lECB2EERls96ZsNIfsfILoZMF+OVOlDExCDpe0fF8H4c /aSIf52Y1o1UD4l+i34ksNbmI2rc/RWoU4cnxV7Mp6AkFPSCKl35KvWIHSphJWSiSPCg zUvUM5K8akzX+G9SyqWGWeAw8QofexparFBXK24Au/f702FCebrF7IJ9NcsY+Ir2VUIf xhLg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I have noticed a strange crash during completion, when using virtualenvwrapper's [1] lazy setup.
It does not happen when running zsh inside of zsh (SHLVL=2), or when running it inside of gdb, which makes it hard to debug/trace.
It also does not happen with ~/.zshrc moved away.
TEST CASE:
% source virtualenvwrapper_lazy.sh
This will setup:
compctl -K virtualenvwrapper_load workon
% which virtualenvwrapper_load
virtualenvwrapper_load () {
if [ -z $VIRTUALENVWRAPPER_LAZY_LOADED ]
then
source "$VIRTUALENVWRAPPER_SCRIPT"
VIRTUALENVWRAPPER_LAZY_LOADED=1
fi
}
When using TAB after "workon" then, zsh will crash.
I could track it down to the function `mkvirtualenv`, where commenting parts of the function body won't crash zsh.
I could not pin-point it to a specific line, but e.g. `workon "$envname"` is involved.
This also happens when commenting the `virtualenvwrapper_initialize` function, and therefore $VIRTUALENVWRAPPER_SCRIPT (virtualenvwrapper.sh) gets only parsed/sourced.
The expected behavior would be that zsh won't crash, and another pressing of TAB is required to get the completions (this is expected, because sourcing virtualenvwrapper.sh will setup the correct/final completion for "workon").
This is a problem that has been confirmed multiple times (e.g. in https://github.com/robbyrussell/oh-my-zsh/issues/2355), which makes it likely that some oh-my-zsh setting is involved.
I have tested it with the latest version of Zsh (Git master).
Please let me know if I can provide more information.
Also, any help with debugging this would be appreciated, of course.
virtualenvwrapper source files:
- virtualenvwrapper_lazy.sh: https://bitbucket.org/dhellmann/virtualenvwrapper/raw/866ef2e9992dbd8df1996fb9e296d8a7ad2cf08c/virtualenvwrapper_lazy.sh
- virtualenvwrapper.sh: https://bitbucket.org/dhellmann/virtualenvwrapper/raw/866ef2e9992dbd8df1996fb9e296d8a7ad2cf08c/virtualenvwrapper.sh
1: https://bitbucket.org/dhellmann/virtualenvwrapper
Thanks,
Daniel.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author