View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002079 | NoesisGUI | Unreal | public | 2021-08-10 11:21 | 2021-09-13 14:15 |
Reporter | daniel.janak | Assigned To | hcpizzi | ||
Priority | normal | Severity | crash | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | 3.1.0 | ||||
Target Version | 3.1.1 | ||||
Summary | 0002079: Crashes with TextInputMethodSystem | ||||
Description | We’ve had some crashes when we were typing into a TextBox and then closed UI with a button that’s not focusable. It crashed on Context ensure. We’ve had to Deactivate context right before Unregistering context: void UNoesisInstance::TermInstance() { if (XamlView) { Noesis::Ptr<Noesis::IRenderer> Renderer(XamlView->GetRenderer()); Xaml.Reset(); XamlView.Reset(); // Pass the slate element to the render thread so that it's deleted after it's shown for the last time ENQUEUE_RENDER_COMMAND(SafeDeleteNoesisSlateElement) ( [Renderer, NoesisSlateElement = NoesisSlateElement](FRHICommandListImmediate& RHICmdList) mutable { Renderer->Shutdown(); NoesisSlateElement.Reset(); } ); } ITextInputMethodSystem* const TextInputMethodSystem = FSlateApplication::IsInitialized() ? FSlateApplication::Get().GetTextInputMethodSystem() : nullptr; if (TextInputMethodSystem) { for (auto TextInputMethodContextPair : TextInputMethodContexts) { TextInputMethodSystem->DeactivateContext(TextInputMethodContextPair.Value.ToSharedRef()); TextInputMethodSystem->UnregisterContext(TextInputMethodContextPair.Value.ToSharedRef()); } } } | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Hi Daniel, I tried this, and couldn't reproduce the issue. I used RemoveFromParent on the Unreal Widget, and then, when the garbage collector run, UNoesisInstance::TermInstance was called, and the destruction of the IView caused UNoesisInstance::OnPreviewLostKeyboardFocus to be called, and the context was correctly deactivated before it was unregistered at the end of UNoesisInstance::TermInstance. I have a couple of questions: How are you removing the UI? Are you calling RemoveFromParent too? And, in UNoesisInstance::TermInstance, is the IView released (i.e. is there a single reference before calling XamlView.Reset()? Thanks |
|
I haven't been able to reproduce the issue, but I've gone on and added the call to DeactivateContext. I've wrapped it in an if IsActiveContext in case other platforms complain about deactivating twice. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-08-10 11:21 | sfernandez | New Issue | |
2021-08-10 11:23 | sfernandez | Assigned To | => hcpizzi |
2021-08-10 11:23 | sfernandez | Status | new => assigned |
2021-08-10 11:23 | sfernandez | Target Version | => 3.1.1 |
2021-08-10 11:23 | sfernandez | Description Updated | |
2021-08-26 10:27 | sfernandez | Reporter | sfernandez => daniel.janak |
2021-08-30 12:31 | hcpizzi | Note Added: 0007391 | |
2021-09-08 16:55 | jsantos | Status | assigned => feedback |
2021-09-13 14:15 | hcpizzi | Status | feedback => resolved |
2021-09-13 14:15 | hcpizzi | Resolution | open => fixed |
2021-09-13 14:15 | hcpizzi | Note Added: 0007440 |