0
Need More Information

InvalidOperationException: Trying to access product container before it is initialized.

Crystalius 3 weeks ago updated by Lazlo Bonin (Lead Developer) 3 weeks ago 5

InvalidOperationException: Trying to access product container before it is initialized.

Ludiq.ProductContainer.EnsureInitialized () (at Ludiq.Core.Editor/Products/ProductContainer.cs:94)

Ludiq.ProductContainer.GetProduct (System.String productId) (at Ludiq.Core.Editor/Products/ProductContainer.cs:121)

Ludiq.LudiqProduct.get_instance () (at Ludiq.Core.Editor/Product/LudiqProduct.cs:25)

Ludiq.LudiqProduct+<>c.b__23_0 (System.String searchContext) (at Ludiq.Core.Editor/Product/LudiqProduct.cs:46)

UnityEditor.SettingsProvider.OnGUI (System.String searchContext) (at <007193b7fa9c4ad1be5b26df6a654213>:0)

UnityEditor.SettingsWindow.DrawControls () (at <007193b7fa9c4ad1be5b26df6a654213>:0)

UnityEditor.SettingsWindow.DrawSettingsPanel () (at <007193b7fa9c4ad1be5b26df6a654213>:0)

UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Boolean straightY, System.Single pixelsPerPoint, System.Exception& immediateException) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

Rethrow as ImmediateModeException

UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection, UnityEngine.UIElements.PanelClearFlags clearFlags) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.Panel.UpdateForRepaint () (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)

UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)

Unity Version:
2019.4.11
Peek Version:
1.3.0
+2
Pending Review

Hi Crystallius,

Thanks for the report. Seems related to a fix I issued in 1.3.0, there might a regression, I'll have a look.

If I'm right in my assumption, this should only happen when you have a preference/project setting window when entering play mode or recompiling, right? Otherwise, when does it happen for you? Reproduction steps always help :)

Hey! 

Yes, I often go to play mode with settings/preferences window open 😊


+1
Need More Information

Hi Crystallius,

This is odd, looking at the line numbers in the error log, it doesn't line up with the code in Peek v.1.3.0.

Are you by any chance also using Bolt too? This seems more related to Bolt (Ludiq.Core from Bolt was renamed Ludiq.PeekCore in Peek). 

Yes, I am coding everything with it 😊

When I update Bolt, after Unity aquired it, it still installs in Ludiq directory. Should it be like this? Should I reinstall? Maybe that's the problem. 


Normally I have changed all GUIDs inside the Peek meta files, so Bolt shouldn't reimport over anything in Peek. If it does, that's a bug!

You can test by deleting the Bolt and Peek folders and then reimporting both plugins. 

I'm not sure where Unity decided to let Bolt install now, but I doubt they kept the Ludiq/ path.