Hey @yaya,
okay, and your your plugin hook is ObjectData, right? Your plugin is the 'RagDoll' entity, in your screen grab? It is really hard to get here anywhere without code, but here are a few guesses:
Are you 'abusing' your ObjectData hook by modifying the scene it is contained in? ObjectData is bound to the
threading restrictions in most of its methods, because most run not on the main thread. This is more relevant than ever with 2024, because more methods have been parallelized. You can modify the scene from an ObjectData plugin, but you must be on the main thread to do it, by for example defer execution to the MT or use a method like Message which often runs on the MT (but I would still avoid doing it when possible). Modyfing the scene means for example inserting, objects, materials, shaders, etc. or adding events. Modifying your cache to your likeing in getVirtualObjects is of course okay.
This could also be a nasty side effect of the new
data access system.
But these two are of course fairly speculative since I almost know nothing about your plugin. And you said, when I understand you correctly, that you already this problem in the past, and then somehow fixed it by illegally freeing the selection of the object.
I would recommend doing the following things:
Reduce the complexity of your example scene, that thing is way too complex. Make it as simple as possible by removing as many things as possible with the problem still happening.
Run Make Editable and Current State to Object separately on instances of your faulty plugin output. Analyze the content of the caches to see what is actually happening in the places "where things go wrong". Either you are somehow missing full objects in your cache or skip some data, etc.
Just do normal debugging then: Set a breakpoint on GetVirtualObjects in your plugin and step through the code, trying to figure out when you "loose" parts. Avoid skipping 'boring' parts as you easily miss the problem then.
Other than that, I will have to see code, because otherwise there is no magic wand move with which I could guess what is going wrong here for you.
Cheers,
Ferdinand