NullReferenceException on Unity 2019.4.1
See original GitHub issueDescription of the bug
NullReferenceException: Object reference not set to an instance of an object SimpleFileBrowser.RecycledListView.UpdateList () (at Assets/Plugins/SimpleFileBrowser/Scripts/SimpleRecycledListView/RecycledListView.cs:55) SimpleFileBrowser.FileBrowser.RefreshFiles (System.Boolean pathChanged) (at Assets/Plugins/SimpleFileBrowser/Scripts/FileBrowser.cs:1420) SimpleFileBrowser.FileBrowser.OnShowHiddenFilesToggleChanged () (at Assets/Plugins/SimpleFileBrowser/Scripts/FileBrowser.cs:1071) UnityEngine.Events.InvokableCall.Invoke () (at <4eca0aa85b9643a199169bb7e91fc8d3>:0) UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <4eca0aa85b9643a199169bb7e91fc8d3>:0) UnityEngine.UI.Toggle.Rebuild (UnityEngine.UI.CanvasUpdate executing) (at D:/unity/2019.4.0f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Toggle.cs:130) UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at D:/unity/2019.4.0f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:177) UnityEngine.UI.ScrollRect:LateUpdate() (at D:/unity/2019.4.0f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/ScrollRect.cs:805)
Reproduction steps
FileBrowser.ShowLoadDialog((paths => {
//todo
}), () => {
//todo
});
Platform specs
Please provide the following info if this is a Unity 3D repository.
- Unity version: 2019.4.1
- Platform: Windows
- How did you download the plugin: Asset Store version 1.3.6
Additional info
Please check Logcat (Android) or Xcode console (iOS) for any meaningful error messages and include them here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Not during the start of the scene, no, it gets created when I invoke the file browser by clicking on a UI button in my own Canvas. ~But when I was getting the error yesterday, I can’t remember if the SimpleFileBrowserCanvas object was there from the beginning or not, and now I can’t reproduce the exception.~
I did two changes in the SimpleFileBrowserCanvas: I disabled the EventSystem, because I already have one in my scene, and changed the CanvasScaler reference resolution.
EDIT: I managed to reproduce the bug!! It happened while I started the game in the editor while having the SimpleFileBrowserCanvas prefab opened in Prefab mode. Here are the steps to reproduce it in Unity 2020.2.1f1:
I must’ve had the prefab mode open yesterday and didn’t realize it.
Awesome! I was able to reproduce the error on 2018.4, too.