Overtone error with Continute() command

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Overtone error with Continute() command

Post by nathanj »

Hi Tony,

I started getting this error

Code: Select all

MissingReferenceException: The object of type 'SequencerCommandOvertone' 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.
UnityEngine.MonoBehaviour.Invoke (System.String methodName, System.Single time) (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandOvertone.OnGeneratedVoice (UnityEngine.AudioClip clip) (at Assets/Pixel Crushers/Dialogue System Addon for OpenAI/Overtone Integration/Scripts/SequencerCommandOvertone.cs:60)
PixelCrushers.DialogueSystem.OpenAIAddon.Overtone.OvertoneInterface.Speak (System.String text, LeastSquares.Overtone.TTSVoiceNative voice, System.Action`1[T] callback) (at Assets/Pixel Crushers/Dialogue System Addon for OpenAI/Overtone Integration/Scripts/OvertoneInterface.cs:47)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <4b234520e36749be9cf6b053d911690f>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
when I added a Continue() sequence command to my dialogue node. I added this command so that the response buttons would appear instantly - my dialogue node's sequence has these two commands

Code: Select all

Overtone(); Continue()
It doesn't seem to be affecting anything, just get that error message. Is it ok to ignore? Not a big fan of error messages but in this case I don't see it having any impact on the actual game play.

Thank you,
Nathan
User avatar
Tony Li
Posts: 22118
Joined: Thu Jul 18, 2013 1:27 pm

Re: Overtone error with Continute() command

Post by Tony Li »

Hi Nathan,

Thanks for letting me know about this. I'll make sure it's handled in the next update.

The issue is that Overtone() does a call out to the Overtone API and waits for a response. The Continue() command immediately ends the current subtitle, killing the Overtone() sequencer command call, so the response from Overtone has nowhere to go.

You could try changing it to:

Code: Select all

Overtone()->Message(Spoke);
Continue()@Message(Spoke)
This will continue once the Overtone() command is done.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Overtone error with Continute() command

Post by nathanj »

OK, That kind of worked for resolving the error message but I was hoping to have the response buttons appear instantly. Would it be ok just to ignore the error message for now?

With your suggestion it works the same as if there were no Continue() command.

Thank you
Nathan
User avatar
Tony Li
Posts: 22118
Joined: Thu Jul 18, 2013 1:27 pm

Re: Overtone error with Continute() command

Post by Tony Li »

Yes, I think it's okay to ignore the error message until you update to the next (fixed) version.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Overtone error with Continute() command

Post by nathanj »

OK, Thanks again for everything, Tony
Post Reply