i've been struggling week bug in published uwp app seems manifest in release mode when deployed on phones (arm target). randombly crashes app when navigating 1 specific page another. affects 2 specific pages, if structure identical many others in project never show behavior (usage of onnavigatedto , onloaded present content , fill viewmodel, etc)
the clue have (since i'm unable full stacktrace) error message, able great difficulty trial , error:
it seems pretty generic , i've tried several things found when looking it:
- ensuring ivalueconverters never return null or unexpected values.
- ensuring no variables left uninitialized.
- ensuring ui loaded before accessing of components.
- ensuring there no ui manipulations outside of dispatcher thread.
- updating project libraries (newtonsoft json , winfbsdk, while latter not used in neither of views).
after lot of reading tried fiddle compilation options in project settings, , found out offending configuration having activated both .net native toolchain compilation , code optimization checkboxes. managed reproduce crash in debug mode options activated (basically playing app until randomly bug appear) due precisely settings being activated, got no stacktrace. debugger breaks on unhandled xaml exception line , sender , e arguments of method launches "not accesible @ moment".
on other hand, got few minidumps on phone unable debug in visual studio 2015. can't find kenelbase.pdb symbols, if have microsoft symbol servers checked on configuration.
i can't upload app store if left .net native compilation option checked (it seems need both, website throws error during validation otherwise), users run bug. if has pointers or ideas, grateful.
edit0:
vs enterprise 2015, w10m compilation 10586.107 running on lumia 925. wish i'd knew why doesn't update .164, though.
edit1:
i have noticed when crash happens, none of several images have on view loaded. there bitmapicons loaded bundled content (png) , 2 images loaded network using ivalueconverter turn them bitmapimage , therefore, imagesources. have checked , rechecked converter nulls , exceptions, should clear.
edit2:
parent view, event triggers navigation:
private void sessionlist_itemclick(object sender, itemclickeventargs e) { frame.navigate(typeof(clubpage), e.clickeditem); // collection binded, clicked item model }
code executed on crashing view:
private void clubpage_loaded(object sender, routedeventargs e) { isinfoshowing = false; islogozoomed = false; compositor = elementcompositionpreview.getelementvisual(sender uielement).compositor; visual status = elementcompositionpreview.getelementvisual(statusblock); status.opacity = 0.0f; clubviewmodel.current.showin = false; clubviewmodel.current.showcoming = false; } protected override async void onnavigatedto(navigationeventargs e) { if (e.parameter != null) { clubviewmodel.current.club = e.parameter club; splitviewshellviewmodel.current.title = clubviewmodel.current.club.name.replace("_", " "); splitviewshellviewmodel.current.titlebaropacity = 1.0f; clubviewmodel.current.inlimit = app.refreshlimit; clubviewmodel.current.cominglimit = app.refreshlimit; await clubviewmodel.current.getclub(); //i'm positive until point code executed await clubviewmodel.current.getpeoplein(); await clubviewmodel.current.getclubnotifications(); } }
edit3:
activating native debugging gives me following stacktrace. exception raised when dispatchertimer ticks (i have none in view, internal). besides that, couldn't make sense of it.
i have tried think of , refactored whole view. "strange" thing i'm doing listview inside container breaks virtualization, i'm not concerned performance list small.
this incredibly odd (for me @ least), apparently navigation code shown above wasn't executing on dispatcher thread...even if triggered ui event. sending call dispatcher follows did trick:
private async void sessionlist_itemclick(object sender, itemclickeventargs e) { await dispatcher.runasync(coredispatcherpriority.normal, () => frame.navigate(typeof(clubpage), e.clickeditem)); }
identical code (without explicit dispatcher.runasync wrapper) spread across whole app works expected. every time i've run ui thread issues exceptions thrown managed , easy reproduce...what possibly happening during compiler optimization process trigger this?
Comments
Post a Comment