https://bugs.winehq.org/show_bug.cgi?id=48732
--- Comment #8 from Zebediah Figura z.figura12@gmail.com --- (In reply to Gabriel Ivăncescu from comment #6)
Right, I was thinking the app does something weird like hook into SetParent. Or perhaps the call exposes a race condition of a deeper issue, which is a bigger concern. (this would just "hide" it)
That seems very unlikely, but if the patch really helps, I don't even know what to think. I'd really like to figure out *why* the patch helps before accepting it, honestly.
I'm as puzzled as you are, but yes, that's where it happened for some reason; I added traces between each call to verify this. It could be an application bug, though (which is also silently ignored on Windows). I'm curious, do you not get this behavior when you try it? (I mean the refcount thing)
Oh, I didn't notice the first time, but apparently the application uses its own presenter. I guess it must release a reference to the filter when its presenter is destroyed. Native seems to handle that well enough, and I guess we do too.
I can reproduce the extra free, but I can't reproduce a crash.