I only replace the video files in my existing code, but if i replace all the video files my application will crash in iphone. it is an universal application but Ipad support all the new video files and crash on iphone. the following warning occur:
[NSCFType setLength:]: unrecognized selector sent to instance
0x19d790 2012-02-29 15:13:49.932[584:307] * Terminating app due to
uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType
setLength:]: unrecognized selector sent to instance 0x19d790'
* Call stack at first throw: ( 0 CoreFoundation 0x3759dc7b __exceptionPreprocess + 114 1 libobjc.A.dylib
0x32d9bee8 objc_exception_throw + 40 2 CoreFoundation
0x3759f3e3 -[NSObject(NSObject) doesNotRecognizeSelector:] + 98 3
CoreFoundation 0x37544467 __forwarding + 506
4 CoreFoundation 0x37544220
_CF_forwarding_prep_0 + 48 5 Visionaries 0x00005179 -[Visionaries_ViewController
connection:didReceiveResponse:] + 56 6 Foundation
0x35183cd5 -[NSURLConnection(NSURLConnectionReallyInternal)
sendDidReceiveResponse:] + 92 7 Foundation
0x35183c3b _NSURLConnectionDidReceiveResponse + 86 8 CFNetwork
0x302941b4
_ZN19URLConnectionClient29_clientSendDidReceiveResponseEP14_CFURLResponsePNS_26ClientConnectionEventQueueE
+ 64 9 CFNetwork 0x30284bc8 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl
+ 332 10 CFNetwork 0x30284d84 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl
+ 776 11 CFNetwork 0x30284984 _ZN19URLConnectionClient13processEventsEv + 100 12 CFNetwork 0x3028484c _ZN17MultiplexerSource7performEv + 192 13 CFNetwork
0x30284788 _ZN17MultiplexerSource8_performEPv + 12 14 CoreFoundation
0x375518d1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 14 15 CoreFoundation 0x37521ecd __CFRunLoopDoSources0 + 384 16 CoreFoundation 0x375216f9 __CFRunLoopRun + 264 17 CoreFoundation
0x3752150b CFRunLoopRunSpecific + 226 18 CoreFoundation
0x37521419 CFRunLoopRunInMode + 60 19 GraphicsServices
0x33e76d24 GSEventRunModal + 196 20 UIKit
0x3591d57c -[UIApplication _run] + 588 21 UIKit
0x3591a558 UIApplicationMain + 972 22 Visionaries
0x00002391 main + 80 23 Visionaries
0x0000233c start + 40 ) terminate called after throwing an instance of
'NSException'
Somebody has an idea, please help.
By the crash log we see that, inside -[Visionaries_ViewController connection:didReceiveResponse:], you are calling the method setLength: on an object that does not have that method.
Can be a memory or logic problem. Please provide more info.
Related
For example, I get this error in debug area:
2014-05-01 05:01:28.052 MyApp[93187:303] *** setObjectForKey: object cannot be nil (key: -1)
2014-05-01 05:01:28.057 MyApp[93187:303] (
0 CoreFoundation 0x00007fff8cb3f25c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff89202e75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ca3a46e -[__NSDictionaryM setObject:forKey:] + 1102
3 MyApp 0x0000000100009725 +[SystemTools getData:] + 5509
4 MyApp 0x0000000100001c4b -[AppDelegate drawCanvas:] + 1467
5 MyApp 0x0000000100001675 -[AppDelegate repeatingTimer:] + 85
6 Foundation 0x00007fff8ec480f4 __NSFireTimer + 96
7 CoreFoundation 0x00007fff8caa6564 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
8 CoreFoundation 0x00007fff8caa609f __CFRunLoopDoTimer + 1151
9 CoreFoundation 0x00007fff8cb175aa __CFRunLoopDoTimers + 298
10 CoreFoundation 0x00007fff8ca618e5 __CFRunLoopRun + 1525
11 CoreFoundation 0x00007fff8ca610b5 CFRunLoopRunSpecific + 309
12 HIToolbox 0x00007fff875dca0d RunCurrentEventLoopInMode + 226
13 HIToolbox 0x00007fff875dc7b7 ReceiveNextEventCommon + 479
14 HIToolbox 0x00007fff875dc5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
15 AppKit 0x00007fff907853de _DPSNextEvent + 1434
16 AppKit 0x00007fff90784a2b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
17 AppKit 0x00007fff90778b2c -[NSApplication run] + 553
18 AppKit 0x00007fff90763913 NSApplicationMain + 940
19 MyApp 0x0000000100016aa2 main + 34
20 libdyld.dylib 0x00007fff9440b5fd start + 1
21 ??? 0x0000000000000003 0x0 + 3
)
Unfortunately, I have saveral "setObject:forKey:" calls in "SystemTools getData:" function.
How can I determine to which call this error is related? What that numbers (after plus) means?
Add an Execption breakpoint in your break points. This will halt at the line of code which is causing the app to crash. That way you dont have to debug with NSLogs.
The default behavior of Xcode is to stop where the exception is
caught, not where the exception is raised!
To explain those lines in the crash logs:
From Ray Wenderlich's blog:
2 XYZLib 0x34648e88 0x83000 + 8740
It is basically four columns:
The frame number – in this case, 2.
The name of the binary – in this case, XYZLib.
The address of the function that was called – in this case, 0x34648e88.
The fourth column is divided into two sub-columns, a base address and an offset. Here it is 0×83000 + 8740, where the first number points to the file, and the second points to the line of code in that file.
Use breakpoints in all of your setObject:forKey calls. Use NSLog for print some useful information in log. You are a developer so you need to know debugging also.
The first line of the output is useful here:
setObjectForKey: object cannot be nil (key: -1)
The NSDictionary doesn't like nil values, so look for a place in your getData method that could be assigning a nil value to a key of "-1".
Good luck!
EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xa151830c
Triggered by Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x3b766b26 objc_msgSend + 6
1 Foundation 0x31e31386 __NSFireDelayedPerform + 410
2 CoreFoundation 0x314220dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12
3 CoreFoundation 0x31421cf2 __CFRunLoopDoTimer + 778
4 CoreFoundation 0x3142008e __CFRunLoopRun + 1206
5 CoreFoundation 0x3138ac22 CFRunLoopRunSpecific + 518
6 CoreFoundation 0x3138aa06 CFRunLoopRunInMode + 102
7 GraphicsServices 0x3607a27e GSEventRunModal + 134
8 UIKit 0x33c2e044 UIApplicationMain + 1132
9 deBodas 0x000d5c6e main (main.m:16)
10 deBodas 0x000c53fc ___lldb_unnamed_function1$$deBodas + 36
This is crash log when i install the build .It is happend when install the build adhoc not a debug build
When i install build through system it is not happend.Any body knows please help me
I am struck this issue last three days.
My current main Application is randomly crashing on iOS 6 devices when i compile with iOS 7. It is system deep i think and don't know how to fix this little nasty bug. In my App there are plenty of iOS 6 user with this crash and it's driving me nuts.
Thread : Fatal Exception: NSGenericException
0 CoreFoundation 0x32b902a3 __exceptionPreprocess + 162
1 libobjc.A.dylib 0x3a8b897f objc_exception_throw + 30
2 CoreFoundation 0x32b8fd85 -[NSException name]
3 UIKit 0x34d22f75 __54+[_UIAppearance _recordersExcludingSource:withWindow:]_block_invoke_0 + 332
4 CoreFoundation 0x32b8d62f __NSDictionaryEnumerate + 714
5 UIKit 0x34d22e1d +[_UIAppearance _recordersExcludingSource:withWindow:] + 136
6 UIKit 0x34e013a5 UIViewServiceCurrentAppearanceSerializedRepresentations + 60
7 UIKit 0x34d8f7c7 -[_UIRemoteViewControllerConnectionRequest _sendServiceViewControllerRequest] + 206
8 UIKit 0x34d8f65d __block_global_5 + 264
9 libdispatch.dylib 0x3acd39f7 _dispatch_barrier_sync_f_invoke + 30
10 UIKit 0x34d8f551 __76-[_UIRemoteViewControllerConnectionRequest _connectToViewControllerOperator]_block_invoke_0 + 92
11 UIKit 0x34d98bc5 __block_global_0 + 32
12 libdispatch.dylib 0x3acd53f7 dispatch_once_f$VARIANT$mp + 42
13 UIKit 0x34d98ba1 __73-[_UIViewServiceSessionEndpoint connectToDeputyOfType:connectionHandler:]_block_invoke_0 + 88
14 libdispatch.dylib 0x3acd011f _dispatch_call_block_and_release + 10
15 libdispatch.dylib 0x3acd3ecf _dispatch_queue_drain$VARIANT$mp + 142
16 libdispatch.dylib 0x3acd3dc1 _dispatch_queue_invoke$VARIANT$mp + 40
17 libdispatch.dylib 0x3acd491d _dispatch_root_queue_drain + 184
18 libdispatch.dylib 0x3acd4ac1 _dispatch_worker_thread2 + 84
19 libsystem_c.dylib 0x3ad04a11 _pthread_wqthread + 360
20 libsystem_c.dylib 0x3ad048a4 start_wqthread + 8
Add a Exception breakpoint you will get some more info about your crash.. for adding a Exception Breakpoint have a look on this https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html
Add breakpoints step into every line of code to find the bug , Or maybe this would help you read crash reports. http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
I am using xcode Instruments to track Allocations and Leaks. My app is crashing though. It does not crash when running the regular debug or release builds standalone, only when under Instruments:
Any thoughts ideas very gratefully received....
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0002b2e0
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x34499c96 objc_msgSend + 14
1 ZZZ Test Suite 0x000a3d74 0x95000 + 60788
2 CoreFoundation 0x308e4c3c -[NSObject(NSObject) release] + 24
3 CoreFoundation 0x308e519a CFRelease + 62
4 CoreFoundation 0x308e7eb4 _CFAutoreleasePoolPop + 140
5 Foundation 0x341b41c4 -[NSAutoreleasePool release] + 92
6 UIKit 0x309e5f08 _UIApplicationHandleEvent + 5784
7 GraphicsServices 0x30269e70 PurpleEventCallback + 660
8 CoreFoundation 0x30957a90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
9 CoreFoundation 0x30959838 __CFRunLoopDoSource1 + 160
10 CoreFoundation 0x3095a606 __CFRunLoopRun + 514
11 CoreFoundation 0x308eaebc CFRunLoopRunSpecific + 224
12 CoreFoundation 0x308eadc4 CFRunLoopRunInMode + 52
13 GraphicsServices 0x30269418 GSEventRunModal + 108
14 GraphicsServices 0x302694c4 GSEventRun + 56
15 UIKit 0x30a10d62 -[UIApplication _run] + 398
16 UIKit 0x30a0e800 UIApplicationMain + 664
17 ZZZ Test Suite 0x0009665c 0x95000 + 5724
18 ZZZ Test Suite 0x00096604 0x95000 + 5636
Try running it through the analyser first. You can run it from xcode from the |product| menu then select Analyze. It's a static analyser (clang) that analyses your code when it builds so any problems causing your code to crash at runtime could well be visible through static analysis. Give it a try and fix any problems it throws up then try instruments again.
As a complement to what Ian says above:
set the Environment variable "NSZombieEnabled" to YES
and you will hopefully have a more informative fail.
(In XCode 4 the Environment Variables is found under "Edit Scheme" and select "Debug")
I'm trying to create a multi-view iOS (4.3) application in xcode 4 using the view-based application template but have so far had no luck. Everything builds but then crashes without error, with me getting the message SIGABRT in the line "int retVal = UIApplicationMain(argc, argv, nil, nil);" in supporting file-> main.m
The same thing happens in both my application and the plain (view-based application ) template from xcode.
Any ideas what the problem might be?
Here's the log:
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 3884.
2011-03-15 18:18:16.226 Server-sideStory[3884:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc45a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f18313 objc_exception_throw + 44
2 CoreFoundation 0x00d7cef8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00d7ce6a +[NSException raise:format:] + 58
4 UIKit 0x0031d512 -[UISplitViewController _commonInit] + 165
5 UIKit 0x0031d971 -[UISplitViewController initWithCoder:] + 92
6 Foundation 0x00784c24 _decodeObjectBinary + 3296
7 Foundation 0x00783d91 _decodeObject + 224
8 UIKit 0x00211979 -[UIRuntimeConnection initWithCoder:] + 212
9 Foundation 0x00784c24 _decodeObjectBinary + 3296
10 Foundation 0x007859f5 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1354
11 Foundation 0x00786024 -[NSArray(NSArray) initWithCoder:] + 596
12 Foundation 0x00784c24 _decodeObjectBinary + 3296
13 Foundation 0x00783d91 _decodeObject + 224
14 UIKit 0x00210c36 -[UINib instantiateWithOwner:options:] + 804
15 UIKit 0x00212ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
16 UIKit 0x0001817a -[UIApplication _loadMainNibFile] + 172
17 UIKit 0x00018cf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
18 UIKit 0x00023617 -[UIApplication handleEvent:withNewEvent:] + 1533
19 UIKit 0x0001babf -[UIApplication sendEvent:] + 71
20 UIKit 0x00020f2e _UIApplicationHandleEvent + 7576
21 GraphicsServices 0x00ffd992 PurpleEventCallback + 1550
22 CoreFoundation 0x00da5944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
23 CoreFoundation 0x00d05cf7 __CFRunLoopDoSource1 + 215
24 CoreFoundation 0x00d02f83 __CFRunLoopRun + 979
25 CoreFoundation 0x00d02840 CFRunLoopRunSpecific + 208
26 CoreFoundation 0x00d02761 CFRunLoopRunInMode + 97
27 UIKit 0x000187d2 -[UIApplication _run] + 623
28 UIKit 0x00024c93 UIApplicationMain + 1160
29 Server-sideStory 0x00002719 main + 121
30 Server-sideStory 0x00002695 start + 53
)
terminate called after throwing an instance of 'NSException'
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
It's telling you that UISplitViewController is not supported on the iPhone - only works on the iPad.