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
Problem with IDispatcherService after update to version 5.0 #1112
Comments
This could be related to the implementation of the UIVisualizerService in 5.0. Can you please try 5.1? |
Please provide more info if you can reproduce. |
Sorry for delay. Our management changed priorities and currently I'm don't work on Catel update, I will prepare branch with 5.1 build and ask tester privately for reproduction tomorrow. |
Sorry for delay again. Crash still occurs on 5.1 version downloaded from nuget today :( |
Too bad :-( Is this problem isolatable? We have quite some large WPF apps written on Catel and all the Orc components, and we don't have this issue. |
Some changes in Catel interacts with ActiveX component we are using in our project. It is pretty hard to detect where the problem is (Probably it last issue that stop us for update Catel). |
I have found reason. We have used BeginInvoke to delay execution of action on main thread (like SetTimeout(0 in javascript). Hack have been added because some operation cannot be perform at time when action is executed. Changes in Catel 5.x makes dispatcher service to execute action immediately if is called from main thread. I suppose that similar hacks are present in many projects. The question is: should we restore previous implementation for backward capability or should we create article how migrate hack to newer version? |
@szogun1987 sorry for the late reply, must have missed this one. I think it's because of the "onlyDispatcherWhenRequired". I think we can add that to the method as a non-breaking change. Would that solve the issue for you? |
I have solved it with schedulerService - schedule(0 s). It seems to be more proper solution of the problem |
Excellent, then I will close this ticket. Thanks for the feedback. |
I thinks it is something worth to mention in release notes. |
That's an excellent point so I did some digging into this. The IDispatcherService provides these methods:
Did you try passing in |
No I haven't. |
Yes, you either execute the method via the dispatcher or not, it shouldn't matter if it's sync or not (but we recommend using the new BeginInvokeAsync if you want to await it). |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
It is only placeholder for issue. Issue occurred while regression testing of our app, after upgrade to version 5.0 of Catel. I haven't yet fully analyzed issue, and I'm not sure if it caused by Catel but it is highly probable.
Steps to reproduce
TBD
Platform:
.NET version: 4.5
Expected behaviour
App shouldn't crash
Actual behaviour
App crashes with stacktrace:
The text was updated successfully, but these errors were encountered: