×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    2

    Issue with WP7 NavigationService.Navigate on Lumia 900

    Hi
    We have noticed a difference how Nokia Lumia 900 device operates when compared to Windows Phone 7.1 development emulator and real HTC device (HTC Trophy). We are developing Silverlight + XNA application for Windows phone 7.1 (Mango). We have noticed that NavigationService.Navigate produces crashes on Lumia 900 devices that we are not getting on emulator or with HTC devices. Our program uses multiple different xaml -pages and we move between pages using navigationService as follows e.g.

    (1)
    Code:
     NavigationService.Navigate(new Uri("/Results_Page.xaml", UriKind.Relative));
    We cannot use NavigationService.GoBack since application logic is somewhat complex and we might need to jump to different page where we originally came from. Therefore we are making sure that there are no extra backEntries or any other trash that could cause issues when navigating (this seems to be the case on emulator/HTC). Now what happens on Lumia 900 is that navigation works quite nicely in the begging, but when memory loads are getting bigger (this is my assumption only) the above code (1) causes the program to crash. This crash is specific to Lumia 900 device and it does not occur in HTC -device nor in WP7 emulator. Below a partial stacktrace

    Code:
    JuJu_Race.dll!JuJu_Race.App.RootFrame_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e) Line 140	C#
     	Microsoft.Phone.dll!System.Windows.Navigation.NavigationService.RaiseNavigationFailed(System.Uri uri, System.Exception exception) + 0x52 bytes	
     	Microsoft.Phone.dll!System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(System.IAsyncResult result) + 0x145 bytes	
     	Microsoft.Phone.dll!System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(System.AsyncCallback userCallback, System.Windows.Navigation.PageResourceContentLoader.PageResourceContentLoaderAsyncResult result) + 0x116 bytes	
     	Microsoft.Phone.dll!System.Windows.Navigation.PageResourceContentLoader.BeginLoad.AnonymousMethod__0(object args) + 0x11 bytes	
     	mscorlib.dll!System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo rtmi, object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object parameters, System.Globalization.CultureInfo culture, bool isBinderDefault, System.Reflection.Assembly caller, bool verifyAccess, ref System.Threading.StackCrawlMark stackMark)	
     	mscorlib.dll!System.Reflection.RuntimeMethodInfo.InternalInvoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture, ref System.Threading.StackCrawlMark stackMark) + 0x168 bytes	
     	mscorlib.dll!System.Reflection.MethodBase.Invoke(object obj, object[] parameters) + 0xa bytes	
     	mscorlib.dll!System.Delegate.DynamicInvokeOne(object[] args) + 0x98 bytes	
     	mscorlib.dll!System.MulticastDelegate.DynamicInvokeImpl(object[] args) + 0x8 bytes	
     	mscorlib.dll!System.Delegate.DynamicInvoke(object[] args) + 0x2 bytes	
     	System.Windows.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0xc bytes	
     	System.Windows.dll!System.Windows.Threading.Dispatcher.Dispatch(System.Windows.Threading.DispatcherPriority priority) + 0x83 bytes	
     	System.Windows.dll!System.Windows.Threading.Dispatcher.OnInvoke(object context) + 0x8 bytes	
     	System.Windows.dll!System.Windows.Hosting.CallbackCookie.Invoke(object[] args) + 0x19 bytes	
     	System.Windows.dll!System.Windows.Hosting.DelegateWrapper.InternalInvoke(object[] args) + 0x2 bytes	
     	System.Windows.RuntimeHost.dll!System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(System.IntPtr pHandle, int nParamCount, System.Windows.Hosting.NativeMethods.ScriptParam[] pParams, ref System.Windows.Hosting.NativeMethods.ScriptParam pResult) + 0x5e bytes
    Code:
     
    Exception	{"The type 'JuJu_Race.Results_Page', specified in the x:Class of '/Results_Page.xaml' could not be found in any loaded assembly."}
    System.Exception {System.InvalidOperationException}
    
    AbsolutePath	'((System.Windows.Navigation.NavigationService)(sender))._currentSource.AbsolutePath' threw an exception of type
    'System.InvalidOperationException' string {System.InvalidOperationException}
    Interesting is that the above call works just nicely at first but after awhile it crashes. This issue is not specific to Results_Page.xaml. Any navigation will cause this (after a certain time). We need some kind of workaround to this. Our application is almost release ready we just need to get this fixed.

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2012
    Posts
    88

    Re: Issue with WP7 NavigationService.Navigate on Lumia 900

    This is weird, but this looks specific to your application, Is your code obfuscated ? Are you using any external assemblies on your page (Coding4Fun, or Telerik for example ) ?
    Does it happen if you try to navigate from the xaml ?
    Code:
    <i:Interaction.Triggers>
        	<i:EventTrigger EventName="Click">
                                <ec:NavigateToPageAction TargetPage="/Results_Page.xaml"/>
                    </i:EventTrigger>
     </i:Interaction.Triggers>

  3. #3
    Registered User
    Join Date
    May 2012
    Posts
    23

    Re: Issue with WP7 NavigationService.Navigate on Lumia 900

    Hi,
    You can try to use behaviours for the page navigation. Have you try to simplify your XAML pages for test? Keep just "LayoutRoot" and try to navigate.
    Run the performance analyser, if you have memory link or something like that, this could be helpfull.

  4. #4
    Registered User
    Join Date
    Dec 2012
    Posts
    2

    Re: Issue with WP7 NavigationService.Navigate on Lumia 900

    The issue was resolved. We reduced the size of the XAP -file and now everything works nicely. It seems that memory management in Lumia might not be as good as in HTC? Funny thing is that our peak memory usage was below 50% (but close). We are targeting the app for 512MB devices anyway.

    Thank you for your responses.

Similar Threads

  1. My Lumia 800 developer device screen issue
    By pigling in forum Windows Phone General
    Replies: 4
    Last Post: 2012-09-16, 12:15
  2. wifi issue with lumia 800
    By hclchd in forum General Development Questions
    Replies: 5
    Last Post: 2012-02-14, 10:21
  3. How to navigate in Qt
    By siddugh in forum [Archived] Qt SDKs and Tools
    Replies: 3
    Last Post: 2010-12-09, 09:30
  4. How to navigate in Qt
    By siddugh in forum [Archived] Qt SDKs and Tools
    Replies: 0
    Last Post: 2010-12-09, 06:26
  5. how to navigate to next form.
    By abhimanyu1 in forum Symbian
    Replies: 1
    Last Post: 2009-08-24, 08:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×