SetFinalSizeMaxDiscrepancy getting stuck in an infinite loop in .NET 4.7.1 RRS feed

  • Question

  • I’ve received several dump files from my customers where the top of the call stack is in either in  SetFinalSizeMaxDiscrepancy, or a function that SetFinalSizeMaxDiscrepancy is calling.  It appears that it is stuck in the 

    for (bool runPhase2and3=true; runPhase2and3; )

    loop.  I can’t step through the code, so tracing down why it is stuck is very difficult.  Has anybody else run into this problem?



    Wednesday, May 2, 2018 9:48 PM

All replies

  • Hi Dan,

    The SetFinalSizeMaxDiscrepancy method is a new implementation, as of 4.7.

    >>I've received several dump files from my customers

    It's hard to help if we don't know the details of project, like UI XAML, steps to reproduce, environment.

    We notice that the Telemetry Bug Tracker has filed a Busy Hang failure in PresentationFramework.dll recently, if we can get the dump file you mentioned, it will be helpful to locate this root cause.

    Because forum is a public place to discuss issues with insensitive information. So it will be great to open a support ticket:

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 3, 2018 3:20 AM
  • Thanks.  The project is a fairly involved WPF desktop application.  It is hard to replicate the hang, but I have plenty of dump files to provide as examples.  I'll open a support ticket and get them to you.
    Thursday, May 3, 2018 1:48 PM
  • Franklin,

    I have not had any response to my support ticket.  I'm at Build this week.  Is there anybody here that I can show this problem to?


    Monday, May 7, 2018 5:27 PM
  • Hi Dan,

    We have involved other resources to help figure out your issue.

    Besides, how did you open support ticket? Could you share the ticket ID or ticket title with us?

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, May 9, 2018 6:09 AM
  • I can reproduce this bug reliably in Framework 4.7.2 ... And it was not hard to hit!

    I have created a repository on GitHub with a simple project that will reliably hang. It is here:

    ... In fact, it requires using a DependencyProperty, which I ONLY used in code (not in XAML --- and it so happens to be defined on a UIElement and not a FrameworkElement; don't know it that also contributes).

    It MIGHT require also having some Windows Text Scaling set --- it is set to 113% on this machine ...

    The referenced support ticket is here:

    Saturday, September 29, 2018 11:46 AM