I'm using ShareKit to share an item to Facebook and Twitter using this code
SHKItem *item = [SHKItem image:imageToShare title:textToShare];
NSLog(@"Sharing to facebook...");
SHKFacebook *fbSharer = [SHKFacebook shareItem:item];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showAnotherViewController) name:@"SHKSendDidFinish" object:fbSharer];
Everything works like a charm apart from iPhone 5, where the app crashes. This is the crash report generated:
Incident Identifier: B061FE97-D1AF-4919-8004-05E0AA3BD3E2
CrashReporter Key: 1544990de75429552f6f5f8eba0171523bd8db4b
Hardware Model: iPhone5,2
Process: ADme [2775]
Path: /var/mobile/Applications/D243F9B0-0750-4B67-9380-3D1DCDBA5828/ADme.app/ADme
Identifier: it.xplace.adme
Version: 7 (1.0.7)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-07-22 15:56:42.955 +0200
OS Version: iOS 7.0.6 (11B651)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x2dc65e7e 0x2db91000 + 872062
1 libobjc.A.dylib 0x37fc26c2 0x37fba000 + 34498
2 CoreFoundation 0x2dc65b84 0x2db91000 + 871300
3 ADme 0x0016f542 -[FBSession reauthorizeWithPermissions:isRead:behavior:defaultAudience:completionHandler:] (FBSession.m:1676)
4 ADme 0x0016bf2e -[FBSession requestNewPublishPermissions:defaultAudience:completionHandler:] (FBSession.m:433)
5 ADme 0x001a5734 -[SHKFacebook send] (SHKFacebook.m:410)
6 ADme 0x001ba624 -[SHKSharer tryToSend] (SHKSharer.m:864)
7 ADme 0x001b79ca +[SHKSharer shareItem:] (SHKSharer.m:203)
8 ADme 0x00108b28 -[ASShareNewViewController shareAction:] (ASShareNewViewController.m:110)
9 UIKit 0x3041ed9e 0x303df000 + 261534
10 UIKit 0x3041ed3a 0x303df000 + 261434
11 UIKit 0x3041ed0e 0x303df000 + 261390
12 UIKit 0x3040a73e 0x303df000 + 177982
13 UIKit 0x3041e756 0x303df000 + 259926
14 UIKit 0x3041e420 0x303df000 + 259104
15 UIKit 0x3041944c 0x303df000 + 238668
16 UIKit 0x303eed74 0x303df000 + 64884
17 UIKit 0x303ed564 0x303df000 + 58724
18 CoreFoundation 0x2dc30f1a 0x2db91000 + 655130
19 CoreFoundation 0x2dc303e2 0x2db91000 + 652258
20 CoreFoundation 0x2dc2ebd2 0x2db91000 + 646098
21 CoreFoundation 0x2db9946c 0x2db91000 + 33900
22 CoreFoundation 0x2db9924e 0x2db91000 + 33358
23 GraphicsServices 0x328d32e6 0x328cc000 + 29414
24 UIKit 0x3044e840 0x303df000 + 456768
25 ADme 0x0010c446 main (main.m:16)
26 libdyld.dylib 0x384bbab2 0x384ba000 + 6834
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x385716e4 0x3855f000 + 75492
1 ADme 0x0011ccd4 CLSSignalHandler (CLSSignal.m:305)
2 libsystem_platform.dylib 0x385d4720 0x385d1000 + 14112
3 libsystem_pthread.dylib 0x385d9a4e 0x385d6000 + 14926
4 libsystem_c.dylib 0x38523028 0x384d9000 + 303144
5 libc++abi.dylib 0x3797198a 0x37971000 + 2442
6 libc++abi.dylib 0x3798a6e2 0x37971000 + 104162
7 libobjc.A.dylib 0x37fc2936 0x37fba000 + 35126
8 libc++abi.dylib 0x379881b0 0x37971000 + 94640
9 libc++abi.dylib 0x37987d12 0x37971000 + 93458
10 libobjc.A.dylib 0x37fc280a 0x37fba000 + 34826
11 CoreFoundation 0x2db994e2 0x2db91000 + 34018
12 CoreFoundation 0x2db9924e 0x2db91000 + 33358
13 GraphicsServices 0x328d32e6 0x328cc000 + 29414
14 UIKit 0x3044e840 0x303df000 + 456768
15 ADme 0x0010c446 main (main.m:16)
16 libdyld.dylib 0x384bbab4 0x384ba000 + 6836
Thread 1:
0 libsystem_kernel.dylib 0x3855f838 0x3855f000 + 2104
1 libdispatch.dylib 0x384ae0d0 0x384a6000 + 32976
2 libdispatch.dylib 0x384a861e 0x384a6000 + 9758
Thread 2:
0 libsystem_kernel.dylib 0x38572c7c 0x3855f000 + 81020
1 libsystem_pthread.dylib 0x385d6e06 0x385d6000 + 3590
2 libsystem_pthread.dylib 0x385d6cc0 0x385d6000 + 3264
Thread 3 name: com.crashlytics.MachExceptionServer
Thread 3:
0 libsystem_kernel.dylib 0x3855fa84 0x3855f000 + 2692
1 libsystem_kernel.dylib 0x3855f87c 0x3855f000 + 2172
2 ADme 0x001101e6 CLSMachExceptionServer (CLSMachExceptionInterface.c:179)
3 libsystem_pthread.dylib 0x385d8c5a 0x385d6000 + 11354
4 libsystem_pthread.dylib 0x385d8bca 0x385d6000 + 11210
5 libsystem_pthread.dylib 0x385d6ccc 0x385d6000 + 3276
Thread 4:
0 libsystem_kernel.dylib 0x38572c7c 0x3855f000 + 81020
1 libsystem_pthread.dylib 0x385d6e06 0x385d6000 + 3590
2 libsystem_pthread.dylib 0x385d6cc0 0x385d6000 + 3264
Thread 5:
0 libsystem_malloc.dylib 0x385978a6 0x38597000 + 2214
1 CoreFoundation 0x2db93be2 0x2db91000 + 11234
2 IOKit 0x2e9595f0 0x2e944000 + 87536
3 IOKit 0x2e95b9c0 0x2e944000 + 96704
4 IOKit 0x2e96526c 0x2e944000 + 135788
5 IOKit 0x2e97ae78 0x2e944000 + 224888
6 libdispatch.dylib 0x384a70ac 0x384a6000 + 4268
7 libdispatch.dylib 0x384ab8ee 0x384a6000 + 22766
8 IOKit 0x2e97ae1e 0x2e944000 + 224798
9 IOKit 0x2e965230 0x2e944000 + 135728
10 IOKit 0x2e95f35a 0x2e944000 + 111450
11 CoreFoundation 0x2dc25b7e 0x2db91000 + 609150
12 CoreFoundation 0x2dc30774 0x2db91000 + 653172
13 CoreFoundation 0x2dc3070e 0x2db91000 + 653070
14 CoreFoundation 0x2dc2eeda 0x2db91000 + 646874
15 CoreFoundation 0x2db9946c 0x2db91000 + 33900
16 CoreFoundation 0x2dbdd0d6 0x2db91000 + 311510
17 CoreMotion 0x2e251364 0x2e218000 + 234340
18 libsystem_pthread.dylib 0x385d8c5a 0x385d6000 + 11354
19 libsystem_pthread.dylib 0x385d8bca 0x385d6000 + 11210
20 libsystem_pthread.dylib 0x385d6ccc 0x385d6000 + 3276
Thread 6 name: com.apple.coremedia.player.async
Thread 6:
0 libsystem_kernel.dylib 0x3855fad4 0x3855f000 + 2772
1 libdispatch.dylib 0x384acde0 0x384a6000 + 28128
2 MediaToolbox 0x2f088a0a 0x2f084000 + 18954
3 CoreMedia 0x2e1c5214 0x2e1a0000 + 152084
4 libsystem_pthread.dylib 0x385d8c5a 0x385d6000 + 11354
5 libsystem_pthread.dylib 0x385d8bca 0x385d6000 + 11210
6 libsystem_pthread.dylib 0x385d6ccc 0x385d6000 + 3276
Thread 7:
0 libsystem_kernel.dylib 0x38572c7c 0x3855f000 + 81020
1 libsystem_pthread.dylib 0x385d6e06 0x385d6000 + 3590
2 libsystem_pthread.dylib 0x385d6cc0 0x385d6000 + 3264
Thread 8 name: com.apple.NSURLConnectionLoader
Thread 8:
0 libsystem_kernel.dylib 0x3855fa84 0x3855f000 + 2692
1 libsystem_kernel.dylib 0x3855f87c 0x3855f000 + 2172
2 CoreFoundation 0x2dc30554 0x2db91000 + 652628
3 CoreFoundation 0x2dc2ec74 0x2db91000 + 646260
4 CoreFoundation 0x2db9946c 0x2db91000 + 33900
5 CoreFoundation 0x2db9924e 0x2db91000 + 33358
6 Foundation 0x2e5d44bc 0x2e57c000 + 361660
7 Foundation 0x2e649c32 0x2e57c000 + 842802
8 libsystem_pthread.dylib 0x385d8c5a 0x385d6000 + 11354
9 libsystem_pthread.dylib 0x385d8bca 0x385d6000 + 11210
10 libsystem_pthread.dylib 0x385d6ccc 0x385d6000 + 3276
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x3a397048
r4: 0x0026bff8 r5: 0x27d063e4 r6: 0x27d06424 r7: 0x27d063c4
r8: 0x00000003 r9: 0x3a39fe30 r10: 0x00000006 r11: 0x00000000
ip: 0x00000025 sp: 0x27d063a8 lr: 0x0011ccd9 pc: 0x385716e4
cpsr: 0x00000010
Binary Images:
0xfd000 - 0x230fff ADme armv7s <28b89d0e97d330a181b6080f2689bc3c> /var/mobile/Applications/D243F9B0-0750-4B67-9380-3D1DCDBA5828/ADme.app/ADme
I cannot replicate the crash, it doesn't happen on my iphone 5s nor on the simulator
** EDIT ** Further investigations help me detect the error. It's not the iphone 5 the problem. I Have the crash on this method
-[FBSession reauthorizeWithPermissions:isRead:behavior:defaultAudience:completionHandler:]
and it happens with every other Facebook account (except for mine). Of course i remembered to allow Facebook app access to general public.
User contributions licensed under CC BY-SA 3.0