iPhone 3G with iOS 4.1 reboots while debugging - iphone

I'm using Xcode 3.2.4.
Has anyone ever experienced this?
Here's the console message that I had gathered:
10/22/10 10:53:58 PM Xcode[70765] _NotificationSocketReadCallback (thread 0x1170b0000): Unexpected connection closure...
10/22/10 10:53:58 PM Xcode[70765] Got faceplant notification
10/22/10 10:53:58 PM Xcode[70765] AMDServiceConnectionSendMessage (thread 0x1170b0000): Could not send message size: Broken pipe
I was able to see a glimpse of the app launching while debugging, but then it reboots.
Xcode reports these error messages:
gdb stack trace at 'putpkt: write failed':
putpkt: write failed: Broken pipe
putpkt: write failed: Broken pipe
The program being debugged is not being run.
The program being debugged is not being run.
0 gdb-arm-apple-darwin 0x0018d893 remote_backtrace_self + 54
1 gdb-arm-apple-darwin 0x00190cab putpkt_binary + 401
2 gdb-arm-apple-darwin 0x0019661e remote_macosx_create_inferior + 1005
3 gdb-arm-apple-darwin 0x0006f611 run_command_1 + 660
4 gdb-arm-apple-darwin 0x0012ed92 execute_command + 713
5 gdb-arm-apple-darwin 0x0001bbcb mi_execute_async_cli_command + 226
6 gdb-arm-apple-darwin 0x0001b1e8 captured_mi_execute_command + 371
7 gdb-arm-apple-darwin 0x000850d3 catch_exception + 65
8 gdb-arm-apple-darwin 0x00018546 mi_execute_command + 163
9 gdb-arm-apple-darwin 0x000186eb mi_execute_command_wrapper + 50
10 gdb-arm-apple-darwin 0x0008aab5 handle_file_event + 349
11 gdb-arm-apple-darwin 0x0008a47c process_event + 131
12 gdb-arm-apple-darwin 0x0008b236 gdb_do_one_event + 1178
13 gdb-arm-apple-darwin 0x000851f6 catch_errors + 78
14 gdb-arm-apple-darwin 0x0008a92d start_event_loop + 76
15 gdb-arm-apple-darwin 0x000876a3 captured_command_loop + 18
16 gdb-arm-apple-darwin 0x000851f6 catch_errors + 78
17 gdb-arm-apple-darwin 0x0008768f captured_main + 5557
18 gdb-arm-apple-darwin 0x000851f6 catch_errors + 78
19 gdb-arm-apple-darwin 0x000860cf gdb_main + 63
20 gdb-arm-apple-darwin 0x00001b6a main + 52
21 gdb-arm-apple-darwin 0x00001af9 start + 53
Update: I have confirmed that this issue only occurs on jailbroken devices.

