iOS 11 Crash on EventKitUI -[EKCalendarChooser _selectAllCalendarsAndStores:] - ios11

This crash only happens on iOS 11, I have no idea how to fix it.
The crash happens when tapping on the [Show All] button on the new toolbar for iOS 11's EKCalendarChooser class, but while it's selectionStyle set to .single:
Fatal Exception: NSInternalInconsistencyException Invalid style
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x1830e3d38 __exceptionPreprocess
1 libobjc.A.dylib 0x1825f8528 objc_exception_throw
2 CoreFoundation 0x1830e3c0c +[NSException raise:format:]
3 Foundation 0x183a72c24 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 EventKitUI 0x1941ad908 -[EKCalendarChooser _selectAllCalendarsAndStores:]
5 EventKitUI 0x1941a6384 -[EKCalendarChooser showAllButtonPressed]
6 UIKit 0x18c52820c -[UIApplication sendAction:to:from:forEvent:]
7 UIKit 0x18c68253c -[UIBarButtonItem(UIInternal) _sendAction:withEvent:]
8 UIKit 0x18c52820c -[UIApplication sendAction:to:from:forEvent:]
9 UIKit 0x18c52818c -[UIControl sendAction:to:forEvent:]
10 UIKit 0x18c512f4c -[UIControl _sendActionsForEvents:withEvent:]
11 UIKit 0x18c5130b4 -[UIControl _sendActionsForEvents:withEvent:]
12 UIKit 0x18c527a80 -[UIControl touchesEnded:withEvent:]
13 UIKit 0x18cb73ec8 _UIGestureEnvironmentSortAndSendDelayedTouches
14 UIKit 0x18cb6f488 _UIGestureEnvironmentUpdate
15 CoreFoundation 0x18308b8b8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
16 CoreFoundation 0x183089270 __CFRunLoopDoObservers
17 CoreFoundation 0x18308982c __CFRunLoopRun
18 CoreFoundation 0x182faa2d8 CFRunLoopRunSpecific
19 GraphicsServices 0x184e3bf84 GSEventRunModal
20 UIKit 0x18c557880 UIApplicationMain
21 MyApp1 0x104d92be4 main (AppDelegate.swift:15)
22 libdyld.dylib 0x182ace56c start
I wonder is there a way to hide the new toolbar?
=====
Edited on 19 Nov 2017
Screenshot added to show the new toolbar:
Once the selectedCalendars is left empty, the new toolbar is showing. Once the button [Show All] taps, the crash occurs.

I have encountered the same error and discovered a strange but surprisingly effective method of solving it. Turns out if you clear out the selected calendars set before presenting the view controller the toolbar disappears, thus protecting from the crash.
calendarChooser.selectedCalendars = Set();

Related

OnLayout is giving incorrect y value because it calculates before render is complete

I am building an instagram type app where I have one video playing at a time and which video is playing changes based on which video is closest to the middle of the screen. I have it setup in a way where it takes the initial position of every "post" and then calculates where it is onScroll by comparing the new scroll position to the original position of the post. Everything seems to be working fine except that the "posts" have a different starting position every time I refresh the page. I am using the exact same "posts" every time in the same order. You can see the problem in this log output. I have 7 posts, TCP: topCurrentPosition, BCP: bottomCurrentPosition.
index: 0 TCP: 0 BCP: 558
index: 1 TCP: 558 BCP: 1116
index: 2 TCP: 1116 BCP: 1674
index: 3 TCP: 1674 BCP: 2224.5
index: 4 TCP: 2540.5 BCP: 2698.5
index: 5 TCP: 2382.5 BCP: 2706
index: 6 TCP: 2706 BCP: 3029.5
Going from index 3 to 4 you can see that it doesn't do what you would expect it to do. I'm thinking that it's because onLayout runs before the images and or text is fully rendered which causes some problems. Has anyone ever run into this problem before?

How do I add Stockfish.js to my react (+ typescript) application?

