Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

[Mac] Fix ref count bug when disposing popups #908

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sevoku
Copy link
Member

@sevoku sevoku commented Jan 8, 2019

This is the same as #906 but for popups

Track XamMac fix 49da6b7
for windows in PopupWindowBackend
@sevoku
Copy link
Member Author

sevoku commented Jan 8, 2019

This is strange, unlike Windows, Popups work without this patch and WITH this I get:

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) Foundation.NSObject.xamarin_release_managed_ref (intptr,Foundation.NSObject) [0x00008] in <9b5a3a239e3d4c98ad13deb53e1aef7c>:0
  at Foundation.NSObject.ReleaseManagedRef () [0x00001] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.6.0.1/src/Xamarin.Mac/Foundation/NSObject2.cs:235
  at Foundation.NSObject/NSObject_Disposer.Drain (Foundation.NSObject) [0x00061] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.6.0.1/src/Xamarin.Mac/Foundation/NSObject2.cs:842
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00021] in <9b5a3a239e3d4c98ad13deb53e1aef7c>:0

Maybe it's because the original XamMac fix does not apply to NSPanels?

@sevoku
Copy link
Member Author

sevoku commented Jan 8, 2019

Related: xamarin/xamarin-macios#990

@Therzok
Copy link
Contributor

Therzok commented Jan 8, 2019

@sevoku NSPanel does not use the NSWindow constructor that has this fix applied.

@Therzok
Copy link
Contributor

Therzok commented Jan 8, 2019

Are NSPanels added to the SharedApplication.Windows array?

Base automatically changed from master to main March 9, 2021 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants