Copy/paste stop working, drag also, console says CoreDragCreate error: -4960

  • Just encountered the strangest error and want to put it on the list.
    Plan to file a bug report about it, although I can't reproduce.

    Copy/paste simply stopped working in my application. It continued to
    work everywhere else. Relaunching my application did not solve the
    problem. Drag and drop also stopped working. Copy/paste returned no
    error to the console but dragging produced a "CoreDragCreate error:
    -4960"

    After some extensive research on Google and the List archives, I was
    unable to find a solution that did not require a reboot. One
    potential issue was launching the app from the terminal during an ssh
    session. I'm definitely not doing that. Another google result
    suggested problems with launch services.

    I was able to do some debugging before restarting my application. It
    seems that calling [NSPasteboard generalPasteboard] returns nil. It's
    like my application does not have access to the pasteboard services.

    Restarting solves the problem. On the one hand, I want to offer this
    up to Fluke, Chance's ugly and less appreciated stepbrother. Reboot
    and you're good to go. On the other hand, I have a single user who is
    reporting this as a consistent problem. She reboots and a few minutes
    later my app loses pasteboard functionality. Other applications on
    the system don't seem to be affected, save one which I won't mention.

    Any thoughts?

    -Phil
  • It sounds like the pasteboard server on the machine has crashed or
    otherwise gone away.
    Your user with consistent problems—are they perturbing the pasteboard
    in any way? (Running any custom copy-paste haxies? :)  ) Does regular
    copy-paste work for them in other apps like TextEdit?

    On Mar 20, 2007, at 4:40 PM, Philip Dow wrote:

    > Just encountered the strangest error and want to put it on the
    > list. Plan to file a bug report about it, although I can't reproduce.
    >
    > Copy/paste simply stopped working in my application. It continued
    > to work everywhere else. Relaunching my application did not solve
    > the problem. Drag and drop also stopped working. Copy/paste
    > returned no error to the console but dragging produced a
    > "CoreDragCreate error: -4960"
    >
    > After some extensive research on Google and the List archives, I
    > was unable to find a solution that did not require a reboot. One
    > potential issue was launching the app from the terminal during an
    > ssh session. I'm definitely not doing that. Another google result
    > suggested problems with launch services.
    >
    > I was able to do some debugging before restarting my application.
    > It seems that calling [NSPasteboard generalPasteboard] returns nil.
    > It's like my application does not have access to the pasteboard
    > services.
    >
    > Restarting solves the problem. On the one hand, I want to offer
    > this up to Fluke, Chance's ugly and less appreciated stepbrother.
    > Reboot and you're good to go. On the other hand, I have a single
    > user who is reporting this as a consistent problem. She reboots and
    > a few minutes later my app loses pasteboard functionality. Other
    > applications on the system don't seem to be affected, save one
    > which I won't mention.
    >
    > Any thoughts?
    >
    > -Phil
  • > Your user with consistent problems—are they perturbing the
    > pasteboard in any way? (Running any custom copy-paste haxies? :)  )
    > Does regular copy-paste work for them in other apps like TextEdit?

    It does work in other applications like TextEdit, yes. It also did on
    my machine. It's like the pasteboard server is only unavailable to my
    application, no matter if relaunched.

    I've asked this particular user about plugins and what not, and she
    says no. She's done development herself, so I trust the answer, but
    I'll certainly double check.

    -Phil

    On Mar 21, 2007, at 12:48 AM, John Stiles wrote:

    > It sounds like the pasteboard server on the machine has crashed or
    > otherwise gone away.
    > Your user with consistent problems—are they perturbing the
    > pasteboard in any way? (Running any custom copy-paste haxies? :)  )
    > Does regular copy-paste work for them in other apps like TextEdit?
    >
    >
    > On Mar 20, 2007, at 4:40 PM, Philip Dow wrote:
    >
    >> Just encountered the strangest error and want to put it on the
    >> list. Plan to file a bug report about it, although I can't reproduce.
    >>
    >> Copy/paste simply stopped working in my application. It continued
    >> to work everywhere else. Relaunching my application did not solve
    >> the problem. Drag and drop also stopped working. Copy/paste
    >> returned no error to the console but dragging produced a
    >> "CoreDragCreate error: -4960"
    >>
    >> After some extensive research on Google and the List archives, I
    >> was unable to find a solution that did not require a reboot. One
    >> potential issue was launching the app from the terminal during an
    >> ssh session. I'm definitely not doing that. Another google result
    >> suggested problems with launch services.
    >>
    >> I was able to do some debugging before restarting my application.
    >> It seems that calling [NSPasteboard generalPasteboard] returns
    >> nil. It's like my application does not have access to the
    >> pasteboard services.
    >>
    >> Restarting solves the problem. On the one hand, I want to offer
    >> this up to Fluke, Chance's ugly and less appreciated stepbrother.
    >> Reboot and you're good to go. On the other hand, I have a single
    >> user who is reporting this as a consistent problem. She reboots
    >> and a few minutes later my app loses pasteboard functionality.
    >> Other applications on the system don't seem to be affected, save
    >> one which I won't mention.
    >>
    >> Any thoughts?
    >>
    >> -Phil
    >
    >