I'm trying to build a chess application where you can play vs stockfish. I tried implementing stockfish with stockfish.js (github link) but I couldn't get it to work. I tried the following approaches:
Add stockfish to public folder and enable it in my index.html (With and without %PUBLIC_URL% and type):
When i tried using (window as any).STOCKFISH() it still did not work.
Add stockfish to public folder and use a webworker:
This got the following error:
abort(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f
I found out that 3c 21 44 4f means <!DO so that it probably can't find it.
Simply require it (var stockfish = require("stockfish"))
This didn't work neither.
I'm doing something wrong and it would be great if someone could help me with implementing this. Thanks in advance

Angular 2 RC.0 not working in IE 11

I have these packages importing:
angular/common
angular/compiler
angular/core
angular/http
angular/platform-browser
angular/platform-browser-dynamic
Beta 17 was working with IE shim:
node_modules/angular2/es6/prod/src/testing/shims_for_IE.js
node_modules/angular2/bundles/angular2-polyfills.min.js
node_modules/es6-shim/es6-shim.min.js
What is the equivalent of this for RC?
The order matters, it should be in this order
node_modules/zone.js/dist/zone.min.js
node_modules/reflect-metadata/Reflect.js
node_modules/es6-shim/es6-shim.min.js

error parsing app.yaml for GAE/Java when specifying servlet for handler

I'm trying to switch over to using app.yaml instead of web.xml and app-engine-web.xml. I've attempted to follow the documentation faithfully, but I'm getting an error from appconfig.cmd update <my-war-directory> that says
Reading application configuration data...
Bad configuration: Line 18, column 13: Error setting property 'handlers' on class: com.google.apphosting.utils.config.AppYaml
Caused by: Line 18, column 13: Error setting property 'handlers' on class: com.google.apphosting.utils.config.AppYaml
Please see the logs [C:\Users\<blah blah>\appcfg3710135744474388957.log] for further information.
In the indicated log file, I see a stack dump with the line:
com.google.appengine.repackaged.net.sourceforge.yamlbeans.tokenizer.Tokenizer$TokenizerException: Line 18, column 13: Found a mapping value where it is not allowed.
Here's my file (with line numbers manually added):
1 application: my-app
2 version: 1
3 runtime: java
4 threadsafe: true
5
6 public_root: /static
7
8 static_files:
9 - include: /**
10
11 welcome_files:
12 - index.html
13
14 system_properties:
15 java.util.logging.config.file: WEB-INF/logging.properties
16
17 handlers:
18 - url: /user/*
19 servlet: org.restlet.ext.servlet.ServerServlet
20 name: user
21 init_params:
22 org.restlet.application: com.my-app.server.resource.user.UserApplication
23 org.restlet.clients: HTTP HTTPS
After experimenting with some YAML validators on the web, I actually think it is complaining about line 19, where column 13 points to the ":" character after "servlet". But this usage looks totally consistent with the documentation at https://developers.google.com/appengine/docs/java/configyaml/appconfig_yaml#Required_Elements
I'm sure I'm doing something stupid, but I'm stumped.
Thank you for your great input AndyD! The documentation is updated to fix the problematic sample code.
For me, it is also very convenient to use some yaml validator to check the yaml files. For example:
http://data-lint.herokuapp.com/
Thanks.
As I noted above, the culprit was the indentation of lines 19-21 - they need to line up under the "u" in "url" from line 18.

Silverlight JetPack Theme Toolkit errors

After creating a new Silverlight application from the JetPack theme template that was installed, I try to follow the instructions provided in the App.xaml file about how to enable themeing of silverlight toolkit controls,
<!--
<ResourceDictionary Source="Assets/ToolkitStyles.xaml"/>
To extend this theme to include the toolkit controls:
1. Install the Silverlight Toolkit for Silverlight 4
2. Add a Toolkit control to your project from the toolbox. This will add references to toolkit assemblies.
3. Change the "Build Action" for ToolkitStyles.xaml to "Page"
4. Uncomment the resource dictionary include above.
If you do not intend to use toolkit controls, delete this comment and the ToolkitStyles.xaml file.-->
I follow the instructions correctly but the project now does not compile, here are the 39 or so errors it throws out.
I'm new to Silverlight (coming from MVC/jQuery) and it might be something I'm doing.
Error 40 An error occurred while finding the resource dictionary "Assets/ToolkitStyles.xaml". X:\Projects\ISMM\ISMM.SilverlightUI\app.xaml 18 17 ISMM.SilverlightUI
Error 20 Assembly 'System.Windows.Controls.DataVisualization.Toolkit' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1 603 ISMM.SilverlightUI
Error 19 Assembly 'System.Windows.Controls.Input.Toolkit' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1 421 ISMM.SilverlightUI
Error 39 The attachable property 'Effect' was not found in type 'Legend'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2204 38 ISMM.SilverlightUI
Error 34 The attachable property 'IsFieldGroup' was not found in type 'DataField'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1738 27 ISMM.SilverlightUI
Error 31 The attachable property 'LayoutTransform' was not found in type 'LayoutTransformer'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1619 38 ISMM.SilverlightUI
Error 13 The property 'IsFieldGroup' does not exist on the type 'Grid' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1738 27 ISMM.SilverlightUI
Error 11 The tag 'AccordionButton' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1622 38 ISMM.SilverlightUI
Error 2 The tag 'ButtonSpinner' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 565 26 ISMM.SilverlightUI
Error 3 The tag 'ButtonSpinner' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 665 26 ISMM.SilverlightUI
Error 4 The tag 'ButtonSpinner' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 896 26 ISMM.SilverlightUI
Error 16 The tag 'EdgePanel' does not exist in XML namespace 'clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2199 34 ISMM.SilverlightUI
Error 1 The tag 'ExpandableContentControl' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 365 34 ISMM.SilverlightUI
Error 12 The tag 'ExpandableContentControl' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1624 34 ISMM.SilverlightUI
Error 9 The tag 'LayoutTransformer' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1455 38 ISMM.SilverlightUI
Error 10 The tag 'LayoutTransformer' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1618 34 ISMM.SilverlightUI
Error 17 The tag 'Legend' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2203 34 ISMM.SilverlightUI
Error 5 The tag 'LinearClipper' does not exist in XML namespace 'clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Input.Toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 975 26 ISMM.SilverlightUI
Error 7 The tag 'ListTimePickerPopup' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1122 22 ISMM.SilverlightUI
Error 14 The tag 'ResourceDictionaryCollection' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1960 18 ISMM.SilverlightUI
Error 6 The tag 'TimePickerPopupTemplate' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1121 18 ISMM.SilverlightUI
Error 8 The tag 'TimeUpDown' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1230 26 ISMM.SilverlightUI
Error 15 The tag 'Title' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2193 30 ISMM.SilverlightUI
Error 37 The type 'dvp:EdgePanel' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2199 34 ISMM.SilverlightUI
Error 25 The type 'prim:LinearClipper' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 975 26 ISMM.SilverlightUI
Error 32 The type 'toolkit:AccordionButton' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1622 38 ISMM.SilverlightUI
Error 22 The type 'toolkit:ButtonSpinner' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 565 26 ISMM.SilverlightUI
Error 23 The type 'toolkit:ButtonSpinner' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 665 26 ISMM.SilverlightUI
Error 24 The type 'toolkit:ButtonSpinner' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 896 26 ISMM.SilverlightUI
Error 21 The type 'toolkit:ExpandableContentControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 365 34 ISMM.SilverlightUI
Error 33 The type 'toolkit:ExpandableContentControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1624 34 ISMM.SilverlightUI
Error 29 The type 'toolkit:LayoutTransformer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1455 38 ISMM.SilverlightUI
Error 30 The type 'toolkit:LayoutTransformer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1618 34 ISMM.SilverlightUI
Error 38 The type 'toolkit:Legend' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2203 34 ISMM.SilverlightUI
Error 27 The type 'toolkit:ListTimePickerPopup' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1122 22 ISMM.SilverlightUI
Error 35 The type 'toolkit:ResourceDictionaryCollection' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1960 18 ISMM.SilverlightUI
Error 26 The type 'toolkit:TimePickerPopupTemplate' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1121 18 ISMM.SilverlightUI
Error 28 The type 'toolkit:TimeUpDown' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1230 26 ISMM.SilverlightUI
Error 36 The type 'toolkit:Title' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2193 30 ISMM.SilverlightUI
Looks like Toolkit problems. What references have you got in the project?
There are quite a few assemblies that make up the toolkit. Looks like some of them it wants are 'System.Windows.Controls.DataVisualization.Toolkit' and 'System.Windows.Controls.Input.Toolkit'. The DockPanel is part of 'System.Windows.Controls.Toolkit' or something similar so that one might have been added when you dragged a DockPanel in.
I had a similar problem and I resolved it by adding references to System.Windows.Controls.Input.Toolkit and System.Windows.Controls.DataVisualization.Toolkit

Resources