Game is crashing after calling Set Pause

I have recently started working with the UE4, and am setting up a prototype build for a project. I started with a basic c++ code project, but so far I have been primarily using the Blueprints scripting system. In my program, I have it set up that the users can click a button, or press spacebar to call Set Pause on the game.

Everything works fine while debugging in the editor, but as soon as I run a packaged version of the game, I start having issues. If I pause the game, and then let it sit paused for about 30 seconds, it crashes.

The log tells me, “Invalid object in GC,” referencing my GameMode class. After which it logs there has been a critical error. The dump file tells me that the exception that was thrown was “Incorrect Function,” and the stack trace follows the garbage collection thread and isn’t very helpful.

About my set-up: My Game Mode class is currently a Blueprint only class, that handles some updating of a timer and the positioning of cinematic camera’s with the Oculus Rift enabled. I have made some modifications to the engine itself, but they have been very minor, namely, I changed the update of the Matinee Sound Track Interpolation, so that it keeps the audio playback synchronized with the position in time of the Matinee playback; I changed the toggle track so that it would fire events when jumping backwards as well as forwards; Finally, I also commented out the line that draws the blue “PAUSE” text when the game is paused.

Am at a loss as to the true cause of this crash. Was it something I did in my blueprint event graph? Is it an unforeseen problem in Blueprints itself? Is it something to do with the Garbage Collection thread directly? Is it my fault, or something in the engine? Any help would be greatly appreciated.

I’d imagine setting blue text alpha to 0 would be safer than just commenting it out.
But I doubt anyway that’s what 's causing troubles.

Whatever the problem was, it seems to have been resolved by the 4.1 update.