-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New animation related crashes #517
Comments
Thanks for the bug report. Can you grab the HRESULT from the second frame in the call stack? Also, can you please try to repro after adding noexcept to the lambdas on these two lines? For example; similar to this line: |
The HRESULT is E_INVALIDARG. I'm just building those changes now. |
Unfortunately, I still get the exact same crash stack after doing a clean debug build with those changes. Should mention this apparently happens on a GC of some kind - about 6 seconds after a bunch of deallocations associated with popping a few view controllers off the UINavigationController stack (not in response to user interaction). |
May have a different crash stack (now on app startup) with a release build with the added noexcept changes. I'm going to ensure I'm dealing with a clean release build before posting the stack. |
Here's a different crash stack from a release build (HRESULT is E_INVALIDARG)
As a sanity test (should have done this first!) I'm also getting the same crash stack with the latest winobjc.zip release (so it's not something silly like linking the wrong .obj file)
I'm going to play around a bit with those noexcept changes + look a bit more at the places in my app apparently causing the issue. One case may be related to changing a visible UIImageView's image |
I don't think the
Haven't tried setting a breakpoints in that lambda etc yet. |
Looks like the lambda needs to check if the task is cancelled before doing anything - seeing if I've got a clean fix. |
Taking off for today but this change is not the right fix -- app just hangs or rather stays idle (probably something isn't firing):
|
I don't understand why the task is getting canceled though, because we're definitely not doing any PPL cancelations. Maybe the RenderAsync is failing with a Platform::Exception? We'll follow up in a bit with another suggested change to try. Thanks for the details. |
If I use this patch:
to step into the RenderAsync I get the following stack (though curiously setting the breakpoints seems to cause the crash to happen at an earlier point in my app):
error is RPC_E_WRONG_THREAD. And then if I continue, I'll hit the breakpoint in the .then lambda where I can see the task is cancelled. At this point I still don't think I'm doing something silly in my app (like dispatching an animation off the main thread.....) |
@ehren thanks for the details. The RPC_E_WRONG_THREAD is because you have used a lambda without specifying the continuation task context to use. You need to specify task_continuation_context::use_current for the lambda to execute on the thread it was called on. Can you try the below patch and let me know how it goes?
|
@jaredhms that works perfectly! |
Sorry meant @mnithish Thanks! |
Great, thanks for testing it out @ehren. We will make sure this goes into our next week's drop. |
This change fixes crash in WinRT RenderAsync when an invalid Layer is passed to it. Though the API was doing the same before, PPL task chaining change for the fiber-less UI exposed this issue as the exception now gets propogated through the chain. Fixes #517
I don't have any steps to reproduce. These happen in a few different places in my app (always the same call stack). Guessing this is somehow related to fd809e0 but can't say if modifications to my app will bypass the issue at this point.
crash 1 stack:
Debug build output:
The text was updated successfully, but these errors were encountered: