error msg

Discussion in 'Public Game Developers Forum' started by mek, Oct 9, 2008.

  1. mek

    mek Well-Known Member

    okay so this makes me want to drink

    i've gone over my code three entire times, looking for a spelling error, typo or anything that would cause the app upon launch to terminate

    any ideas?

    this is the error:

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString'
     
  2. bovinedragon

    bovinedragon Well-Known Member

    Sep 20, 2008
    98
    0
    0
    NSInvalidArgumentException
    Name of an exception that occurs when you pass an invalid argument to a method, such as a nil pointer where a non-nil object is required.

    Are you sure that your cString is intialized? Try debugging and making sure that the pointer is not nil.
     
  3. mek

    mek Well-Known Member

    maybe im just tired, but where is this cString?, i did a find in project and it brought back no returns, i have no variables entitled cString

    i wish it would point to the line of code that is causing this

    when i try the debugger its just a bunch of hex code

    and thank you for your help
     
  4. bovinedragon

    bovinedragon Well-Known Member

    Sep 20, 2008
    98
    0
    0
    #4 bovinedragon, Oct 9, 2008
    Last edited: Oct 9, 2008
    A cString is just a string that is held in a char* (aka a c-style string). It is a type, not a variable name.

    It says it is throwing the exception on this call:
    [NSString stringWithUTF8String:]

    Do you use that in your code somewhere? Try searching for stringWithUTF8String in your code

    Also, it should tell you the line of code that it is crashing on, if you look at the stack trace.
     
  5. mek

    mek Well-Known Member

    dude, you are amazing

    thank you so much...

    it was an out of sequence stringWithUTF8String

    now that is is fixed, thanks to you...i should probably sleep on it -hahah
     

Share This Page