Error (1000) creating CGSWindow

  • Hi everyone,
    I have a fairly complex Cocoa app with lots of UI elements on the
    screen at once, most of them custom subclasses.  When I let it run
    for a while, I get the exception

      Error (1000) creating CGSWindow

    All rendering/execution halts after this exception occurs, since its
    happening in the runloop.  It seems to happen when I update UI
    elements either in a timer, or when a value changes, detected by key
    value observing.  Does anyone have any idea what generally causes
    this error, or any ideas on how to prevent this?  Thanks.
  • On Nov 1, 2007, at 10:13 AM, Dave Benvenuti wrote:

    > Hi everyone,
    > I have a fairly complex Cocoa app with lots of UI elements on the
    > screen at once, most of them custom subclasses.  When I let it run
    > for a while, I get the exception
    >
    > Error (1000) creating CGSWindow
    >
    > All rendering/execution halts after this exception occurs, since
    > its happening in the runloop.  It seems to happen when I update UI
    > elements either in a timer, or when a value changes, detected by key
    > value observing.  Does anyone have any idea what generally causes
    > this error, or any ideas on how to prevent this?  Thanks.

    This indicates a general failure to create the window. We'll need more
    information to determine what might be going wrong, but even then it
    may be difficult on the list. If you really need an answer to this I
    would recommend filing a DTS incident (e-mail <dts...>)
    --
    David Duncan
    Apple DTS Quartz and Printing
    <david.duncan...>
  • Another thing that might help - I'm using eggplant, which is a VNC-
    based automation tool, which runs on a remote machine and basically
    runs scripts which interact with the UI.  I noticed the Apple VNC
    Server process was pretty pegged, along with my app.

    On Nov 1, 2007, at 1:29 PM, David Duncan wrote:

    > On Nov 1, 2007, at 10:13 AM, Dave Benvenuti wrote:
    >
    >> Hi everyone,
    >> I have a fairly complex Cocoa app with lots of UI elements on the
    >> screen at once, most of them custom subclasses.  When I let it run
    >> for a while, I get the exception
    >>
    >> Error (1000) creating CGSWindow
    >>
    >> All rendering/execution halts after this exception occurs, since
    >> its happening in the runloop.  It seems to happen when I update UI
    >> elements either in a timer, or when a value changes, detected by
    >> key value observing.  Does anyone have any idea what generally
    >> causes this error, or any ideas on how to prevent this?  Thanks.
    >
    > This indicates a general failure to create the window. We'll need
    > more information to determine what might be going wrong, but even
    > then it may be difficult on the list. If you really need an answer
    > to this I would recommend filing a DTS incident (e-mail <dts...>)
    > --
    > David Duncan
    > Apple DTS Quartz and Printing
    > <david.duncan...>
    >
    >
  • On Nov 1, 2007, at 10:32 AM, Dave Benvenuti wrote:

    > Another thing that might help - I'm using eggplant, which is a VNC-
    > based automation tool, which runs on a remote machine and basically
    > runs scripts which interact with the UI.  I noticed the Apple VNC
    > Server process was pretty pegged, along with my app.

    I don't suppose something in these interactions is creating a larger
    number of windows? Typically these types of failures are due to just
    having too many windows around. You might want to check the window
    listing from Quartz Debug for your application to see how many windows
    you have created.
    --
    David Duncan
    Apple DTS Quartz and Printing
    <david.duncan...>
  • Am 01.11.2007 um 21:00 schrieb David Duncan:
    > On Nov 1, 2007, at 10:32 AM, Dave Benvenuti wrote:
    >> Another thing that might help - I'm using eggplant, which is a VNC-
    >> based automation tool, which runs on a remote machine and basically
    >> runs scripts which interact with the UI.  I noticed the Apple VNC
    >> Server process was pretty pegged, along with my app.
    >
    > I don't suppose something in these interactions is creating a larger
    > number of windows? Typically these types of failures are due to just
    > having too many windows around. You might want to check the window
    > listing from Quartz Debug for your application to see how many
    > windows you have created.

      I had such an error in two cases, IIRC:

    1) I had an accidental endless recursion that always caused one window
    to be created, and then accidentally triggered the same code again
    during set-up of this window.

    2) I was doing some GUI thing from a thread other than the main
    thread, which royally confused AppKit.

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today