From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9122 invoked by alias); 27 Aug 2014 20:07:58 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33060 Received: (qmail 27547 invoked from network); 27 Aug 2014 20:07:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 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== X-Received: by 10.180.210.231 with SMTP id mx7mr312303wic.42.1409170066247; Wed, 27 Aug 2014 13:07:46 -0700 (PDT) From: Daniel Hahler X-Google-Original-From: Daniel Hahler Message-ID: <53FE3A8F.6000905@thequod.de> Date: Wed, 27 Aug 2014 22:07:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Zsh Hackers' List Subject: Crash with virtualenvwrapper_lazy.sh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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.