Hello Support Team,
currently we have an issue related to Editors having validation errors. In several programs we get a StackOverflowException. See attached a mini user dump using DebugDiag Tools and its report. Our programs open a so called sub program by replacing window content by content of the opened sub program. After user finished its actions in this sub program, it closes by replacing window content by the content of the calling (main) program back. When this steps done then we try to set the focus using mouse into a cell having a validation error. In some cases it sets the focus but cursor is not shown, in most cases it is unable to set the focus. When switching to another windows program and switching back, the program crashes with this stack overflow exception. Currently we are not able to reproduce this behavior in a sample application and can only give you the dump file generated by DebugDiag Tools. All we can see: the program calls InplaceEditorBase.scopeFocus_PreviewGotKeyboardFocus multiple times. A look into your source code shows that it runs into an endless loop when changing keyboard focus on a cell having a validation error…
Please feel free to ask, if an information is missing.
Regards
Steffen
Hello Jan,
Thank you for your description and attached files, but I'm afraid the provided information is not sufficient to reproduce the same issue on our side. Would you please send us a simple sample where we can see the same problematic behavior? This will help us find the cause of the issue and suggest a more suitable solution. We are looking forward to your response.
Thanks,
Andrey
Hello Andrey,
I know that a reproducible sample of this weird behavior is necessary to debug it, but currently there are a lot of codes I have to review and add/remove from our application to hopefully get a working sample. I will try it as soon as possible and hopefully provide a working sample of this strange bug. But the resulting code will not be just a simple code example, because a lot of features/codes are involved… I'm going to contact you as soon as possible.
Thanks in advance,
Steffen
We are looking forward to your response, Steffen.
Regards,
Nadya
Hello Nadya and Andrey,
finally I got a working example to reproduce this behavior using your WPF controls. Please see attachment for this sample. After some review I found a boolean field InplaceEditorBase.CloseEditorOnLostKeyboardFocus. I set it to true to solve my problems. But if switching back to the default behavior, the problem still exists. The sample solution demonstrates how to reproduce it.
Following steps are necessary:
-> the cursor is not visible, entering text using keyboard not possible
-> StackOverflowException should be thrown
If the exception is not thrown for the first time, repeat this steps a second time.
Some notes to the example code:
Some basic points must be matched to reproduce the StackOverflowException:
Hope this helps you to find the cause of this StackOverflowException. I'm interested in removing the "hack" (InplaceEditorBase.CloseEditorOnLostKeyboardFocus = true) to switch back to your defaults.
Thanks in advance
Steffen
Hello Steffen,
Thank you for your cooperation and the provided sample project. I was able to replicate the exception on my side. We will research it and let you know as soon as we obtain any results.
Thanks,
Michael