Texture parameter value crash

Hi everyone, I’m working on project extending the DMX functionality. Initially I was working with unreal 4.27 and everything worked fine.

I draw materials to render targets in order to achieve some cool effects.

The problem started when I migtared the project from 4.27 to 5.1, now I always get a crash after hitting play (important to note the first time no crash occurs, always the second time), I get an error regarding a render target I use as a texture parameter value. Despite I’m always checking if the render target is valid, it crash no matter what, If I comment out the line where I set the render target as a texture parameter no crash occurs.

This is the crash

And this is the line is causing the problem, the one I set “render target” as a texture parameter

Crash log:
MyDemo.log (176.2 KB)

Any help is really much appreciated, I have tried everything to get rid of this error, and I wouldn’t like to go back to 4.27 (the project works fine there).

Kind regards,

Alex