System.out.println("Asking iOS for accounts");
final ACAccountType twitterType = accountStore.getAccountType(Accounts.AccountTypeIdentifierTwitter());
accountStore.requestAccessToAccounts(twitterType, new VoidBlock2<Boolean, NSError>() {
@Override
public void invoke(Boolean granted, NSError error) {
if (granted) {
DispatchQueue.getMainQueue().sync(new Runnable() {
@Override
public void run() {
System.out.println("main thread!");
}
});
}
}
});
System.out.println("Done with accounts");
requestAccessToAccounts will call back on a separate thread). I have annotated (with atos) the addresses that were not automatically symbolicated. If I remove the DispatchQueue block, the VoidBlock happily runs without crashing, so I suspect I have an issue in how I am trying to queue work on the main thread.
Any help much appreciated; I've spent quite a few hours both experimenting and Googleing for answers to no avail.
Crash Log
Thread 5 name: Dispatch queue: com.apple.root.default-priority
Thread 5 Crashed:
0 libsystem_kernel.dylib 0x3130132c __pthread_kill + 8
1 libsystem_c.dylib 0x339fe208 pthread_kill + 48
2 libsystem_c.dylib 0x339f7298 abort + 88
3 twiosreverseauth 0x0059de40 0x8d000 + 5312064 rvmAbort
4 twiosreverseauth 0x0059cbf8 0x8d000 + 5307384 rvmRaiseException
5 twiosreverseauth 0x003284d2 0x8d000 + 2733266 [j]org.robovm.apple.accounts.ACAccountStore$$BlockMarshaler0.invoked(Lorg/robovm/objc/ObjCBlock;ZLorg/robovm/apple/foundation/NSError;)V[callback]
6 Accounts 0x3391cd1e __block_global_6 + 42
7 libdispatch.dylib 0x3026ac52 _dispatch_call_block_and_release + 6
8 libdispatch.dylib 0x302767b4 _dispatch_worker_thread2 + 256
9 libsystem_c.dylib 0x339b9df4 _pthread_wqthread + 288
10 libsystem_c.dylib 0x339b9cc8 start_wqthread + 0
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: Loading view
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: viewWillAppear()
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: refreshTwitterAccounts() - start
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: Asking iOS for accounts
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: twitterType = Twitter
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: Done with accounts
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: refreshTwitterAccounts() - end
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: viewDidAppear()
Aug 1 00:30:37 iPhone UIKitApplication:twiosreverseauth[0xd29d][875] <Notice>: Unhandled exception: java/lang/UnsatisfiedLinkError
Aug 1 00:30:37 iPhone ReportCrash[876] <Notice>: MS:Notice: Injecting: (null) [ReportCrash] (690.10)
Aug 1 00:30:38 iPhone ReportCrash[876] <Notice>: Formulating crash report for process twiosreverseauth[875]
Aug 1 00:30:38 iPhone com.apple.launchd[1] (UIKitApplication:twiosreverseauth[0xd29d][875]) <Warning>: (UIKitApplication:twiosreverseauth[0xd29d]) Job appears to have crashed: Abort trap: 6
Aug 1 00:30:38 iPhone SpringBoard[61] <Warning>: Application 'twiosreverseauth' exited abnormally with signal 6: Abort trap: 6
--
You received this message because you are subscribed to the Google Groups "RoboVM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robovm+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
accountStore.requestAccessToAccounts(twitterType, new VoidBlock2<Boolean, NSError>() {
@Override
public void invoke(Boolean granted, NSError error) {
try {
if (granted) {
DispatchQueue.getMainQueue().sync(new Runnable() {
@Override
public void run() {
System.out.println("main thread!");
}
});
}
} catch(Exception e) {
e.printStackTrace();
}
}
});
Thread 2 Crashed:
0 libsystem_kernel.dylib 0x3bd3a1f0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x3bda4792 pthread_kill + 54
2 libsystem_c.dylib 0x3bceafd8 abort + 72
3 accountscrash 0x0060d2e6 0xf8000 + 5329638 (rvmAbort)
4 accountscrash 0x0060bf3e 0xf8000 + 5324606 (rvmRaiseException)
5 accountscrash 0x00395b20 0xf8000 + 2743072 ([j]org.robovm.apple.accounts.ACAccountStore$$BlockMarshaler0.invoked(Lorg/robovm/objc/ObjCBlock;ZLorg/robovm/apple/foundation/NSError;)V[callback])
6 libdispatch.dylib 0x3bc5f830 _dispatch_call_block_and_release + 8
7 libdispatch.dylib 0x3bc619a6 _dispatch_async_redirect_invoke$VARIANT$up + 106
8 libdispatch.dylib 0x3bc7291c _dispatch_root_queue_drain + 220
9 libdispatch.dylib 0x3bc72b1c _dispatch_worker_thread2 + 52
10 libsystem_pthread.dylib 0x3bda1bd0 _pthread_wqthread + 296
11 libsystem_pthread.dylib 0x3bda1a94 start_wqthread + 4
/Users/mpr/robovm/bin/robovm -verbose -skipsign -config /Users/mpr/src/robovm-apps/accounts-crash-example/robovm.xml -plist /Users/mpr/src/robovm-apps/accounts-crash-example/Info.plist.xml -arch thumbv7 -os ios -cp /Users/mpr/robovm/lib/robovm-rt.jar:/Users/mpr/robovm/lib/robovm-objc.jar:/Users/mpr/robovm/lib/robovm-cocoatouch.jar:/Users/mpr/src/robovm-apps/accounts-crash-example/bin -d out -o accountscrash -createipa accountscrash