Search Issue Tracker

Fixed

Votes

0

Found in [Package]

2.0.1

Issue ID

1163975

Regression

Yes

[TMP] MissingReferenceException occurs on playing a scene with TMP dropdown

Package: TextMeshPro

-

Continuous multiple MissingReferenceException errors occur on running a scene with TMP dropdown GameObject

Steps to repro:
1. Open an attached project or create a new project
2. Hierarchy > right-click > TMP drop down
3. Import TMP essential
4. Play scene

Actual Result:
MissingReferenceException occurs

Expected Result:
The scene is played gracefully

Occurring with:
2019.3.0a7, 2019.2.0b7, 2019.1.4f1

TextMeshPro Package Version:
2.0.1, 1.4

Working with Package:
1.3

Environment:
Only on windows

Stack Trace:
Error 1:
MissingReferenceException: The object of type 'TMP_Dropdown' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEditor.UI.SelectableEditor.StaticOnSceneGUI (UnityEditor.SceneView view) (at <89d1aa06190749f989600312ab9200d3>:0)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:3306)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2539)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2400)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <a8ed250850854b439cedc18931a314fe>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <a8ed250850854b439cedc18931a314fe>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <a8ed250850854b439cedc18931a314fe>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:337)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:331)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:307)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:373)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:340)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error 2:
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error 3:
MissingReferenceException: The object of type 'TMP_Dropdown' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEditor.UI.SelectableEditor.StaticOnSceneGUI (UnityEditor.SceneView view) (at <89d1aa06190749f989600312ab9200d3>:0)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:3306)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2539)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2400)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <a8ed250850854b439cedc18931a314fe>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect topRect, UnityEngine.Matrix4x4 projection) (at C:/buildslave/unity/build/Modules/UIElements/Renderer/UIRChainBuilder.cs:242)
UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect topRect, UnityEngine.Matrix4x4 projection) (at C:/buildslave/unity/build/Modules/UIElements/Renderer/UIRRepaintUpdater.cs:66)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at C:/buildslave/unity/build/Modules/UIElements/Renderer/UIRRepaintUpdater.cs:54)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTree () (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeUpdater.cs:72)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:637)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:240)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Comments (15)

  1. shippingalshiyma

    Jan 08, 2023 01:14

    shipping-sa.com

    shipping-sa.com

    shipping-sa.com انوار الحرمين

    shipping-sa.com/شركة-شحن-عفش-من-الرياض-الي-الأردن/

    shipping-sa.com/افضل-شركة-شحن-من-السعودية-للأردن/

    shipping-sa.com/شحن-اثاث-من-السعودية-الى-الاردن/

    shipping-sa.com/شركة-شحن-من-السعودية-الي-الاردن/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-الاردن/

    shipping-sa.com/نقل-عفش-من-الرياض-الى-الاردن/

    shipping-sa.com/نقل-عفش-من-الدمام-الى-الاردن/

    shipping-sa.com/شركة-شحن-نقل-عفش-من-تبوك-الي-الأردن/

    shipping-sa.com/شركة-شحن-من-جدة-الى-عمان/

    shipping-sa.com/نقل-عفش-من-جدة-الى-الاردن/

    shipping-sa.com/شركة-شحن-من-السعودية-الي-الامارات/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-الامارات/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الى-الامارات/

    shipping-sa.com/شركة-شحن-عفش-من-الرياض-الى-الامارات/

    shipping-sa.com/شركة-شحن-من-تبوك-الى-الإمارات/

    shipping-sa.com/نقل-عفش-من-الدمام-الى-الامارات/

    shipping-sa.com/شحن-نقل-عفش-من-جدة-الى-تركيا/

    shipping-sa.com/نقل-عفش-من-الرياض-الى-تركيا/

    shipping-sa.com/شحن-و-نقل-عفش-من-الدمام-الي-تركيا/

    shipping-sa.com/نقل-عفش-من-جدة-الى-لبنان/

    shipping-sa.com/شحن-و-نقل-عفش-من-الرياض-الي-لبنان/

    shipping-sa.com/شحن-نقل-عفش-من-الدمام-الى-لبنان/

    shipping-sa.com/نقل-عفش-من-جدة-الى-المغرب/

    shipping-sa.com/شحن-و-نقل-عفش-من-الرياض-الي-المغرب/

    shipping-sa.com/شحن-و-نقل-عفش-من-الدمام-الى-المغرب/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الي-سلطنة-عُمان/

    shipping-sa.com/شحن-نقل-عفش-من-الرياض-الى-سلطنة-عُمان/

    shipping-sa.com/شحن-نقل-عفش-من-الدمام-الى-سلطنة-عُمان/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-البحرين/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الى-البحرين/

    shipping-sa.com/نقل-عفش-من-الدمام-الى-البحرين/

    shipping-sa.com/شركة-شحن-نقل-عفش-من-جدة-الي-الكويت/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الى-الكويت/

    shipping-sa.com/شركة-نقل-عفش-من-الدمام-الى-الكويت/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-العراق/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-قطر/

    shipping-sa.com/نقل-العفش-الشحن-الدولى-البري-البحري/

    shipping-sa.com/أفضل-شركة-نقل-عفش-بالرياض/

    shipping-sa.com/شركة-نقل-عفش-بالقصيم-ببريده/

    shipping-sa.com/شركة-نقل-عفش-بالدمام/

    shipping-sa.com/ارخص-افضل-شركة-نقل-عفش-بالمظيلف/

    shipping-sa.com/ارخص-افضل-شركة-نقل-عفش-في-بيشة/

    shipping-sa.com/أرخص-شركة-نقل-عفش-بجدة/

    shipping-sa.com/أفضل-شركة-نقل-عفش-بجده/

    shipping-sa.com/شركة-نقل-عفش-بمكة/

    shipping-sa.com/افضل-شركة-نقل-عفش-بمكة-المكرمة/

    shipping-sa.com/ارخص-افضل-شركة-نقل-عفش-بتبوك/

    shipping-sa.com/شركة-نقل-عفش-بالقطيف/

    shipping-sa.com/شركة-نقل-عفش-بجيزان/

    shipping-sa.com/شركة-نقل-عفش-بالخبر/

    shipping-sa.com/شركة-نقل-عفش-بالخرج/

    shipping-sa.com/افضل-شركة-نقل-عفش-بأبها/

    shipping-sa.com/شركة-نقل-عفش-بالاحساء-و-الهفوف/

    shipping-sa.com/شركة-نقل-عفش-بالظهران/

    shipping-sa.com/شركة-نقل-عفش-بحفر-الباطن/

    shipping-sa.com/ارخص-افضل-شركة-نقل-عفش-بالجبيل/

    shipping-sa.com/شركة-نقل-عفش-بالمدينة-المنورة/

    shipping-sa.com/شركة-نقل-عفش-بنجران/

    shipping-sa.com/شركة-نقل-عفش-بالطائف/

    shipping-sa.com/شركة-نقل-عفش-بالباحة/

    shipping-sa.com/شركة-نقل-عفش-بخميس-مشيط-وأبها/

    shipping-sa.com/شركة-نقل-عفش-بالقنفذة/

    shipping-sa.com/شركة-نقل-عفش-في-بني-عمرو/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الي-الطائف/

    shipping-sa.com/نقل-عفش-من-جدة-الى-خميس-مشيط-أبها/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الي-الرياض/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الي-الدمام/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-المدينة/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-جيزان/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-نجران/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الى-الظهران/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الي-الخبر/

    shipping-sa.com/شركة-نقل-عفش-من-جدة-الي-حفر-الباطن/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-نجران/

    shipping-sa.com/نقل-عفش-من-الرياض-الي-جيزان-جازان/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الى-الظهران/

    shipping-sa.com/نقل-عفش-من-الرياض-الى-ابها-و-خميس-مشيط/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الطائف/

    shipping-sa.com/نقل-عفش-من-الرياض-الى-الاحساء-الهفوف/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الخرج/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الجبيل/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-تبوك/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الخبر/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الى-القصيم/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-مكة/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-المدينة/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الدمام/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-جدة/

    shipping-sa.com/أفضل-شركة-نقل-عفش-بالرياض/

    shipping-sa.com/نقل-عفش-من-الطائف-الى-خميس-مشيط-أبها/

    shipping-sa.com/شركة-نقل-عفش-من-الطائف-الى-الرياض/

    shipping-sa.com/شركة-نقل-عفش-من-الطائف-الى-الدمام/

    shipping-sa.com/أفضل-أرخص-شركة-تنظيف-بجدة/

    shipping-sa.com/شركة-تنظيف-تركيب-صيانة-مكيفات-بجدة/

    shipping-sa.com/أفضل-شركة-نقل-عفش-بالرياض/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-جدة/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الدمام/

    shipping-sa.com/نقل-عفش-من-الرياض-الى-ابها-و-خميس-مشيط/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-نجران/

    shipping-sa.com/نقل-عفش-من-الرياض-الي-جيزان-جازان/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الى-الظهران/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الطائف/

    shipping-sa.com/نقل-عفش-من-الرياض-الى-الاحساء-الهفوف/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الخرج/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الجبيل/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-تبوك/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-الخبر/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الى-القصيم/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-مكة/

    shipping-sa.com/شركة-نقل-عفش-من-الرياض-الي-المدينة/

    shipping-sa.com/شركة-نقل-عفش-بالطائف-2/

    alshimaa.com مكتب الشيماء للشحن

    alshimaa.com/2019/12/Shipping-from-Saudi-Arabia-to-Egypt.html شركة شحن من السعودية الى مصر

    alshimaa.com/2019/12/Shipping-from-Riyadh-to-Egypt.html شركة شحن من الرياض الى مصر

    alshimaa.com/2019/12/Shipping-from-Khobar-to-Egypt.html شركة شحن من الخبر الى مصر

    alshimaa.com/2019/12/Shipping-from-Al-Kharj-to-Egypt.html شركة شحن من الخرج الى مصر

    alshimaa.com/2019/12/Shipping-from-Al-Quwayiyah-to-Egypt.html شركة شحن من القويعية الى مصر

    alshimaa.com/2019/12/Shipping-from-Al-Muzahmiyah-to-Egypt.html شركة شحن من المزاحمية الى مصر

    alshimaa.com/2020/01/Shipping-from-Al-Majmah-to-Egypt.html شركة شحن من المجمعة الى مصر

    alshimaa.com/2020/01/Shipping-from-Al-Aflaj-to-Egypt.html شركة شحن من الافلاج الى مصر

    alshimaa.com/2020/01/Shipping-from-Aldawmy-to-Egypt.html شركة شحن من الدوادمى الى مصر

    alshimaa.com/2019/12/Saudi-Arabia-to-Egypt.html شحن من السعودية لمصر

    alshimaa.com/2020/02/Shipping-from-Dammam-to-Egypt.html شركة شحن من الدمام لمصر

  2. davidosullivan

    Jul 30, 2021 21:24

    I was getting this in 2019.5.15f1 with TMP 2.0.1. I tried updating to 2.1.6 and THIS issue went away but literally all my TMPs then caused errors of ' IndexOutOfRangeException'. So I followed the advice to modify TMP_Dropdown.cs -> OnDisable() so that it called base.OnDisable() AT THE TOP of the method and I got all the IndexOutOfRangeException errors again but no 'MissingReferenceException' errors. I then put base.OnDisable() AT THE END of the method and did not get either of the errors. So I think this might be the correct fix...

  3. ilyaz_khanMohd

    Feb 21, 2021 12:27

    Thanks to @SPENCETT

    fixed this manually by adding base.OnDisable(); to Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\Runtime\TMP_Dropdown.cs:460 in the OnDisable function.

  4. spilucco

    Jan 16, 2021 01:36

    I wasn't able to use automatic navigation because of this. I solved the issue reading one of the comments here.

    You can fix this manually by adding base.OnDisable() to Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\RuntimeTMP_Dropdown.cs:460 in the OnDisable function.

  5. alfarza

    Nov 15, 2020 18:05

    the issue still exist.

  6. shubhamswaraj2021

    Aug 21, 2020 05:43

    good one <a href="https://www.lyricsauto.com">lyricsauto</a>

  7. MrSIiddes

    Jun 25, 2020 09:34

    @SPENCETT option works, only when I restart Unity I have to re-add it.

  8. abdjaouni

    Apr 19, 2020 22:19

    @SPENCETT thx man!

  9. SorraTheOrc

    Apr 12, 2020 17:03

    Still present in 2019.3.7f1with TextMesh Pro 2.0.1
    Should not be marked FIXED

  10. spencett

    Mar 11, 2020 17:58

    Issue is present in 2019.3.2.0f1 with TMP package 2.0.1.

    The problem is TMP_Dropdown has overrided the OnDisable function without calling base.OnDisable(). This prevents the call to Selectable.OnDisable() which decreases s_SelectableCount and removes it from its Selectables array. When you go into a new scene, the selectables are added but the Selectable pointer is wrong, thus the MissingReferenceException.

    You can fix this manually by adding base.OnDisable() to Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\RuntimeTMP_Dropdown.cs:460 in the OnDisable function.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.