How can something that works in Debug and Development fail in a Shipping build?

I’m stumped and I need some help from the community. I have been updating my shipping VR game from 1.47 to 5.4.4. It has taken several weeks of nearly full time effort. One of the last hurdles was updating a plugin that captures the content of a named window on my PC and renders the image into an UE5 material. (Windowcapture2d) I have managed to correct all of the compiler errors that resulted from the necessary change to MSVC 2022.
The plugin is once again working when I play in editor, displaying correctly the PC window on a virtual screen in the game, but when I run the packaged-shipping version, the virtual screen is black.
I don’t know where to begin debugging this. Perhaps I will package a development or debug version, to see if the issue remains. When building the plugin, I have used both Editor and Shipping settings, so appropriate dll’s should be available.
Please, can anyone suggest what else I should try?

UPDATE: Building a debug or development version, launching from VS2020 using “Start without Debugging”, the display appears correctly. Building a Shipping version and launching from VS2020, the screen is black. To allow some debugging to occur in the shipping version, I added some text components to my screen onbject, and I display the MID and Texture2D object references, and they appear fine.

I have looked for error messages in the output during packaging, and I find none.

My Question is: What (if anything) is fundamentally different in a Packaged Shipping build from a Packaged Development build? How is it that something would work fine in one but not the other?

I found these errors in my output once… I think they are relevant but I don’t see any problems in the code in the listed modules

LogOutputDevice: Error: [Callstack] 0x00007ffae4ba3889 UnrealEditor-WindowCapture2D.dll!UCaptureMachine::UpdateTexture() [D:\Users\Thomas Low\Documents\Unreal Projects\TFFE2\Plugins\WindowCapture2D\Source\WindowCapture2D\Private\CaptureMachine.cpp:208]
LogOutputDevice: Error: [Callstack] 0x00007ffae4ba2c67 UnrealEditor-WindowCapture2D.dll!UCaptureMachine::DoCapture() [D:\Users\Thomas Low\Documents\Unreal Projects\TFFE2\Plugins\WindowCapture2D\Source\WindowCapture2D\Private\CaptureMachine.cpp:121]
LogOutputDevice: Error: [Callstack] 0x00007ffae4ba7583 UnrealEditor-WindowCapture2D.dll!FWCWorkerThread::Run() [D:\Users\Thomas Low\Documents\Unreal Projects\TFFE2\Plugins\WindowCapture2D\Source\WindowCapture2D\Private\Utils\WCWorkerThread.cpp:34]

What do these errors (Callstack) signify? Running the working development and failing shipping builds with the VC2022 debugger doesn’t reveal any issues to me. Functions return reasonable pointers, and program flow appears the same.

I have made a small project that can be shared if anyone can help. I found on-line a git repo with a version of FFMPEG that was updated to run under 5.4. Using this, I still see the same behavior.

The typical source of “works in debug build but not in release build” problems is uninitialised variables. In debug builds the memory has been zeroed, in release builds it has not. That usually leads to crashes in the release build, which appears to be what is happening here, but in a thread so not bringing the whole program down.

I was going to suggest contacting the plugin author, but I looked it up and the most recent version of UE it is available for is 5.0, so I am guessing they aren’t working on it anymore and it is maybe not surprising it doesn’t work in 5.4.4 :frowning: