- Home /
Should not be capturing when there is a hotcontrol
This message is occasionally popping up in the console for some of my more complex projects. I'm not sure how to duplicate the issue (so, can't submit it as a bug, if it even is one), so I'm trying to determine what might be causing it. Last time, it popped up when I clicked a compiler warning, in the console.
I THINK it is only happening after I recompile, but I'm not 100% sure of that.
I've searched my own codebase, but nowhere do I reference: https://docs.unity3d.com/ScriptReference/GUIUtility-hotControl.html
I can see it is being called from https://github.com/MattRix/UnityDecompiled/blob/master/UnityEngine/UnityEngine.Experimental.UIElements/EventDispatcher.cs but I'm still not sure what to look for.
Any suggestions on how to prevent this popup would be appreciated.
Edit/addition: The message pops up with a YELLOW icon, indicating he is only a warning. I expect this is why No stack trace is provided. The only way I found that decompiled code linked above, was by searching the entire github project site, for the warning message text.
EDIT: I found, as @Adam-Mechtley requested, some info in the EditorLogs, related to this popup. I'm pasting here (what I think is) the relevant section of the log:
Refreshing native plugins compatible for Editor in 0.37 ms, found 3 plugins.
Preloading 1 native plugins for Editor in 0.35 ms.
Mono: successfully reloaded assembly
Refreshing native plugins compatible for Editor in 0.41 ms, found 3 plugins.
Preloading 1 native plugins for Editor in 0.39 ms.
----- Total AssetImport time: 0.071462s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]
- Completed reload, in 1.046 seconds
Initializing Unity.PackageManager (PackageManager) v2017.2.0 for Unity v2017.2.0f3
Registering platform support modules:
Registered platform support modules in: 0.0347004s.
Native extension for WindowsStandalone target not found
Native extension for Android target not found
Should not be capturing when there is a hotcontrol
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Experimental.UIElements.EventDispatcher:TakeCapture(IEventHandler) (at C:\buildslave\unity\build\Runtime\UIElements\Managed\EventDispatcher.cs:90)
UnityEngine.Experimental.UIElements.UIElementsUtility:TakeCapture() (at C:\buildslave\unity\build\Runtime\UIElements\Managed\UIElementsUtility.cs:54)
UnityEngine.GUIUtility:TakeCapture() (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUIUtility.cs:113)
UnityEngine.GUIUtility:Internal_SetHotControl(Int32)
UnityEngine.GUIUtility:set_hotControl(Int32) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUIUtility.cs:105)
UnityEditor.ListViewShared:HasMouseDown(InternalListViewState, Rect, Int32) (at C:\buildslave\unity\build\Editor\Mono\GUI\ListViewShared.cs:188)
UnityEditor.ListViewShared:HasMouseDown(InternalListViewState, Rect) (at C:\buildslave\unity\build\Editor\Mono\GUI\ListViewShared.cs:179)
UnityEditor.ListViewElementsEnumerator:MoveNext() (at C:\buildslave\unity\build\Editor\Mono\GUI\ListViewShared.cs:370)
UnityEditor.ConsoleWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\ConsoleWindow.cs:414)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:285)
UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:278)
UnityEditor.HostView:InvokeOnGUI(Rect) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:245)
UnityEditor.DockArea:OldOnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:383)
UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI(Event) (at C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:127)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent(EventBase) (at C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:213)
UnityEngine.Experimental.UIElements.EventDispatcher:PropagateEvent(VisualElement, EventBase) (at C:\buildslave\unity\build\Runtime\UIElements\Managed\EventDispatcher.cs:343)
UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent(EventBase, BaseVisualElementPanel) (at C:\buildslave\unity\build\Runtime\UIElements\Managed\EventDispatcher.cs:252)
UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Runtime\UIElements\Managed\UIElementsUtility.cs:207)
UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Runtime\UIElements\Managed\UIElementsUtility.cs:72)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUIUtility.cs:175)
(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs Line: 222)
EDIT2: bug submitted- https://fogbugz.unity3d.com/default.asp?968044_05s1gv99bq2ofkr8
I get this too. For me it was occurring with VR using Oculus utilities. I assume (probably rather incorrectly), that a button/sensor was not released proper before I exited the app. I'm pretty much ignoring it for now; would like to know what others think.
Sorry, but i never had an error like this ever before. I still use Unity 5.6.1f1 and those experimental classes do not exist in my DLLs yet. It looks like they may want to / have implement the I$$anonymous$$GUI with actual class instances. $$anonymous$$aybe they switched already the internal handling of the I$$anonymous$$GUI to this experimental framework. So it might be related to some Unity internals and not really related to something you did wrong.
I think a bug report woudn't hurt ^^. Of course it's difficult when it's not reproducible, however you can point them towards this code snippet.
ps: Do you have a full stacktrace? When i finally upgrade to Unity 2017 ++ i may have a look where this might come from.
Alas, no stack trace was provided. Edited/added a couple more details to the question. The decompiled code I found (if that's actually the right code) is indeed a Debug.Log() command, which, whenever I use it DOES provide a stack trace. Perhaps this is a clue?
Thanks for taking a look guys.
What Unity version are you using? Can you check your editor log when you get this message and see if there's more information you can paste here?
Editor Log with popup, stating Unity Version (2017), has been added to the question. Also, I was wrong, this does NOT popup as a warning, just a regular log entry (but with no stack trace).
Answer by Tsahyla · Jan 05, 2021 at 02:18 PM
And now it is 2021 and its still happening often in fresh or old projects with all different types of assets and imports. For example: Just tried to import newest UMA into a new project for some testing and got it 4 times during the import.
Sbmit a regression bug report - link the closed bug: https://fogbugz.unity3d.com/default.asp?968044_05s1gv99bq2ofkr8
I would do it myself, but I'm working on a different project where this isn't occurring.
There is apparently no way to re-activate this bug report or regress or whatever its called. That link has no ability to add or re-open the issue that I can see. I sent an email to the bugs@ place. We will see if that goes anywhere. Apparently once they close something the thing disappears from the UNITY cosmos never to return. Anyway seems ridiculous to close something that is not actually fixed.
Sorry, I meant to say submit a NEW bug report which references the old bug. It's a regression bug because it was fixed at some point in time, but for whatever reason (software is complicated), the bug has returned after 3 years.
Answer by SmileJakoby · Dec 14, 2020 at 11:04 PM
It's almost 2021... this issue is still happening.
Submit a regression bug report - link the closed bug: https://fogbugz.unity3d.com/default.asp?968044_05s1gv99bq2ofkr8
I would do it myself, but I'm working on a different project where this isn't occurring.
Answer by Reelix · Aug 16, 2018 at 07:39 AM
This can be reproduced with the steps listed at https://issuetracker.unity3d.com/issues/should-not-be-capturing-when-there-is-a-hotcontrol-message-thrown-after-double-clicking-on-runtime-error-and-exiting-playmode
The specific issue is marked as "Resolved", but still appears in the latest version of Unity (As you have seen)
Answer by JuliusPipikas · Jan 27, 2021 at 02:58 PM
Hey guys! I know putting this up as an answer isn't the best place to reach out, but the developers at Unity have been investigating the issue, and have asked if you could provide the full stacktraces whenever the issue occurs?
You can find them in the Console Window's right side -> '3 dots' menu -> Stack Trace Loggin -> All -> Full.
You can file a bug and reference issue 968044 in the description, but replying below this answer will also work. Thanks!
@Tsahyla, @SmileJakoby, @glenneroo Hope you don't mind the ping :)
I will send the Stack Trace the next time it happens; it may be a bit since it is really unpredictable when it happens.
I did what you said all i have in console is this:
Should not be capturing when there is a hotcontrol
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
i even try to enable full log but nothing changes
Your answer
Follow this Question
Related Questions
Editor Console window message no longer wraps... Help? Please? 1 Answer
host set to C:\Program Files\Unity\Hub\Editor\2019.4.9f1\Editor\Data\Tools\RoslynScripts\..\.. 0 Answers
Catching double-clicking console messages 4 Answers
DebugConsole console clicking 5 Answers
How do I change the default application used to open logs from the Unity editor? (on Mac) 1 Answer