I've noticed similar behavior in recent Mendix versions (6.3.1. at the moment). In the most clear-cut example, I have a subflow that only does two things:
Most of the time, this works as it should, but with some frequency the 'retrieve over association' action will give a nullpointer exception, despite the fact that the log confirms the input parameter is present. It appears as if the memory references for the associated objects exist, but that the actual objects have been GCed.
Yes, I have seen this happening also. And indeed the problem is that you never can reproduce the error. Trying to do a same setup in a new project always works as expected. But the last couple of months I had to change over reference to database in four or five places in our model.
Regards,
Ronald
I remember a specific case on Mendix 5.15 where I built a microflow specifically to retrieve an object over association. If this returned empty it would try again from database and then return the result.
Like in your case we were not able to consistently reproduce the problem, but after my fix it consistently worked.
So yes, I think I recognize your issue, but I was also able to reproduce it locally, although not consistently.