Skip to content
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

The requested lookup key was not found in any active activation context #3922

Closed
myCollections opened this issue Sep 22, 2020 · 7 comments · Fixed by #3937
Closed

The requested lookup key was not found in any active activation context #3922

myCollections opened this issue Sep 22, 2020 · 7 comments · Fixed by #3937
Labels
Milestone

Comments

@myCollections
Copy link

Describe the bug

Hello, since last version i receive this error message the first time the application is launched :

The requested lookup key was not found in any active activation context

Stack trace :

at MahApps.Metro.Controls.WinApiHelper.GetWindowText(Window window)
at MahApps.Metro.Automation.Peers.MetroWindowAutomationPeer.GetNameCore()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Environment

MahApps.Metro version: v2.2.0
Target Framework: .Net v4.6.1

@punker76
Copy link
Member

@myCollections Can you show your problem with a simple application? Never seen this issue, so maybe something special.

@myCollections
Copy link
Author

Thanks for your quick reply.
You can try it with this : http://www.mycollections.fr/Download/myCollections.exe

But it will happens only twice on the same computer.
So difficult to reproduce.

@mohdimas
Copy link

mohdimas commented Sep 28, 2020

I have similar issues in our production with similar stacktrace, e.g.

System.ComponentModel.Win32Exception (0x80004005): Too many posts were made to a semaphore
at MahApps.Metro.Controls.WinApiHelper.GetWindowText(Window window)

or

System.ComponentModel.Win32Exception (0x80004005): Attempt to release mutex not owned by caller
at MahApps.Metro.Controls.WinApiHelper.GetWindowText(Window window)

I'm wondering whether this Exception will be caught somewhere https://github.com/MahApps/MahApps.Metro/blob/develop/src/MahApps.Metro/Controls/WinApiHelper.cs#L62 ?

@timunie
Copy link
Collaborator

timunie commented Sep 28, 2020

@myCollections @mohdimas it may be helpful to get direct access to your source code in order to debug it. Maybe you can share it at least private to @punker76 if you don't want to make it public. If possible a stripped down sample (source) would also be useful if it shows your issue.

Thank you in advance and happy coding
Tim

@enricogior
Copy link

It's also happening to some users when trying to open the FancyZones editor in PowerToys
microsoft/PowerToys#6946

@enricogior
Copy link

@punker76
thanks for the fix.
We will release PowerToys 0.25 next week and it will use the updated version.

@myCollections
Copy link
Author

@punker76 Thanks a lot for the Fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

5 participants