OBS Bug Caused by Integration and Text GDI Filter

I'm integrating streamer.bot with OBS and creating an action which will change the text of and make visible a Text GDI source with an attached Scroll filter. Upon execution of the code the text source either fails to change value and be made visible, or it successfully does so but the OBS preview window breaks leaving no easy way of knowing that the action somewhat worked. I receive no error pop-ups, not even if I reproduce the issue, however I'm not sure where to locate any sort of output log through OBS.
 
I can do so via manually inputting these changes through the UI interface however I'd like to do so through C# code, I believe the problem derives when I use C#'s methods of delaying time. Upon a user's first time typing in my chat, I fire the following C# code, which compiles fine yet breaks OBS.

using System;
using System.Threading.Tasks;

public class CPHInline
{
// Wait for 5 seconds asynchronously
public static async Task RunWait()
{
await Task.Delay(5000);
}

public bool Execute()
{
// Wait for source invisibility
if (CPH.ObsIsSourceVisible("Main", "Notifications Label") == true)
{
while (CPH.ObsIsSourceVisible("Main", "Notifications Label") == true)
{
CPHInline.RunWait();
}
}

// Change text
CPH.ObsSetGdiText("Main", "Notifications Label", "Welcome to the stream, newbie!"); // %targetUser%

// Make visible
CPH.ObsSetSourceVisibility("Main", "Notifications Label", true);

// Wait 5 seconds
CPHInline.RunWait();

// Make invisible
CPH.ObsSetSourceVisibility("Main", "Notifications Label", false);

// your main code goes here
return true;
}
}
 
Top