Professional Web Applications Themes

Two Cocoa Errors I can't figure out.. - Mac Programming

When I run my shareware app, I always get these two errors errors at the very beginning, and the second one occasionally recurs. They never seem to interfere with the operation of the app on my machine, but my users have sent me crashlogs which lead me to believe that maybe they have caused errors on others machines. Without posting the full source I know its impossible to declare 100% what these mean, but I'm just hoping somebody can point me towards common mistakes, or even better a way to probe the nature of these errors a bit more...they are ...

  1. #1

    Default Two Cocoa Errors I can't figure out..

    When I run my shareware app, I always get these two errors errors at the
    very beginning, and the second one occasionally recurs. They never seem
    to interfere with the operation of the app on my machine, but my users
    have sent me crashlogs which lead me to believe that maybe they have
    caused errors on others machines.

    Without posting the full source I know its impossible to declare 100%
    what these mean, but I'm just hoping somebody can point me towards
    common mistakes, or even better a way to probe the nature of these
    errors a bit more...they are not very informative.

    ======ERRORS=======

    2004-06-21 14:06:10.352 Euro[417] *** Assertion failure in -[NSMenu
    setTitle:], Menus.subproj/NSMenu.m:353

    2004-06-21 14:06:10.368 Euro[417] *** NSTimer ignoring exception
    'NSInternalInconsistencyException' (reason 'Invalid parameter not
    satisfying: aString != nil') that raised during posting of timer with
    target 1befb90 and selector 'checkDock:'

    ======ERRORS=======

    My guess, since the two generally appear in tandem, is that NSMenu's
    assertion is for a non-nil title. Somewhere in the code this title is
    passed to an NSTimer...why a string is passed to NSTimer I can't figure
    out.

    Unfortunately, even in GDB these events dont trigger stack traces, so
    its impossible for me to tell where they originate from.

    Can anybody suggest a next step?

    --
    |\/| /| |2 |<
    mehaase(at)sas(dot)upenn(dot)edu
    Mark Guest

  2. #2

    Default Re: Two Cocoa Errors I can't figure out..

    Mark Haase wrote:
     

    Right.
     

    Not quite. The timer fires, causing checkDock: to be sent to whatever
    object is at 1befb90. At some point, the checkDock: method (or another
    method called from checkDock:) itself calls -[NSMenu setTitle:] with a
    nil string. That trips the assertion, which raises an Nception,
    which is caught by the timer to prevent the app from quitting. The
    timer doesn't know what to do with it, so it just tells you that it
    caught the exception and continues on.

    In the debugger, type
    fb -[Nception raise]
    and then when the assertion fails, you'll break into the debugger and
    you can see the stack trace, etc.
     

    break on -[Nception raise] to see where the assertion is failing.

    -Peter
    Peter Guest

  3. #3

    Default Re: Two Cocoa Errors I can't figure out..

    In article <upenn.edu>,
    Mark Haase <net> wrote:
     

    Set gdb to break on -raise and you'll be able to get a bt at the time of
    exception just fine.
    Doc Guest

  4. #4

    Default Re: Two Cocoa Errors I can't figure out..

    In article <cbfem4$qss$apple.com>,
    Peter Ammon <com> wrote:
     

    Well its the darndest thing, but I can't get the error to pop up
    anymore...thanks for the tips though, Peter. I'm sure it'll be useful in
    the future.

    --
    |\/| /| |2 |<
    mehaase(at)sas(dot)upenn(dot)edu
    Mark Guest

Similar Threads

  1. Cant figure this one out!
    By Mrcool1804 in forum Macromedia Flash Player
    Replies: 0
    Last Post: February 26th, 03:43 AM
  2. can't figure it out; help
    By Henri in forum Macromedia Flash
    Replies: 1
    Last Post: April 15th, 08:00 PM
  3. C++ in cocoa
    By Robert in forum Mac Programming
    Replies: 6
    Last Post: February 26th, 07:19 PM
  4. Objc Nubie: Errors Errors Errors
    By John in forum Mac Programming
    Replies: 8
    Last Post: February 16th, 07:30 PM
  5. Replies: 1
    Last Post: October 7th, 01:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139