Windows RT: NullReferenceException when using NavigationService without parameters

Topics: Bugs
Nov 13, 2012 at 3:00 PM

I was trying to use caliburn with a Windows RT app, but got an NullReferenceExecption when trying to use the Navigation without query parameters:

In the FrameAdapter class (INavigationService.cs) in the method TryInjectParameters:

var uri = new Uri((string)parameter);

var decorder = new WwwFormUrlDecoder(uri.Query);

WwwFormUrlDecoder throw the NullReferenceException if uri.Query is an Empty String "".

I placed the entire parameter processing in a "if (!string.IsNullOrEmpty(uri.Query))", to avoid getting the Exception

Keep up the good work :-)

Best regards,

Nov 13, 2012 at 10:16 PM

If you can submit a pull request for that fix today or tomorrow...I can get that fix into this release...which is happening in the next couple of days.

Nov 14, 2012 at 9:39 PM

I've pushed the fix for this, sorry about that.

Nov 14, 2012 at 10:29 PM

Thanks! Hoping to release tomorrow...