On Mon May 19 08:23:31 2025 +0000, Nikolay Sivov wrote:
> I don't think this works, see [1]. You're freeing the same thing using
> two separate counters. My guess is that weak reference has to be a
> separate object, main object would keep a regular reference to it, once
> main thing is released it would clear itself from weak ref object. That
> will be an indication to fail Resolve(). I doesn't seem necessary to
> have multiple weak reference objects, that simplifies things.
> [1] https://gitlab.winehq.org/bernhardu/wine/-/blob/asan-pe_2025-05-06_wine-10.…
I will fix this. Thanks for spotting this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8053#note_103799
Nikolay Sivov (@nsivov) commented about dlls/windows.ui/uisettings.c:
> IUISettings3 IUISettings3_iface;
> IUISettings4 IUISettings4_iface;
> IUISettings5 IUISettings5_iface;
> - LONG ref;
> + IWeakReferenceSource IWeakReferenceSource_iface;
> + IWeakReference IWeakReference_iface;
> + LONG ref_strong;
> + LONG ref_weak;
> };
I don't think this works, see [1]. You're freeing the same thing using two separate counters. My guess is that weak reference has to be a separate object, main object would keep a regular reference to it, once main thing is released it would clear itself from weak ref object. That will be an indication to fail Resolve(). I doesn't seem necessary to have multiple weak reference objects, that simplifies things.
[1] https://gitlab.winehq.org/bernhardu/wine/-/blob/asan-pe_2025-05-06_wine-10.…
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8053#note_103796