I have a Win 8.1 app (part of a universal app project) that crashes when I interact with a SearchBox control on the only page in the app. The problem exhibited itself in a larger app which I have cut down to a single page example app that
has no external dependencies. I can make the app fail every time.
The app has a single page that contains 1 SearchBox control. The app does not implement the search contract. When I add search suggestions in a certain order the app fails with an unhandled exception in the code generated for the Application
class. This is the sequence of interaction that causes the crash:
Type a character in the SearchBox which causes 3 strings to be appended to the SearchSuggestionsCollection in the SuggestionsRequested event handler.
Type a second character causing 1 string to be appended.
Type a third character. The 3 characters match nothing so nothing is appended to the SearchSuggestionsCollection.
Type backspace causing 1 string to be appended.
Type another backspace causing 3 string to be appended.
Type another backspace which causes the query string passed to the SuggestionsRequested event handler to be empty. Nothing is appended to the SearchSuggestionsCollection by the handler.
The app crashes with an unhandled exception. The exception message is: Incorrect parameter.
I have the solution that exhibits this behavior and will be happy to send it.