Resolved 'NSException' crash help needed

Discussion in 'iPhone/iPad Programming' started by nickculbertson, Apr 12, 2011.

  1. nickculbertson, Apr 12, 2011
    Last edited: Apr 12, 2011

    macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #1
    Hello,
    The app I am working on is crashing for the following reason...

    Code:
    2011-04-12 14:51:04.917 Ukulele[5271:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
    *** Call stack at first throw:
    (
    	0   CoreFoundation                      0x019b0be9 __exceptionPreprocess + 185
    	1   libobjc.A.dylib                     0x01b055c2 objc_exception_throw + 47
    	2   CoreFoundation                      0x01969628 +[NSException raise:format:arguments:] + 136
    	3   CoreFoundation                      0x0196959a +[NSException raise:format:] + 58
    	4   Foundation                          0x005d2b12 -[NSURL(NSURL) initFileURLWithPath:] + 90
    	5   Foundation                          0x005d2aa0 +[NSURL(NSURL) fileURLWithPath:] + 72
    	6   Ukulele                             0x0007089c -[FirstView touchesMoved:withEvent:] + 30360
    	7   UIKit                               0x009022b8 forwardMethod2 + 92
    	8   UIKit                               0x0085b07b -[UIWindow _sendTouchesForEvent:] + 481
    	9   UIKit                               0x0083c37a -[UIApplication sendEvent:] + 447
    	10  UIKit                               0x00841732 _UIApplicationHandleEvent + 7576
    	11  GraphicsServices                    0x022e6a36 PurpleEventCallback + 1550
    	12  GraphicsServices                    0x022e6abd PurpleEventSignalCallback + 42
    	13  CoreFoundation                      0x0199201f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    	14  CoreFoundation                      0x018f019d __CFRunLoopDoSources0 + 333
    	15  CoreFoundation                      0x018ef786 __CFRunLoopRun + 470
    	16  CoreFoundation                      0x018ef240 CFRunLoopRunSpecific + 208
    	17  CoreFoundation                      0x018ef161 CFRunLoopRunInMode + 97
    	18  GraphicsServices                    0x022e5268 GSEventRunModal + 217
    	19  GraphicsServices                    0x022e532d GSEventRun + 115
    	20  UIKit                               0x0084542e UIApplicationMain + 1160
    	21  Ukulele                             0x00001e0c main + 102
    	22  Ukulele                             0x00001d9d start + 53
    )
    terminate called after throwing an instance of 'NSException'
    
    Everything works fine at first.
    I've been researching other similar topics on this but it has been fruitless thus far. Any clues as to what might be happening.

    Thanks,
    Nick
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    You have any idea what the problem is here?
     
  3. thread starter macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #3
    According to a post at iphonedevsdk.

    smasher:
    " The error message says "nil string parameter," which suggest that you're passing and empty (nil) path. That still leaves a lot of things to check - How is that path being created? Is the file still part of your project, and also part of the current target? Try browsing to the build folder, and opening the package - is the file really inside it? "

    I'm thinking the problem has something to do with the placement of the files in my project folder. I am using a duplicated xib file from another project and that also could be the source of the problem (not included properly).

    Nick
     
  4. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #4
    You've got to let us see more of the code or layout of your project if we can help.

    Focus around the initFileURLWithPath: in your code. Post an excerpt if you can.

    B
     
  5. thread starter macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #5
    Thanks for your help guys. It seems the problem was a simple mistyping of an audio file name. When I've done this in the past it usually shows the name of the missing file in the console.
    Thanks,
    Nick
     

Share This Page