Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

!dest.m_MultiFrameGUIState.m_NamedKeyControlList

Discussion in 'Editor & General Support' started by nevaran, Nov 15, 2012.

  1. nevaran

    nevaran

    Joined:
    May 21, 2010
    Posts:
    234
    I am getting these errors randomly when enabling or disabling scripts or some gadgets(camera, gui layer, flare layer ect.)


    Is this a unity 4 bug, or is there something wrong with the code that does not show as warrning? :-|
     
  2. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    480
    I've just got the same bug, it reproduced everytime.

    I have a custom editor, and i have an object property on it, here is a part of code
    Code (csharp):
    1.  
    2. UFTAtlasMetadata newMeta= (UFTAtlasMetadata) EditorGUILayout.ObjectField((Object)atlasMetadata,typeof(UFTAtlasMetadata),false);            
    3.  
    So, when i open this editor, choose this object, new window appeared (where i can choose any UFTAtlasMetadata from my assets), and when i switch back to the scene editor (without closing object chooser dialog) i'm getting this error.

    Also i found, that it happens only if editor is docked to the unity application, if it is a floating window, this error doesn't appeared.

    Submitted this bug to unity.
     
    Last edited: Nov 17, 2012
    twobob likes this.
  3. Martian-Games

    Martian-Games

    Joined:
    Jan 19, 2012
    Posts:
    39
    yep, i am getting this too
     
  4. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    I was having this too, but it just desapeared by itself after a while.
     
  5. olivermoore

    olivermoore

    Joined:
    Aug 11, 2012
    Posts:
    20
    Anyone find a solution for this?

    Thanks :)
     
  6. petrucio

    petrucio

    Joined:
    Aug 30, 2011
    Posts:
    126
    Same here
     
  7. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    78
    got this after I remapped some controls
     
  8. iossif

    iossif

    Joined:
    Mar 4, 2011
    Posts:
    332
    i get this every time i press a keyboard button.
     
  9. dukester

    dukester

    Joined:
    Nov 7, 2012
    Posts:
    14
    I had this bug too.
    I noticed it doesn't happen during the part of my game when I have some GUI Labels on the screen.
    So I added a dummy Label to my scene and the error message never shows any more.
    Hope this helps the developers nail down the bug.
     
  10. Kaspar-Daugaard

    Kaspar-Daugaard

    Unity Technologies

    Joined:
    Jan 3, 2011
    Posts:
    152
    Oops, looks like this slipped through the net. We've seen it internally too, and in my experience it doesn't do any harm other than being very annoying.
     
  11. iossif

    iossif

    Joined:
    Mar 4, 2011
    Posts:
    332
    yes. it only is annoying on my end.
     
  12. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    605
    I got it too in Unity 4.0.0f7
     
  13. dsjunnesson

    dsjunnesson

    Joined:
    Dec 3, 2012
    Posts:
    15
    I have this problem to. No GUI on the screen and it happens when I do a raytrace to detect a hit on a object.
     
  14. ialex32x

    ialex32x

    Joined:
    Dec 6, 2012
    Posts:
    4
    same problem when I use GUI.SetNextControlName...
     
  15. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,503
    That's great except when you're hooking Unity's error handling via RegisterLogCallback in order to print error messages to the screen - in which case it pops up immediately. Is there any workaround or reliable reproduction notes for this?
     
  16. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,503
    Best I can do after a bit of messing about is - it seems to be related to calling SetActive(bool) on the GameObject containing the GUI code. However - the result is different depending on the context.

    - Disable GUI object in Start() of another object: error happens immediately
    - Same but yield a frame in Start(): same result
    - Disable GUI object in Update() of another object: error happens immediately
    - Disable GUI object via Inspector: error happens immediately
    - Disable GUI object via non-MonoBehaviour code later in game's lifecycle: works until you strike a key on the keyboard then error occurs
     
    twobob likes this.
  17. tsnyder321

    tsnyder321

    Joined:
    Jul 5, 2012
    Posts:
    2
    I had the same issue with calling GUI.SetNextControlName. I made it to go away (so far...) by removing the script that had this call in it, and then adding it back into my scene. I do not know why this worked, but it has so far.

    Hope it helps you as it did me!

    ~Tim

    EDIT: It has come back, so this workaround didn't work. :'(
     
    Last edited: Feb 18, 2013
  18. juliobds

    juliobds

    Joined:
    Dec 27, 2011
    Posts:
    24
    So has this been fixed yet?
     
  19. vonchor

    vonchor

    Joined:
    Jun 30, 2009
    Posts:
    68
    I am not even using Unity Gui at all in my app - but i added a plugin from the unity asset store that does, then I moved the script with that plugin to a different (not the 'title' scene where I had first put it) and now in the title scene only I get these messages every time I click anywhere on the title screen.

    I"ve never run into this before today because I've been using EZGui.

    just passing this along if it helps.
     
  20. vonchor

    vonchor

    Joined:
    Jun 30, 2009
    Posts:
    68
    Oddly enough, the next time I saved my project to asset server, then shut down Unity (don't really know if shutting it down makes a difference) - the next day these dumb messages were gone.
     
  21. jonc113

    jonc113

    Joined:
    Mar 10, 2013
    Posts:
    13
    This used to be just an annoyance, but suddenly it is pausing my game for no reason. I click to un-pause game, then it runs for another few seconds before pausing again. This is happening on my Windows machine, but not my Mac.
     
  22. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    305
    Same problem here. Any news?
     
  23. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    860
    Getting this error too! Anyone knows how to solve this? It's VERY annoying....
     
  24. Foram

    Foram

    Joined:
    Apr 5, 2013
    Posts:
    12
    Getting this error when using GUI.Textfield in unity editor.
    Any Solution for this in unity 4.0??
     
  25. skalev

    skalev

    Joined:
    Feb 16, 2012
    Posts:
    264
    I have been getting this error while using the undo menu, either by Ctrl-Z or through the menu item. I've seen it happen on scene changes and on custom inspectors that use Undo.RegisterUndo().

    --Windows Machine
    --Unity Pro 4.1.2f1
     
  26. oferei

    oferei

    Joined:
    Dec 1, 2012
    Posts:
    36
    Perhaps you accidentally pressed the "Error Pause" in the console window? Deselect it and your problems will go away.
     
  27. DJDeepDive

    DJDeepDive

    Joined:
    Jun 10, 2013
    Posts:
    2
    I can confirm the bug still exists. For me, I have created a GUI.TextField. I use the methods GUI.SetNextControlName, and it causes the !dest.m_MultiFrameGUIState.m_NamedKeyControlList to occur after I've destroyed the object. Sounds like destroy isn't removing the GUI pointer to that control.

    Workaround discovered:

    I have a base scene with most of my HUD and game controlling objects. Each level is loaded as additive. The Gui.SetNextControlName comes in one of my levels where the user has to type an entry code (therefore requiring the use of GUI.FocusControl). As soon as the level object is destroyed (by the base scene manually), the error occurs from then on. So in the base scene, I created a bogus GUI.Label with the exact same name passed in GUI.SetNextControlName, and my problems went away.

    Base scene:

    Game level:
    Hope that helps someone until they get this bug resolved!

    -- Windows
    -- Unity Pro 4.1.5f1
    -- C#/Mono script
     
    Last edited: Jun 21, 2013
  28. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    115
    still get it here...

    I have a VERY basic scene, litterally some guitext being updated whilst a connection is being established.. if I click anywhere on the screen I get this error... bit wierd.
     
  29. FACEEATER

    FACEEATER

    Joined:
    Jul 16, 2013
    Posts:
    4
    have you tried turning it off and on again?


    ...seriously. i closed unity and reopened it and it has not yet reappeared.
     
  30. Cutedge242

    Cutedge242

    Joined:
    Nov 20, 2012
    Posts:
    9
    Yeah but it will reappear until you do the next action that causes it (like making a text input and then destroying it).
     
  31. glennyP

    glennyP

    Joined:
    Nov 4, 2013
    Posts:
    3
    This has been happening to my projects every since version 4. Never caused a real problem until now. It's causing my windows standalone to crash.
     
  32. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    68
    Still happening in Unity 4.3. Is there a bug ticket somewhere to vote up?
     
  33. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    68
    This error causes standalone Mac/PC apps to throw an unhandled null pointer and hang on Quit. Requiring you to force quit.

    I think I found a solution:

    You need to make sure something is calling SetNextControlName in all of your scenes. We have a component that is set to DontDestroyOnLoad and we added the following:

    void OnGUI()
    {
    string controlName = gameObject.GetHashCode().ToString();
    GUI.SetNextControlName(controlName);
    Rect bounds = new Rect(0,0,0,0);
    GUI.TextField (bounds, "", 0);
    }

    I don't know why this works. My guess is that by calling SetNextControlName you are wiping out the prior one and something must be maintaining a reference to the prior one that no longer exists.
     
  34. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    same problem in unity 4.3.1f1 .... and i once noticed that it happened while i held the mouse button inside the game view.. sometimes its not like that..
     
  35. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    231
    Just started for me too. same version…I may revert back. annoying.
     
  36. ankurj

    ankurj

    Joined:
    Oct 4, 2013
    Posts:
    5
    Just save your changes and quit unity.
    Restart unity and the error will be gone.
    Hope this helps
     
  37. merlinbg

    merlinbg

    Joined:
    Dec 31, 2013
    Posts:
    5
    True, but it seems to reappear on the first change in scripts...
     
  38. merlinbg

    merlinbg

    Joined:
    Dec 31, 2013
    Posts:
    5
    This seems not to be related to the number of scenes where OnGUI or SetNextControlName is called - currently I have a very simple project with just one scene and few scripts where OnGUI and SetNextControlName are used and I face the issue every time I change the scripts. Unity 4.3.1f1.
     
  39. iKonrad

    iKonrad

    Joined:
    Jun 23, 2013
    Posts:
    180
    Any solution for this?
    I have NGUI for everyday use, but I've downloaded a plugin (In-game console) that uses Unity GUI. Now, this annoying error floods my console with absolutely no reason.

    Unity version: 4.3.2f1
     
  40. sphericPrawn

    sphericPrawn

    Joined:
    Oct 12, 2013
    Posts:
    244
    I'm also getting the error. Started occurring when I began using SetNextControlName in my game to enable users to select GUI elements with a keyboard/gamepad. Like others have said in this thread, it goes away when restarting Unity but comes back as soon as I change anything in the script that has the SetNextControlName statements. Very annoying.
     
  41. Yocal

    Yocal

    Joined:
    Feb 10, 2014
    Posts:
    22
    This did it for me... Billiant - thanks.

    // Yoc.
     
  42. JoshuaPack

    JoshuaPack

    Joined:
    Aug 10, 2012
    Posts:
    1
    I just want to say, I have been getting this error a lot.

    I took what ickydime said and modified it a bit so nothing showed on screen. for whatever reason this works. It is just so annoying getting 999+ errors, and trying to find that one error.

    Code (csharp):
    1.  
    2.     void OnGUI()
    3.     {
    4.         string controlName = gameObject.GetHashCode().ToString();
    5.         GUI.SetNextControlName(controlName);
    6.         Rect bounds = new Rect(-10,-10,0,0);
    7.         GUI.TextField (bounds, "", 0);
    8.     }
    9.  
     
    Last edited: Feb 23, 2014
  43. Adam-E

    Adam-E

    Joined:
    Jan 9, 2013
    Posts:
    4
  44. RegisB

    RegisB

    Joined:
    May 14, 2013
    Posts:
    40
    Hi I had the same issue myself.

    It disappeared adding an empty void OnGUI (){ } in a specific script that didn't used any GUI...

    Before that, this script only contained a "void OnMouseDown" with external file writing.

    Hope that might help somebody.
     
  45. seanNovak

    seanNovak

    Joined:
    Aug 12, 2013
    Posts:
    12
    that did it for me.
     
  46. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    957
    Having this problem too - console is spammed after disabling a MonoBehaviour that has OnGUI in it.
    Is this ever going to be fixed? Really, does it has to take three years to remove an annoying message? Adding a dummy OnGUI() isn't a solution at all, because I only use OnGUI occasionally in non-critical places where it can't affect performance.
     
  47. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,615
    !dest.m_MultiFrameGUIState.m_NamedKeyControlList

    I'm getting it as well when I disable and script with an OnGUI call in it.
     
  48. Texaggie96

    Texaggie96

    Joined:
    Jan 23, 2009
    Posts:
    81
    I agree with Zim. A dummy OnGUI() is not an acceptable solution. I develop for mobile and it will kill my performance.
     
    twobob likes this.
  49. nevaran

    nevaran

    Joined:
    May 21, 2010
    Posts:
    234
    It seems that Unity 4.2 and above fixes the errors for me
     
  50. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    957
unityunity