-
Notifications
You must be signed in to change notification settings - Fork 287
Conditional Operator in ExpressionAnimation causing system crashing error #19
Comments
Can confirm, same happens here. (Tested on Lumia 950, latest stable (not-insider) OS version.) |
Thanks @JustinXinLiu @tomzorz. We'll get some folks to take a look at it. Just to clarify: Found on build(s): 10586, 14527
Expected Results: Actual Results: |
Yes that's right thanks @pgills! |
Hey @JustinXinLiu! Sorry for the delay on getting back to you on this. We have a hunch on what you're running into - to verify, can you try the following out for us: In your ternary operator, remove the parentheses you added in to make it work and add in your condition portion a sequence of nested 0's such as [...] + (0 + (0 + (0 + (0 + (0+0))))). (The more complex your "if true" and "if false" portions are, increase the number of nested 0's in the condition) So in your example above, it will look like A < 0 + (0 + (0 + (0 + (0 + (0+0))))) ? B + C: B + D. Let us know what happens. Thanks! |
@patsiu you guys must have found the issue! After I added |
Awesome - thanks for verifying @JustinXinLiu ! We have a fix for this issue, which will come in a future insider build. Until then, use the nested 0's model as a temporary workaround (especially with more complex ternary operators). |
Sure thanks guys! I will close the issue once the new build comes out. |
Hey guys looks like the issue has been fixed in build 14267? I just updated my PC and it no longer crashes. So I am closing it now. |
Thanks @JustinXinLiu. |
A couple of days ago I pushed an animated
Tab
control to GitHub and it was built in the last Windows 10 Insider build14527
. As you swipe left or right on the control, the headers are fade in/out accordingly and the header underline follows the selected header too. Yes, it's made with Composition. I really like it. :)Today when I tried to run the project on the same touch-enabled machine, as soon as I did a swipe on the control, the whole Windows 10 OS went black. After a couple of minutes it came back to life but the machine seemed to be restarted and the resolution was set to the lowest, so I thought this might just be a video card failure and shouldn't have anything to do with the project.
I was wrong. The machine just kept crashing as soon as I touched the control. I then tried it on my phone (build 10.0.10586.107), same result - the phone just restarted.
This might have something to do with the any of the following updates that are installed in the last couple of days, I'm not 100% sure.
After spending a couple of hours debugging, I managed to make the crash go away, on both my PC and phone. However, I am not exactly sure what's causing this. This could be a build issue but I was using the same build when I developed it and it was working fine.
Anyway, this is what I've found -
If you use Conditional Operator Expression (i.e.
?
&:
) inside yourExpression
, you have to make sure that you wrap any expression that has more than one members with round brackets ((...)
).For example,
(A < 0) ? (B + C) : (B + D)
works fine on both PC and phone.A < 0 ? B + C : B + D
crashes on both PC and phone.Hopefully this can help you guys narrow down the issue!
The text was updated successfully, but these errors were encountered: