ContextSwitchDeadlock Exception in MVVM

3 posts, 0 answers
  1. Mahmut
    Mahmut avatar
    22 posts
    Member since:
    Nov 2014

    Posted 10 Mar 2015 Link to this post

    I have a problem again :))) . Diagram has 1360 items and 1481 connections. When I connection type is polyline and RouteConnection property is true, throw ContextSwitchDeadlock Exception. If I make RouteConnection property false, then it doesn't throw exception, and working without any problem. How can I solve it?

    Thanks in advance.

    Exception Message:
    "The CLR has been unable to transition from COM context 0x20e480 to COM
    context 0x20e5f0 for 60 seconds. The thread that owns the destination
    context/apartment is most likely either doing a non pumping wait or
    processing a very long running operation without pumping Windows
    messages. This situation generally has a negative performance impact and
    may even lead to the application becoming non responsive or memory
    usage accumulating continually over time. To avoid this problem, all
    single threaded apartment (STA) threads should use pumping wait
    primitives (such as CoWaitForMultipleHandles) and routinely pump
    messages during long running operations."
  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1165 posts

    Posted 13 Mar 2015 Link to this post

    Hello Mahmut,

    I really want to assist you on your case. But to do that I need to reproduce the exception on our side because you are the first one reporting such issue. I tried to reproduce it by creating a project following the MVVM approach. This project hosted over 3000 shapes and 2000 links and the exception was not reproduced. This makes me think that the cause of the issue is not the number of the hosted items. It should be something else. But to trace it I will need a simplified project reproducing the exception.

    This is why I would like to kindly ask you to try to isolate the issue in a project and send it to us.

    Pavel R. Pavlov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
  4. Mahmut
    Mahmut avatar
    22 posts
    Member since:
    Nov 2014

    Posted 18 Mar 2015 in reply to Pavel R. Pavlov Link to this post

    Hi Pavel,
    Thanks for your response. I am trying to solve the problem. If I can't, I will ask to you help with a sample project.
Back to Top