Loading function does not work with NullReferenceException

The engine is not working as expected? Documentation is wrong or out of date? Let us know here!
Forum rules
We are not providing support via this forum; it's community-driven. For official support see https://naninovel.com/support/#naninovel-support
Post Reply
behindname
Posts: 2
Joined: 02 Jun 2023 09:02

Loading function does not work with NullReferenceException

Post by behindname »

Good day, sir.
I'm creating visual novel by naninovel, and following guide in official document.
Everything is ok but loading.... The save-loading system does not work. Game loading never ends.

Can be it problem if I use korean script? My script is written in Korean and Old Chinese alphabet character (in taiwan).
Please give me guide if some knows.
My Unity version is 2019.4.35f1 and Naninovel v.1.18

NullReferenceException: Object reference not set to an instance of an object
Naninovel.ScriptPlaylist.IndexOf (Naninovel.PlaybackSpot playbackSpot) (at Assets/Naninovel/Runtime/ScriptPlayer/ScriptPlaylist.cs:138)
Naninovel.ScriptPlayer.FindPlayableIndex (Naninovel.PlaybackSpot spot) (at Assets/Naninovel/Runtime/ScriptPlayer/ScriptPlayer.cs:491)
Naninovel.ScriptPlayer+<>c__DisplayClass98_0+<<LoadServiceStateAsync>g__LoadPlayingStateAsync|1>d.MoveNext () (at Assets/Naninovel/Runtime/ScriptPlayer/ScriptPlayer.cs:237)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Naninovel.UniTaskCompletionSource.Naninovel.Async.IAwaiter.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTaskCompletionSource.cs:91)
Naninovel.UniTask.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:46)
Naninovel.UniTask+Awaiter.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:201)
Naninovel.ScriptPlayer+<LoadServiceStateAsync>d__98.MoveNext () (at Assets/Naninovel/Runtime/ScriptPlayer/ScriptPlayer.cs:222)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Naninovel.UniTaskCompletionSource.Naninovel.Async.IAwaiter.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTaskCompletionSource.cs:91)
Naninovel.UniTask.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:46)
Naninovel.UniTask+Awaiter.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:201)
Naninovel.StateManager+<LoadAllServicesFromStateAsync>d__87`2[TService,TState].MoveNext () (at Assets/Naninovel/Runtime/State/StateManager.cs:288)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Naninovel.UniTaskCompletionSource.Naninovel.Async.IAwaiter.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTaskCompletionSource.cs:91)
Naninovel.UniTask.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:46)
Naninovel.UniTask+Awaiter.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:201)
Naninovel.StateManager+<LoadGameAsync>d__71.MoveNext () (at Assets/Naninovel/Runtime/State/StateManager.cs:161)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Naninovel.UniTaskCompletionSource`1[T].Naninovel.Async.IAwaiter<T>.GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTaskCompletionSource.cs:239)
Naninovel.UniTask`1[T].get_Result () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:276)
Naninovel.UniTask`1+Awaiter[T].GetResult () (at Assets/Naninovel/Runtime/Common/Async/UniTask/Public/UniTask.cs:400)
Naninovel.UI.SaveLoadMenu+<HandleLoadSlotClicked>d__43.MoveNext () (at Assets/Naninovel/Runtime/UI/SaveLoad/SaveLoadMenu.cs:153)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

behindname
Posts: 2
Joined: 02 Jun 2023 09:02

Re: Loading function does not work with NullReferenceException

Post by behindname »

Sorry, I have solved this problem. The problem was the wrong script, like '[가나다]' text in my script. Sorry for wrong question. This post may be deleted I think.

Post Reply