Same here. It seems there's a bug whit Xcode (and some other stuff) with the JB.
If you look at the comments here: http://blog.iphone-dev.org/post/1359246784/20102010-event#idc-cover you can see there's people reporting the same.
I haven't found the solution, so i guess we'll have to wait until 4.2 comes up. :(
I work making iPhone apps and, it's really anoying T_T

Related

Unity 2019.2.9f1 Crashes on MacOS Mojave

My unity project is randomly crashing at the startup. I was used to solving the problem by checking out my source code in an alternative location and adding the project back to Unity Hub. Unfortunately, this solution no longer works.
Here the crashlog:
Process: Unity [11340]
Path: /Applications/2019.2.9f1/Unity.app/Contents/MacOS/Unity
Identifier: com.unity3d.UnityEditor5.x
Version: Unity version 2019.2.9f1 (2019.2.9f1)
Code Type: X86-64 (Native)
Parent Process: Unity Hub [740]
Responsible: Unity [11340]
User ID: 501
Date/Time: 2019-12-07 17:07:08.386 +0000
OS Version: Mac OS X 10.14.5 (18F132)
Report Version: 12
Bridge OS Version: 3.5 (16P5125)
Time Awake Since Boot: 36000 seconds
Time Since Wake: 10000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000002c0
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0x2c0:
-->
__TEXT 000000010c8e4000-00000001135bc000 [108.8M] r-x/rwx SM=COW /Applications/2019.2.9f1/Unity.app/Contents/MacOS/Unity
Application Specific Information:
abort() called
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6f3332c6 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6f3eebf1 pthread_kill + 284
2 libsystem_c.dylib 0x00007fff6f29d6a6 abort + 127
3 com.unity3d.UnityEditor5.x 0x000000010f899dfe HandleSignal(int, __siginfo*, void*) + 62
4 libmonobdwgc-2.0.dylib 0x0000000147111619 mono_chain_signal + 79
5 libmonobdwgc-2.0.dylib 0x0000000146fe2c7f mono_sigsegv_signal_handler + 414
6 libsystem_platform.dylib 0x00007fff6f3e3b5d _sigtramp + 29
7 ??? 000000000000000000 0 + 0
8 com.unity3d.UnityEditor5.x 0x00000001102d6e71 LightingDataAsset::GetLightingDataAssetStableID(UnityScene*) + 97
9 com.unity3d.UnityEditor5.x 0x0000000110344c2f WriteLightingDataAssetJob::Prepare(dynamic_array<UnityGUID, 0ul>&) + 719
10 com.unity3d.UnityEditor5.x 0x0000000110268bf3 IssueWriteLightingDataAssetJob(JobManager*, dynamic_array<UnityGUID, 0ul>&, Hash128 const&) + 531
11 com.unity3d.UnityEditor5.x 0x000000011026dd31 LightingDataAssetManager::PostUpdate() + 353
12 com.unity3d.UnityEditor5.x 0x000000011024f75c gi::PostUpdate(dynamic_array<GISceneManagerClient*, 0ul> const&) + 44
13 com.unity3d.UnityEditor5.x 0x0000000110284b55 GISceneManager::Update() + 1605
14 com.unity3d.UnityEditor5.x 0x0000000110282d0a GISceneManager::GISceneManager()::tickGIInEditorRegistrator::Forward() + 74
15 com.unity3d.UnityEditor5.x 0x000000010cd6ea62 CallbackArray::Invoke() + 82
16 com.unity3d.UnityEditor5.x 0x000000010d5acb8f ProfilerCallbackInvoke<CallbackArray, &(GlobalCallbacks::tickGIInEditor)>::Invoke(char const*) + 63
17 com.unity3d.UnityEditor5.x 0x000000010d5aa1a9 Application::TickTimer() + 4873
18 com.unity3d.UnityEditor5.x 0x00000001108c5675 -[EditorApplication TickTimer] + 165
19 com.apple.Foundation 0x00007fff45579ceb __NSFireTimer + 80
20 com.apple.CoreFoundation 0x00007fff432eca60 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
21 com.apple.CoreFoundation 0x00007fff432ec60c __CFRunLoopDoTimer + 851
22 com.apple.CoreFoundation 0x00007fff432ec152 __CFRunLoopDoTimers + 330
23 com.apple.CoreFoundation 0x00007fff432cd362 __CFRunLoopRun + 2130
24 com.apple.CoreFoundation 0x00007fff432cc8be CFRunLoopRunSpecific + 455
25 com.apple.HIToolbox 0x00007fff425b896b RunCurrentEventLoopInMode + 292
26 com.apple.HIToolbox 0x00007fff425b86a5 ReceiveNextEventCommon + 603
27 com.apple.HIToolbox 0x00007fff425b8436 _BlockUntilNextEventMatchingListInModeWithFilter + 64
28 com.apple.AppKit 0x00007fff40952987 _DPSNextEvent + 965
29 com.apple.AppKit 0x00007fff4095171f -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
30 com.apple.AppKit 0x00007fff4094b83c -[NSApplication run] + 699
31 com.apple.AppKit 0x00007fff4093ad7c NSApplicationMain + 777
32 com.unity3d.UnityEditor5.x 0x00000001109038a9 EditorMain(int, char const**) + 665
33 com.unity3d.UnityEditor5.x 0x0000000110903b79 main + 9
34 libdyld.dylib 0x00007fff6f1f83d5 start + 1
what can I do to fix it?
The solution was to delete the /library folder inside the Unity Project and re-load the project

MonoDevelop crashing over High Sierra (OSX 10.13)

I am facing an issue from yesterday after updating system to latest macOS 10.13 beta with unity monoDevelop below is what i am getting as crash report.
Process: mono-sgen [9057]
Path: /tmp/*/mono
Identifier: com.unity.monodevelop
Version: 5.9.6 (5.9.6)
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: mono-sgen [9057]
User ID: 501
Date/Time: 2017-06-15 11:43:09.345 +0530
OS Version: Mac OS X 10.13 (17A264c)
Report Version: 12
Anonymous UUID: ACA523AB-96B9-4E46-8D2A-A2210B9A181A
Sleep/Wake UUID: 5715E1CB-BBDF-4E3C-9CEE-8F8C01ADD64D
Time Awake Since Boot: 36000 seconds
Time Since Wake: 6400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000d9d1efbd
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0xd9d1efbd:
Stack 00000000bf7ee000-00000000bffe5000 [ 8156K] rw-/rwx SM=COW
-->
Submap 00000000ffff0000-00000000ffff1000 [ 4K] r--/r-- SM=PRV process-only VM submap
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0xa7617f6a __pthread_kill + 10
1 libsystem_pthread.dylib 0xa77346dd pthread_kill + 307
2 libsystem_c.dylib 0xa756881e abort + 133
3 mono 0x000dc435 mono_handle_native_sigsegv + 757
4 mono 0x001282a2 mono_arch_handle_altstack_exception + 162
5 mono 0x0002890e mono_sigsegv_signal_handler + 446
6 libsystem_platform.dylib 0xa7728fcb _sigtramp + 43
7 ??? 0xffffffff 0 + 4294967295
8 mono 0x00028750 mono_sigill_signal_handler + 48
9 com.apple.Foundation 0x9524f536 _NSAddExceptionHandlerForLock + 21
10 com.apple.AppKit 0x9157d276 _NSAppKitLock + 78
11 com.apple.AppKit 0x913c4ecd -[NSApplication _addWindow:] + 50
12 com.apple.AppKit 0x913c47d0 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 295
13 com.apple.AppKit 0x913c33e9 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 940
14 com.apple.AppKit 0x9142ccaf -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 67
15 com.apple.AppKit 0x913c3033 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 72
16 com.apple.AppKit 0x9142cc5a -[NSPanel initWithContentRect:styleMask:backing:defer:] + 93
17 com.apple.AppKit 0x9142c426 -[NSWindowTemplate nibInstantiate] + 419
18 com.apple.AppKit 0x91386ee5 -[NSIBObjectData instantiateObject:] + 255
19 com.apple.AppKit 0x913866f8 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 311
20 com.apple.AppKit 0x913865bc -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 37
21 com.apple.AppKit 0x9137e6b1 loadNib + 482
22 com.apple.AppKit 0x9137dbbc +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 289
23 com.apple.AppKit 0x91598719 +[NSBundle(NSNibLoadingInternal) _loadNibFile:externalNameTable:options:withZone:] + 129
24 com.apple.AppKit 0x9163b5fe +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 43
25 com.apple.AppKit 0x9163b5ac _NXLoadNib + 169
26 com.apple.AppKit 0x9163b09a -[NSAlert init] + 97
27 ??? 0x085cc138 0 + 140296504
28 ??? 0x0b13c470 0 + 185844848
29 ??? 0x0b13aa70 0 + 185838192
30 ??? 0x0b13a800 0 + 185837568
31 ??? 0x0b13a738 0 + 185837368
32 ??? 0x0b139f5c 0 + 185835356
33 ??? 0x0b13a065 0 + 185835621
34 mono 0x0002b3ff mono_jit_runtime_invoke + 751
35 mono 0x001ee13f mono_runtime_invoke + 127
36 mono 0x001f4fcd mono_runtime_invoke_array + 941
37 mono 0x001679d5 ves_icall_InternalExecute + 309
38 ??? 0x0a37f690 0 + 171439760
39 mscorlib.dll.dylib 0x019ac5b9 System_Runtime_Remoting_RemotingServices_InternalExecuteMessage_System_MarshalByRefObject_System_Runtime_Remoting_Messaging_IMethodCallMessage + 521
40 mscorlib.dll.dylib 0x01999865 System_Runtime_Remoting_Messaging_StackBuilderSink_SyncProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 245
41 mscorlib.dll.dylib 0x01999424 System_Runtime_Remoting_Messaging_ServerObjectTerminatorSink_SyncProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 132
42 mscorlib.dll.dylib 0x01989230 System_Runtime_Remoting_Lifetime_LeaseSink_SyncProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 64
43 ??? 0x0b139e9a 0 + 185835162
44 ??? 0x0b139e2c 0 + 185835052
45 ??? 0x0b139cf0 0 + 185834736
46 mscorlib.dll.dylib 0x019b083a System_Runtime_Remoting_ClientActivatedIdentity_SyncObjectProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 154
47 mscorlib.dll.dylib 0x01999287 System_Runtime_Remoting_Messaging_ServerContextTerminatorSink_SyncProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 423
48 mscorlib.dll.dylib 0x0198615f System_Runtime_Remoting_Contexts_CrossContextChannel_SyncProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 239
49 mscorlib.dll.dylib 0x0198d577 System_Runtime_Remoting_Messaging_ClientContextTerminatorSink_SyncProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 503
50 mscorlib.dll.dylib 0x0198eeb7 System_Runtime_Remoting_Messaging_EnvoyTerminatorSink_SyncProcessMessage_System_Runtime_Remoting_Messaging_IMessage + 55
51 mscorlib.dll.dylib 0x019a377a System_Runtime_Remoting_Proxies_RemotingProxy_Invoke_System_Runtime_Remoting_Messaging_IMessage + 970
52 mscorlib.dll.dylib 0x019a2164 System_Runtime_Remoting_Proxies_RealProxy_PrivateInvoke_System_Runtime_Remoting_Proxies_RealProxy_System_Runtime_Remoting_Messaging_IMessage_System_Exception__object___ + 1268
53 ??? 0x0a37f09f 0 + 171438239
54 mono 0x0002b3ff mono_jit_runtime_invoke + 751
55 mono 0x001ee13f mono_runtime_invoke + 127
56 mono 0x001f78a1 mono_remoting_invoke + 145
57 mono 0x001bc690 mono_remoting_wrapper + 192
58 ??? 0x0a37efd8 0 + 171438040
59 ??? 0x0b1396f0 0 + 185833200
60 ??? 0x0b139608 0 + 185832968
61 ??? 0x0b139248 0 + 185832008
62 ??? 0x0b13913c 0 + 185831740
63 ??? 0x0b1390e0 0 + 185831648
64 ??? 0x0b13802c 0 + 185827372
65 ??? 0x0333c154 0 + 53723476
66 ??? 0x005800a8 0 + 5767336
67 ??? 0x0057fe2c 0 + 5766700
68 ??? 0x0057ff07 0 + 5766919
69 mono 0x0002b3ff mono_jit_runtime_invoke + 751
70 mono 0x001ee13f mono_runtime_invoke + 127
71 mono 0x001f41c1 mono_runtime_exec_main + 401
72 mono 0x001f3f64 mono_runtime_run_main + 660
73 mono 0x000a5e5d mono_jit_exec + 93
74 mono 0x000a8130 mono_main + 7904
75 mono 0x0001d730 main + 768
76 mono 0x0001d425 start + 53
Thread 1:
0 libsystem_kernel.dylib 0xa760eeaa semaphore_wait_trap + 10
1 mono 0x0027116a mono_sem_wait + 26
2 mono 0x001ec05a finalizer_thread + 154
3 mono 0x001ca065 start_wrapper + 517
4 mono 0x002766b0 inner_start_thread + 240
5 libsystem_pthread.dylib 0xa773174d _pthread_body + 292
6 libsystem_pthread.dylib 0xa7731629 _pthread_start + 376
7 libsystem_pthread.dylib 0xa7730d02 thread_start + 34
Thread 2:
0 libsystem_kernel.dylib 0xa761878e __workq_kernreturn + 10
1 libsystem_pthread.dylib 0xa7731103 _pthread_wqthread + 1023
2 libsystem_pthread.dylib 0xa7730cde start_wqthread + 34
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 2
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 89884
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=344.8M resident=0K(0%) swapped_out_or_unallocated=344.8M(100%)
Writable regions: Total=102.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=102.0M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 2
CG image 1032K 3
CoreAnimation 32K 6
CoreUI image file 168K 3
Foundation 4K 2
Image IO 1036K 4
Kernel Alloc Once 8K 2
MALLOC 55.9M 33
MALLOC guard page 48K 12
Stack 14.0M 17
Stack Guard 56.2M 17
VM_ALLOCATE 29.6M 56
VM_ALLOCATE (reserved) 164K 6 reserved VM address space (unallocated)
__DATA 13.7M 319
__FONT_DATA 4K 2
__LINKEDIT 88.2M 45
__OBJC 6616K 136
__TEXT 256.6M 318
__UNICODE 556K 2
mapped file 265.7M 259
shared memory 644K 12
=========== ======= =======
TOTAL 790.1M 1235
TOTAL, minus reserved VM space 790.0M 1235
Model: MacBookPro9,2, BootROM MBP91.00D3.B21, 2 processors, Intel Core i5, 2.5 GHz, 12 GB, SMC 2.2f44
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x0198, 0x393930353432382D3432372E4130304C4620
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x0198, 0x393930353436392D3036332E4130304C4620
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xF5), Broadcom BCM43xx 1.0 (7.21.190.7.1a3)
Bluetooth: Version 6.0.0d40, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: APPLE HDD HTS545050A7E362, 500.11 GB
Serial ATA Device: HL-DT-ST DVDRW GS41N
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: IR Receiver
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: USB 3.0 Bus
USB Device: vivo Android Phone
Thunderbolt Bus: MacBook Pro, Apple Inc., 25.1
I have already tried with permission on monoDevelop.app contents folder and applied to all sub folders as well.
I got this issue as well. Try removing your MonoDevelop data (this way works for me).
Open Terminal and run this:
rm -rf ~/Library/Preferences/MonoDevelop-Unity-5.0
Update (Feb 2018):
As of 2018, Unity Technologies has been recommending Visual Studio for Mac as the preferred editor for Mac users. Before all those red flags and alarms tell you to flee out the door, please be advised that VS/Mac is a fork of Xamarin Studio (acquired by Microsoft), which in turn is a fork of MonoDevelop.
As it is a fork, VS/Mac is just an update of MonoDevelop, is more actively maintained, and has fewer crashes, memory leaks, and other productivity sinks. In my use for the past month, VS/Mac has been very stable, its memory footprint is quite stable as well, and there is no noticeable bloat as far as I can tell.
Finally, VS/Mac is available in three versions: Community, Professional, and Enterprise.
You can download VS/Mac from http://visualstudio.com
The download and installation is just as simple as installing MonoDevelop or Xamarin.
Just go into Unity preferences, and choose VS/Mac as your external code editor, and you're good to go.
Give it a try.
Unity has issued patches to address the MonoDevelop crashes. The patches exist for the following versions of Unity:
2017.2
2017.1
5.6.3
5.5.4
If you're using a version that is not listed, you may have to change Unity versions, roll back Mac OS X, or use the Xamarin workaround.
Here's the URL to Unity patches:
https://unity3d.com/unity/qa/patch-releases
Here's the Unity Forum link for more info:
https://forum.unity.com/threads/unity-and-macos-10-13-high-sierra.474527/
I've put a bounty on this, knowing full well there's some workarounds. I just prefer using the default integrated MonoDevelop and am hoping this can be solved. Unity is already aware of the issue with MonoDevelop + High Sierra, but no solutions have been offered.
For those looking for a workaround, you download MonoDevelop + Xamarin Studio straight from here, which works without crashing for me.
If you're using multiple monitors one cause for MonoDevelop crashing is having the IDE open in a secondary monitor during previous session.
In this case you don't need to remove all your preferences but instead edit MonoDevelopProperties.xml and remove the "bounds" property within the WorkbenchMemento node:
<Property key="bounds" value="-37, 162, 1920, 1020" />
If you're using two or more monitors, try moving Unity IDE to another monitor and then launch MonoDevelop.
For some reason, if you closed MonoDevelop main window on a different monitor and try to start it again on another monitor, it crashes.

Crash in ios 6 and later -[MKStoreManager provideContent:forReceipt:]

I have my app live which is non-consumable type.
App is crashing on iOS 6 and later. It is crashing on user's device but not on testing device.
Crash log says this:
Exception Type: SIGTRAP
Exception Codes: #0 at 0x3350316c
Crashed Thread: 0
Thread 0 Crashed:
0 CoreFoundation 0x3350316c _CFHash + 8
1 CoreFoundation 0x00002b50 CFBasicHashFindBucket + 1892
2 CoreFoundation 0x33503a8b _CFDictionaryGetValue + 83
3 CoreFoundation 0x0004a7a7 -[CFXPreferencesPropertyListSource setValue:forKey:] + 39
4 CoreFoundation 0x0004a723 _CFXPreferencesSetValue + 135
5 CoreFoundation 0x3354a601 _CFPreferencesSetAppValue + 41
6 Foundation 0x00009907 -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 83
7 myAppName 0x00038287 -[MKStoreManager provideContent:forReceipt:] (MKStoreManager.m:311)
8 myAppName 0x000387b1 -[MKStoreObserver restoreTransaction:] (MKStoreObserver.m:88)
9 myAppName 0x000385e1 -[MKStoreObserver paymentQueue:updatedTransactions:] (MKStoreObserver.m:64)
10 StoreKit 0x0000404d __NotifyObserverAboutChanges + 85
11 CoreFoundation 0x3350874d _CFArrayApplyFunction + 177
12 StoreKit 0x00003fe9 -[SKPaymentQueue _notifyObserversAboutChanges:sendUpdatedDownloads:] + 129
13 StoreKit 0x000048af -[SKPaymentQueue _processUpdates:trimUnmatched:sendUpdatedDownloads:] + 999
14 StoreKit 0x00004f8d -[SKPaymentQueue _setTransactionsWithReply:] + 157
15 StoreKit 0x00003b8b __block_global_0 + 63
16 libdispatch.dylib 0x0000211f _dispatch_call_block_and_release + 11
17 libdispatch.dylib 0x000014b7 _dispatch_client_callout + 23
18 libdispatch.dylib 0x000061bd _dispatch_main_queue_callback_4CF$VARIANT$mp + 225
19 CoreFoundation 0x00095f3b __CFRunLoopRun + 1291
20 CoreFoundation 0x33508ebd _CFRunLoopRunSpecific + 357
21 CoreFoundation 0x33508d49 _CFRunLoopRunInMode + 105
22 GraphicsServices 0x370bb2eb _GSEventRunModal + 75
23 UIKit 0x3541e301 _UIApplicationMain + 1121
24 myAppName 0x0000260f main (main.m:20)
This app supports iOS 4.3 and later.
I have tried in many ways but can't find proper solution. Anyone have any idea how I resolve this? Should I use some other code for in-app purchase?

sigsegv crash on iphone from crittercism

I've got a couple sigsegv crashes coming in from crittercism, but I'm not quite sure how to start going about debugging. The only line of code that's mine is the main call from the start of the crashed thread.
Copying the crashed thread's stack trace from crittercism:
Reason:
24-Sep-12
02:38:14 PM SIGSEGV
main (main.m:11)
Stack:
0
0 libobjc.A.dylib 0x356265b0 objc_msgSend + 15
1
1 UIKit 0x3861c313 + 1310
2
2 UIKit 0x386337cf + 206
3
3 UIKit 0x385ef80b + 258
4
4 QuartzCore 0x34f56d63 + 214
5
5 QuartzCore 0x34f56901 + 460
6
6 QuartzCore 0x34f57835 + 16
7
7 QuartzCore 0x34f5721b + 238
8
8 QuartzCore 0x34f57029 + 316
9
9 UIKit 0x386786e5 + 572
10
10 UIKit 0x386784a3 + 66
11
11 UIKit 0x38677391 + 1464
12
12 UIKit 0x385ed1ef + 2458
13
13 UIKit 0x385ec6d5 + 72
14
14 UIKit 0x385ec123 + 6154
15
15 GraphicsServices 0x3779f5a3 + 590
16
16 CoreFoundation 0x372f0683 + 14
17
17 CoreFoundation 0x372efee9 + 212
18
18 CoreFoundation 0x372eecb7 + 646
19
19 CoreFoundation 0x37261ebd CFRunLoopRunSpecific + 356
20
20 CoreFoundation 0x37261d49 CFRunLoopRunInMode + 104
21
21 GraphicsServices 0x3779e2eb GSEventRunModal + 74
22
22 UIKit 0x38640301 UIApplicationMain + 1120
23
23 MyApp 0x35bf main (main.m:11)
First, you'll need to "symbolicate" the crash log. There are plenty of web pages out there to instruct you on that.
Since this stack ends at objc_msgSend, the most likely cause is a dangling pointer.
To debug those, I recommend using NSZombies. If you are testing on the simulator, you might try "Guard malloc".
This crash is caused by invoking a method on a pointer to an object that was already deallocated. It is a very common ref count error somewhere in your code that holds on the UIKit elements. But, what you should do at a matter of practice is upload your .DSYM file to the crittercism. It can be done manually via the website or via a Web API call as part of your automatic build process.

Getting strange intermittent "unrecognized selector" exceptions in iPhone app

Recently, I've been getting intermittent error reports from my app claiming "unrecognized selector" in areas that could not possibly cause them, and yet they do.
For example, this one:
Error: NSInvalidArgumentException: *** -[NSCFString didReceiveMemoryWarning]: unrecognized selector sent to instance 0x541fe0
0 CoreFoundation 0x32de1e23 __handleUncaughtException + 230
1 libobjc.A.dylib 0x3266d894 _objc_terminate + 156
2 libstdc++.6.dylib 0x338c3a8c _ZN10__cxxabiv111__terminateEPFvvE + 84
3 libstdc++.6.dylib 0x338c3b04 _ZSt9terminatev + 24
4 libstdc++.6.dylib 0x338c3c2c __cxa_throw + 108
5 libobjc.A.dylib 0x3266be5c objc_exception_throw + 112
6 CoreFoundation 0x32de2bfd -[NSObject doesNotRecognizeSelector:] + 112
7 CoreFoundation 0x32d67b19 ___forwarding___ + 480
8 CoreFoundation 0x32d5e840 _CF_forwarding_prep_0 + 48
9 Foundation 0x33f765d9 _nsnote_callback + 184
10 CoreFoundation 0x32d9e511 _CFXNotificationPostNotification + 304
11 Foundation 0x33f741b3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
12 Foundation 0x33f76519 -[NSNotificationCenter postNotificationName:object:] + 20
13 UIKit 0x30d18db8 -[UIApplication _performMemoryWarning] + 68
14 UIKit 0x30d18d50 -[UIApplication _receivedMemoryNotification] + 136
15 UIKit 0x30d18c80 _memoryStatusChanged + 64
16 CoreFoundation 0x32d66eb7 __CFNotificationCenterDarwinCallBack + 26
17 CoreFoundation 0x32d5cb51 __CFMachPortPerform + 78
18 CoreFoundation 0x32da452b CFRunLoopRunSpecific + 2302
19 CoreFoundation 0x32da3c1f CFRunLoopRunInMode + 50
20 GraphicsServices 0x31bb9374 GSEventRunModal + 196
21 UIKit 0x30bf3c30 -[UIApplication _run] + 560
22 UIKit 0x30bf2230 UIApplicationMain + 968
23 Mind 0x00002c68 main + 72
24 Mind 0x00002be4 start + 52
This is the OS sending a memory warning to my app, and somehow the application class has changed into a string.
It seems to happen a lot more when the code is invoked via an NSOperation:
Error: NSInvalidArgumentException: -[NSCFString setObject:forKey:]: unrecognized selector sent to instance 0x3e793088
9 Mind 0x0015de70 -[CCTextureCache textureFromFile:] + 528
10 Mind 0x0015d9f4 -[CCTextureCache loadImageUncached:pixelFormat:] + 116
11 Mind 0x0015d058 -[CCTextureCache addImage:pixelFormat:] + 152
12 Mind 0x00080524 -[ImageLoader imageWithFile:pixelFormat:] + 84
13 Mind 0x000854c4 -[ImageLoadOperation performLoad] + 68
14 Mind 0x00085800 -[ResourceLoadOperation main] + 112
15 Foundation 0x30c4c8b5 -[__NSOperationInternal start] + 664
16 Foundation 0x30c4c613 -[NSOperation start] + 22
17 Foundation 0x30cbdb63 ____startOperations_block_invoke_2 + 46
18 libSystem.B.dylib 0x31227858 _dispatch_call_block_and_release + 20
19 libSystem.B.dylib 0x3122863c _dispatch_worker_thread2 + 128
20 libSystem.B.dylib 0x311b1544 _pthread_wqthread + 400
21 libSystem.B.dylib 0x311a8b74 __stack_chk_fail + 4294967295
The code in question is:
[textures setObject:texture forKey:filename];
textures is type NSMutableDictionary* and never gets reassigned or deallocated (naturally, since this is a cache object). This is the only place where setObject is invoked in this method, yet according to the stack trace, textures was a string.
I also get this weirdness:
Error: NSInvalidArgumentException: -[NSConcreteNotification getPixelFormatForIdentifier:]: unrecognized selector sent to instance 0x5c021b0
9 Mind 0x0015dd0c -[CCTextureCache textureFromFile:] + 172
10 Mind 0x0015d9f4 -[CCTextureCache loadImageUncached:pixelFormat:] + 116
11 Mind 0x0015d058 -[CCTextureCache addImage:pixelFormat:] + 152
12 Mind 0x00080524 -[ImageLoader imageWithFile:pixelFormat:] + 84
13 Mind 0x000854c4 -[ImageLoadOperation performLoad] + 68
14 Mind 0x00085800 -[ResourceLoadOperation main] + 112
15 Foundation 0x347b78b5 -[__NSOperationInternal start] + 664
16 Foundation 0x347b7613 -[NSOperation start] + 22
17 Foundation 0x34828b63 ____startOperations_block_invoke_2 + 46
18 libSystem.B.dylib 0x32a2f858 _dispatch_call_block_and_release + 20
19 libSystem.B.dylib 0x32a3063c _dispatch_worker_thread2 + 128
20 libSystem.B.dylib 0x329b9544 _pthread_wqthread + 400
21 libSystem.B.dylib 0x329b0b74 __stack_chk_fail + 4294967295
This trace is from the following code in CCTextureCache:
CCTexture2DPixelFormat pixelFormat = [self getPixelFormatForIdentifier:identifier];
How CCTextureCache changed into NSConcreteNotification after having already called a number of methods on itself is baffling to say the least.
Has anyone else noticed this sort of thing? Am I somehow getting memory corruption?
Did you check some race conditions about multi-threads ? It seems like some resource freed by another thread, and current thread send a messaged to a deallocated object.
Error: NSInvalidArgumentException: -[NSCFString setObject:forKey:]: unrecognized selector sent to instance 0x3e793088
9 Mind 0x0015de70 -[CCTextureCache textureFromFile:] + 528
10 Mind 0x0015d9f4 -[CCTextureCache loadImageUncached:pixelFormat:] + 116
11 Mind 0x0015d058 -[CCTextureCache addImage:pixelFormat:] + 152
12 Mind 0x00080524 -[ImageLoader imageWithFile:pixelFormat:] + 84
13 Mind 0x000854c4 -[ImageLoadOperation performLoad] + 68
14 Mind 0x00085800 -[ResourceLoadOperation main] + 112
15 Foundation 0x30c4c8b5 -[__NSOperationInternal start] + 664
16 Foundation 0x30c4c613 -[NSOperation start] + 22
17 Foundation 0x30cbdb63 ____startOperations_block_invoke_2 + 46
18 libSystem.B.dylib 0x31227858 _dispatch_call_block_and_release + 20
19 libSystem.B.dylib 0x3122863c _dispatch_worker_thread2 + 128
20 libSystem.B.dylib 0x311b1544 _pthread_wqthread + 400
21 libSystem.B.dylib 0x311a8b74 __stack_chk_fail + 4294967295
This is often caused by memory management errors. Did you try zombies?
...with zombies enabled, messages to deallocated objects will no longer behave
strangely or crash in difficult-to-understand ways, but will instead log a message
and die in a predictable and debugger-breakpointable way. This is the tool to use
when trying to track down over-releases and premature releases.
I just ran into the same problem, but it turns out I had made a stupid mistake:
I had declared a member like this in the header file:
NSMutableDictionary* myDict;
But then initialized it like this in the .m file:
myDict = [[NSDictionary alloc] init];
which is valid and all, because the NSMutableDictionary is derived from the NSDictionary class. Therefore all calls that are inherited from NSDictionary actually worked, but the calls specific to NSMutableDictionary [setObject: forKey:] failed because I tried to invoke them on the parent class.
The mistake was really dumb, but I was also thrown off by the fact that the debugger reported the type of myDict as something totally different (neither NSDictionary, nor NSMutableDictionary). I hope this helps some other tired coder :-)