★ TouchArcade needs your help. Click here to support us on Patreon.

error msg

10-08-2008, 08:04 PM
#1
Joined: Jul 2008
Location: Boston
Posts: 1,268
error msg

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'
10-08-2008, 08:43 PM
#2
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.
10-08-2008, 08:55 PM
#3
Joined: Jul 2008
Location: Boston
Posts: 1,268
Quote:
Originally Posted by bovinedragon View Post
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.
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
10-08-2008, 09:07 PM
#4
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.

Last edited by bovinedragon; 10-08-2008 at 09:12 PM.
10-08-2008, 09:14 PM
#5
Joined: Jul 2008
Location: Boston
Posts: 1,268
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