c# - Intermittent application hang on startup in Windows Store App -


i developing windows store application. currently, getting intermittent hangs described in this blog post. issue appears not enough space given remainder-defined column widths , textblocks attempting format (possibly due ellipsis processing). app tends hang indefinitely when happens.

the question have less related how solve issue (as seems described in blog post), instead how find issues. have 1 regularly (approximately 1 in 5 or ten start-ups) on hub page, i've been looking through there (as it's notable instance of issue), it's true heisenbug in never seems happen when debugging (or when it).

so, how find offending code? there pattern need (columnwidth="*"?). there simpler way solve this, such changing base style remove 1 of possibly offending properties listed in blog post?

it seems possible being caused issue, seems likely/plausible of right (as hubs have similar situation being described there).

also, there way track when happens in wild? msft provides crash dumps on hangs, seem give little no information in them @ (and on top of appear 5 days after happen, less ideal).

thanks!

this complicated question answer.

first, think have identified real problem winrt. theorize layout subsystem seems busy calculating layout, , based on condition occurs around 20% of time not finish in reasonable time. reasonable guess.

the problem, then, when such event not occur during debug. in personal development experience, errors not occur in debug 99.99% timing related. not finishing before second process begins. debugging lets first, long process finish.

this real computer science question, , not winrt or windows 8 question. end, best answer can give without code samples (why no code samples?) typical approach employ when reach same dilemma. hope helps, @ least little.

start brain.

i have joked developers how debugging can done outside debugger - , in mind. mentally walking pipeline of app , looking race-condition dependencies might cause deadlocks. believe or not, solves lot of problems debugger never catch - because debuggers unwind timing dependencies.

next simplicity.

the more complex problem less find culprit. in case of xaml application, tend remove or disable value converters first. then, remove data templates. if have element bindings, go next. if simplifying xaml - that's beginning figuring out. if doesn't, things got easier.

your code behind can disabled few keystrokes , found guilty or innocent. it's place problem, find, , reason work hard keep simple, clean, , minimal. after that, there's view model. though it's not impossible view model one, , indeed still have check, it's not root of evil.

lastly, there's app pipeline loads page, loads data, or else. step step real option remove things app until don't see problem. removing problem, though not solving it. that's case case thing based on app , logic in it. reality is, might see problem leave when removing xaml, while real problem in view model or elsewhere.

what saying? silver bullet asking isn't there. there several microsoft tools , more third party tools bottlenecks, latency problems, slow code, , stuff - in reality, scenario describe plain ole programming. not saying aren't victim of bug. i'm saying, information have, can you.

you'll it.

third thing add logging, , instrumentation app.

best of luck.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -