Search code examples
androidxamarinmvvmcross

App crashes when navigating back to MvxTabsFragmentActivity


My Apps keeps crashing when navigating back to my MvxTabsFragmentActivity.

The MvxTabsFragmentActivity consists of 4 tabs all being the same type of Fragement loading the same View but with different ViewModels. The Fragements show a simple MvxListView with a command attached that opens a new ViewModel.

When navigating back the App crashes. logging with that:

03-04 16:07:09.530 I/ActivityManager( 414): Displayed MobileVision.Droid/MyApp.droid.views.SecondView: +5s373ms

03-04 16:07:10.870 I/mono-stdout( 2192): mvx:Diagnostic: 71.48 No view model association found for candidate view MyListFragment

03-04 16:07:10.942 I/mono-stdout( 2192): mvx:Diagnostic: 71.58 No view model association found for candidate view MyListFragment

03-04 16:07:11.010 I/mono-stdout( 2192): mvx:Diagnostic: 71.61 No ViewModel class specified for MyListFragment in LoadViewModel

03-04 16:07:11.386 I/Choreographer( 414): Skipped 32 frames! The application may be doing too much work on its main thread.

03-04 16:07:20.798 W/ActivityManager( 414): Launch timeout has expired, giving up wake lock!

03-04 16:07:20.818 E/WindowManager( 414): Starting window AppWindowToken{5292ce60 token=Token{52c32c18 ActivityRecord{529a544c u0 MyApp.Droid/MyApp.droid.views.FirsViewModelView t9}}} timed out

Anyone any solution/idea where to search? Because no exceptions are thrown anywhere.. :-(

PS: I build exactly the same clean and simple setup like FragmentSample, but then with a simple MvXListView in the Fragment to navigate to a new screen.

EDIT: - made logging litle more readable
- exceptions seems to happen with following scenario:

  1. OpenApp
  2. Navigate to other TAB
  3. Navigate to new activity (by Button or ListViewItem, doesn't matter)
  4. Navigate Back
  5. Crash / or repeat step 3 & 4

NOTE: when NOT doing step 2 (switch TAB) it seems the App won't Crash


Solution

  • answer came from @Stuart ; fixes in https://github.com/MvvmCross/MvvmCross/pull/915

    Currently NuGet package for FullFragging isn't working yet, need to build the FullFragging dll yourself for now.