Closed andreyea closed 1 year ago
I have occasionally seen issues like this where there are deadlocks in the code. Typically caused by using the async DialogHost
methods and combining them with calls to Task.Result
or similar. Any chance there is something like that in your implementation?
I do have async code inside these dialogs.
The dialogs are just window classes which are displayed using ShowDialog methods.
Is there any specific way to display a dialog which uses MaterialDesign?
Hi @Keboo ,
I have read more about what are DialogHosts and no, I don't use them at all.
I only have windows which are called from Excel ribbon and I just use elements from Material XAML to style the form.
I notice, this may happen after Excel is being idle for some time and then when I open one of the windows elements are not responsive, dragging the window becomes slow. When close and reopen it again, the whole window is just blank.
Is there a way to debug this?
Thanks
Another thing I just noticed is when this happens, Excel RAM consumption jumps from a few hundred mb to tens of gb in a matter of seconds and goes up and down. Once I close this blank window, the memory stays down.
I tried to enable Software Rendering for each window that uses Material elements in Window Loaded event. For now, I cannot replicate this issue any more, but will keep an eye on it.
A couple of thoughts. Typically the behavior you are describing is caused because the UI thread is unable to process events. This either occurs because it is blocked/deadlocked or when it gets caught in an infinite loop (or long CPU load) on the UI thread. Being an Excel add-in certainly makes the problem much more difficult to debug. Though I am not too familiar with building these add-ins, I would expect that Excel isolates each extension to keep them from interfering with the main application, which is why are you still able to close the window. A few thoughts and ideas that might help.
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.
This issue was closed because it has been stalled for 14 days with no activity.
I use Material in Excel addin dialogs. I all works fine, but sometimes the dialog may become unresponsive. If I close it and open it again, the whole thing is just blank and to make it work I need to restart the application. I cannot figure out what may cause this and I see no any errors during debugging. I just wonder if anyone else experienced this issue.
Thanks.