Loading ...
Sorry, an error occurred while loading the content.

Two green diamonds in the dock

Expand Messages
  • dv1445@wayne.edu
    I don t know if this is a bug, or even if it is, whether it s a bug in MacVim, but it is of interest. To reproduce: 0. Have MacVim as an open app (there
    Message 1 of 8 , Jul 19 10:09 AM
    • 0 Attachment
      I don't know if this is a bug, or even if it is, whether it's a bug in MacVim,
      but it is of interest. To reproduce:

      0. Have MacVim as an open app (there needn't be a window actually open).

      1. Pick one of the following:

      (1a) Set mutt up to use the Vim inside MacVim, i.e., MacVim-but-in-the-console,
      as $editor for mail composition. I do 'set
      editor=/Applications/MacVim.app/Contents/Macos/Vim'. Start mutt in
      Terminal.app. Begin composing a message, which takes you to
      MacVim-in-the-console.

      (1b) In the terminal, do "export
      PAGER=/Applications/MacVim.app/Contents/MacOS/Vim -". Note the dash at the
      very end. Then do "man ls".

      2. Whichever you chose, you'll be in MacVim-in-the-Console, either starting to
      compose a message or looking at the (mangled) man page for ls.

      3. Do ":gui"

      Expected behavior: the MacVim gui launches, and the Terminal waits until
      you're done with the Gui.

      Acutal behavior: Like the expected behavior, except for two things.
      First, a second instance of MacVim is activated, so that the Dock has two green
      diamond icons in it---the message you are now composing (or the manpage you are
      looking at) is within this second instance of MacVim. Second, the Terminal
      emits the following error message of some sort:

      2012-07-19 11:21:53.432 MacVim[66493:10b] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x3803, name = 'org.vim.MacVim.ServiceProvider'
      See /usr/include/servers/bootstrap_defs.h for the error codes.

      (In case the mail system botches that, it's two logical lines, with "See
      /usr..." being the start of the second one.)

      A while back I reported that I could this this behavior by following
      those steps, but only intermittently. Now it does it every single time.

      Observation: If you call MacVim-in-console from inside a bash or python script, everything works as expected.

      -gmn

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • björn
      ... It sounds to me like you have two versions of MacVim.app on your hard drive. This causes problems because Mac OS X happily opens any one of them at random
      Message 2 of 8 , Jul 23 11:29 AM
      • 0 Attachment
        On Thu, Jul 19, 2012 at 7:09 PM, wrote:
        > I don't know if this is a bug, or even if it is, whether it's a bug in MacVim,
        > but it is of interest. To reproduce:
        >
        > Expected behavior: the MacVim gui launches, and the Terminal waits until
        > you're done with the Gui.
        >
        > Acutal behavior: Like the expected behavior, except for two things.
        > First, a second instance of MacVim is activated, so that the Dock has two green
        > diamond icons in it---the message you are now composing (or the manpage you are
        > looking at) is within this second instance of MacVim.

        It sounds to me like you have two versions of MacVim.app on your hard
        drive. This causes problems because Mac OS X happily opens any one of
        them at random (even if they are buried deep inside a build
        directory).

        Search for "MacVim.app" and delete all app bundles except for the one
        that you keep in /Applications.

        Björn

        --
        You received this message from the "vim_mac" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • dv1445@wayne.edu
        ... No, sorry, I don t have more than one version on my Mac. Indeed, this is not the case on any of my Macs, which run 10.4, 10.5, and 10.7. I *did*, on one
        Message 3 of 8 , Jul 23 12:50 PM
        • 0 Attachment
          björn, on 07/23/12 at 20:29:15 +0200, wrote:
          > On Thu, Jul 19, 2012 at 7:09 PM, wrote:
          > > I don't know if this is a bug, or even if it is, whether it's a bug
          > > in MacVim, but it is of interest. To reproduce:
          > >
          > > Expected behavior: the MacVim gui launches, and the Terminal waits
          > > until you're done with the Gui.
          > >
          > > Acutal behavior: Like the expected behavior, except for two things.
          > > First, a second instance of MacVim is activated, so that the Dock
          > > has two green diamond icons in it---the message you are now
          > > composing (or the manpage you are looking at) is within this second
          > > instance of MacVim.
          >
          > It sounds to me like you have two versions of MacVim.app on your hard
          > drive. This causes problems because Mac OS X happily opens any one of
          > them at random (even if they are buried deep inside a build
          > directory).

          No, sorry, I don't have more than one version on my Mac. Indeed, this
          is not the case on any of my Macs, which run 10.4, 10.5, and 10.7.

          I *did*, on one of these Macs, have a symbolic link to MacVim.app
          somewhere. But I deleted it and restarted the machine, and still I get
          the same error message and two green diamonds.

          -gmn

          --
          You received this message from the "vim_mac" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Ben Schmidt
          ... Despite your detailed instructions, I can t reproduce this. Since your error is permission denied , though, my first step would be to check the ownership
          Message 4 of 8 , Jul 30 3:05 AM
          • 0 Attachment
            On 20/07/12 3:09 AM, dv1445@... wrote:
            > I don't know if this is a bug, or even if it is, whether it's a bug in MacVim,
            > but it is of interest. To reproduce:
            >
            > 0. Have MacVim as an open app (there needn't be a window actually open).
            >
            > 1. Pick one of the following:
            >
            > (1a) Set mutt up to use the Vim inside MacVim, i.e., MacVim-but-in-the-console,
            > as $editor for mail composition. I do 'set
            > editor=/Applications/MacVim.app/Contents/Macos/Vim'. Start mutt in
            > Terminal.app. Begin composing a message, which takes you to
            > MacVim-in-the-console.
            >
            > (1b) In the terminal, do "export
            > PAGER=/Applications/MacVim.app/Contents/MacOS/Vim -". Note the dash at the
            > very end. Then do "man ls".
            >
            > 2. Whichever you chose, you'll be in MacVim-in-the-Console, either starting to
            > compose a message or looking at the (mangled) man page for ls.
            >
            > 3. Do ":gui"
            >
            > Expected behavior: the MacVim gui launches, and the Terminal waits until
            > you're done with the Gui.
            >
            > Acutal behavior: Like the expected behavior, except for two things.
            > First, a second instance of MacVim is activated, so that the Dock has two green
            > diamond icons in it---the message you are now composing (or the manpage you are
            > looking at) is within this second instance of MacVim. Second, the Terminal
            > emits the following error message of some sort:
            >
            > 2012-07-19 11:21:53.432 MacVim[66493:10b] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x3803, name = 'org.vim.MacVim.ServiceProvider'
            > See /usr/include/servers/bootstrap_defs.h for the error codes.

            Despite your detailed instructions, I can't reproduce this.

            Since your error is 'permission denied', though, my first step would be
            to check the ownership and permissions of MacVim.app and its contents.
            And then maybe try 'repair permissions' in Disk Utility in case it's a
            system file that has had permissionsed messed up by something.

            On my system, MacVim.app and its contents are owned by ben:admin (ben is
            the user I am usually logged in as), and permissions are 644 or 755 as
            appropriate.

            Ben.



            --
            You received this message from the "vim_mac" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • björn
            ... This is not a file permission issue. MacVim registers a named bootstrap server so that Vim processes can connect to the GUI. The above error message is
            Message 5 of 8 , Jul 30 10:12 AM
            • 0 Attachment
              On Mon, Jul 30, 2012 at 12:05 PM, Ben Schmidt wrote:
              >>
              >> 2012-07-19 11:21:53.432 MacVim[66493:10b] *** CFMessagePort:
              >> bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port =
              >> 0x3803, name = 'org.vim.MacVim.ServiceProvider'
              >> See /usr/include/servers/bootstrap_defs.h for the error codes.
              >
              > Since your error is 'permission denied', though, my first step would be
              > to check the ownership and permissions of MacVim.app and its contents.
              > And then maybe try 'repair permissions' in Disk Utility in case it's a
              > system file that has had permissionsed messed up by something.

              This is not a file permission issue.

              MacVim registers a named bootstrap server so that Vim processes can
              connect to the GUI. The above error message is saying that the name
              that MacVim is trying to register is already taken and so it fails.
              This means two MacVim processes are trying to run at the same time
              which is why I previously suspected that the OP had two versions of
              MacVim.app on their computer.

              I don't know what would cause Mac OS X to try and start two instances
              of the same app. My best guess is that this is a timing-related issue
              since it is so hard to reproduce (by which I mean that I have never
              been able to reproduce it).

              Björn

              --
              You received this message from the "vim_mac" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Kyle Lippincott
              Is there a mac lsof equivalent that might point out what file(s) are open by which processes, and we might be able to figure out what s going on or different
              Message 6 of 8 , Jul 30 11:08 AM
              • 0 Attachment
                Is there a mac 'lsof' equivalent that might point out what file(s) are open by which processes, and we might be able to figure out what's going on or different between the two processes?  (sitting at a linux box right now, can't check :))

                On Mon, Jul 30, 2012 at 10:12 AM, björn <bjorn.winckler@...> wrote:
                On Mon, Jul 30, 2012 at 12:05 PM, Ben Schmidt wrote:
                >>
                >> 2012-07-19 11:21:53.432 MacVim[66493:10b] *** CFMessagePort:
                >> bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port =
                >> 0x3803, name = 'org.vim.MacVim.ServiceProvider'
                >> See /usr/include/servers/bootstrap_defs.h for the error codes.
                >
                > Since your error is 'permission denied', though, my first step would be
                > to check the ownership and permissions of MacVim.app and its contents.
                > And then maybe try 'repair permissions' in Disk Utility in case it's a
                > system file that has had permissionsed messed up by something.

                This is not a file permission issue.

                MacVim registers a named bootstrap server so that Vim processes can
                connect to the GUI.  The above error message is saying that the name
                that MacVim is trying to register is already taken and so it fails.
                This means two MacVim processes are trying to run at the same time
                which is why I previously suspected that the OP had two versions of
                MacVim.app on their computer.

                I don't know what would cause Mac OS X to try and start two instances
                of the same app.  My best guess is that this is a timing-related issue
                since it is so hard to reproduce (by which I mean that I have never
                been able to reproduce it).

                Björn

                --
                You received this message from the "vim_mac" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                --
                You received this message from the "vim_mac" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • Douglas Drumond
                2012/7/30 Kyle Lippincott ... open by which processes, and we might be able to figure out what s going on or different between the two
                Message 7 of 8 , Jul 30 11:29 AM
                • 0 Attachment
                  2012/7/30 Kyle Lippincott <spectral@...>
                  >
                  > Is there a mac 'lsof' equivalent that might point out what file(s) are open by which processes, and we might be able to figure out what's going on or different between the two processes?  (sitting at a linux box right now, can't check :))
                  >

                  Yes, it's lsof on Mac, too.


                  --
                  Douglas Drumond
                  http://about.me/douglasdrumond

                  --
                  You received this message from the "vim_mac" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                • Ben Schmidt
                  ... I was wondering whether, though, perhaps the server inherited its owner from a file or something like that. IIRC, I ve had strange IAC problems in the past
                  Message 8 of 8 , Jul 30 9:04 PM
                  • 0 Attachment
                    On 31/07/12 3:12 AM, björn wrote:
                    > On Mon, Jul 30, 2012 at 12:05 PM, Ben Schmidt wrote:
                    >>>
                    >>> 2012-07-19 11:21:53.432 MacVim[66493:10b] *** CFMessagePort:
                    >>> bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port =
                    >>> 0x3803, name = 'org.vim.MacVim.ServiceProvider'
                    >>> See /usr/include/servers/bootstrap_defs.h for the error codes.
                    >>
                    >> Since your error is 'permission denied', though, my first step would be
                    >> to check the ownership and permissions of MacVim.app and its contents.
                    >> And then maybe try 'repair permissions' in Disk Utility in case it's a
                    >> system file that has had permissionsed messed up by something.
                    >
                    > This is not a file permission issue.

                    I was wondering whether, though, perhaps the server inherited its owner
                    from a file or something like that. IIRC, I've had strange IAC problems
                    in the past that were somehow inexplicably related to file permissions.
                    I'm not familiar with this mechanism, though, so it really was a wild
                    guess. It's something I'd try 'just in case', not really believing it
                    would help.

                    > MacVim registers a named bootstrap server so that Vim processes can
                    > connect to the GUI. The above error message is saying that the name
                    > that MacVim is trying to register is already taken and so it fails.
                    > This means two MacVim processes are trying to run at the same time
                    > which is why I previously suspected that the OP had two versions of
                    > MacVim.app on their computer.

                    Makes sense. It's a shame "permission denied" is such a broad message.

                    > I don't know what would cause Mac OS X to try and start two instances
                    > of the same app.

                    IIRC, it can be done with a bundle flag, but surely MacVim's bundle
                    doesn't have that flag set, nor does mvim call for any special kind of
                    treatment.

                    > My best guess is that this is a timing-related issue since it is so
                    > hard to reproduce (by which I mean that I have never been able to
                    > reproduce it).

                    It's pretty unfathomable what could be so timing-critical, though, isn't
                    it? It's not like the two instances are starting at even roughly the
                    same time.

                    I wonder whether it's something in the OP's environment that's making
                    something work differently in the Terminal to the GUI. Does that sound
                    plausible at all? It would be interesting to know how the original
                    MacVim instance was started: whether via mvim from the same commandline
                    environment, or whether from the GUI, and whether it makes a difference
                    or not to the later behaviour.

                    Ben.



                    --
                    You received this message from the "vim_mac" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  Your message has been successfully submitted and would be delivered to recipients shortly.