Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[runtime] Add support for keeping the same block alive multiple times. Fixes #18161. #18277

Conversation

rolfbjarne
Copy link
Member

We can be asked to keep the same block+delegate pair alive multiple times, so
add support for keeping track how many times a block must be freed once the
corresponding delegate is collected by the GC.

Fixes #18161.

rolfbjarne and others added 2 commits May 15, 2023 19:12
…Fixes xamarin#18161.

We can be asked to keep the same block+delegate pair alive multiple times, so
add support for keeping track how many times a block must be freed once the
corresponding delegate is collected by the GC.

Fixes xamarin#18161.
@github-actions
Copy link
Contributor

⚠️ Your code has been reformatted. ⚠️

If this is not desired, add the actions-disable-autoformat label, and revert the reformatting commit.

If files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

1 tests crashed, 43 tests failed, 180 tests passed.

Failures

❌ fsharp tests

2 tests failed, 5 tests passed.
  • fsharp/tvOS - simulator/Debug: BuildFailure (Harness exception for 'fsharp': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/4/s/xamarin-macios/tests/fsharp/generated-projects/tvos/fsharp-tvos.fsproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • fsharp/watchOS 32-bits - simulator/Debug: BuildFailure (Harness exception for 'fsharp': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/4/s/xamarin-macios/tests/fsharp/generated-projects/watchos/fsharp-watchos.fsproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )

Html Report (VSDrops) Download

❌ framework tests

2 tests failed, 6 tests passed.
  • framework-test/tvOS - simulator/Debug: BuildFailure (Harness exception for 'framework-test': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/2/s/xamarin-macios/tests/framework-test/iOS/generated-projects/tvos/framework-test-ios-tvos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • framework-test/watchOS 32-bits - simulator/Debug: BuildFailure (Harness exception for 'framework-test': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/2/s/xamarin-macios/tests/framework-test/iOS/generated-projects/watchos/framework-test-ios-watchos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )

Html Report (VSDrops) Download

❌ interdependent_binding_projects tests

2 tests failed, 5 tests passed.
  • interdependent-binding-projects/tvOS - simulator/Debug: BuildFailure (Harness exception for 'interdependent-binding-projects': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/1/s/xamarin-macios/tests/interdependent-binding-projects/generated-projects/tvos/interdependent-binding-projects-tvos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • interdependent-binding-projects/watchOS 32-bits - simulator/Debug: BuildFailure (Harness exception for 'interdependent-binding-projects': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/1/s/xamarin-macios/tests/interdependent-binding-projects/generated-projects/watchos/interdependent-binding-projects-watchos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )

Html Report (VSDrops) Download

❌ introspection tests

3 tests failed, 5 tests passed.
  • introspection/iOS Unified 64-bits - simulator/Debug: BuildFailure
  • introspection/tvOS - simulator/Debug: BuildFailure (Harness exception for 'introspection': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/2/s/xamarin-macios/tests/introspection/iOS/generated-projects/tvos/introspection-ios-tvos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • introspection/watchOS 32-bits - simulator/Debug: BuildFailure (Harness exception for 'introspection': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/2/s/xamarin-macios/tests/introspection/iOS/generated-projects/watchos/introspection-ios-watchos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )

Html Report (VSDrops) Download

❌ linker tests

12 tests failed, 53 tests passed.
  • dont link/tvOS - simulator/Debug: BuildFailure (Harness exception for 'dont link': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/1/s/xamarin-macios/tests/linker/ios/dont link/generated-projects/tvos/dont link-tvos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • dont link/tvOS - simulator/Release: BuildFailure (Harness exception for 'dont link': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/1/s/xamarin-macios/tests/linker/ios/dont link/generated-projects/tvos/dont link-tvos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • dont link/watchOS 32-bits - simulator/Debug: BuildFailure (Harness exception for 'dont link': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/1/s/xamarin-macios/tests/linker/ios/dont link/generated-projects/watchos/dont link-watchos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • dont link/watchOS 32-bits - simulator/Release: BuildFailure (Harness exception for 'dont link': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/1/s/xamarin-macios/tests/linker/ios/dont link/generated-projects/watchos/dont link-watchos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • link all/tvOS - simulator/Debug: BuildFailure (Harness exception for 'link all': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/work/1/s/xamarin-macios/tests/linker/ios/link all/generated-projects/tvos/link all-tvos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.PListExtensions.LoadWithoutNetworkAccess (System.Xml.XmlDocument doc, System.String filename) [0x00000] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/PlistExtensions.cs:29
    at Xharness.TestProject.CreateCopyAsync (Microsoft.DotNet.XHarness.Common.Logging.ILog log, Microsoft.DotNet.XHarness.Common.Execution.IProcessManager processManager, Xharness.Jenkins.TestTasks.ITestTask test, System.String rootDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] allProjectReferences) [0x00105] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/TestProject.cs:98
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x0011d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:260 )
  • link all/tvOS - simulator/Release: BuildFailure (Harness exception for 'link all': System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/builder/azdo/_work/1/s/xamarin-macios/tests/linker/ios/link all/generated-projects/tvos/link all-tvos.csproj".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0015e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:223
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/20\n\nThe message from CI is too large for the GitHub comments. You can find the full results here.

@github-actions
Copy link
Contributor

⚠️ Your code has been reformatted. ⚠️

If this is not desired, add the actions-disable-autoformat label, and revert the reformatting commit.

If files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne marked this pull request as ready for review May 16, 2023 10:47
@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [CI Build] Windows Integration Tests failed ❌

❌ Failed ❌

Pipeline on Agent
Hash: f243be4f102c52cb4bd2fcc36eee148f6789b2dd [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

✅ Generator diff

Generator diff is empty

Pipeline on Agent
Hash: f243be4f102c52cb4bd2fcc36eee148f6789b2dd [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻

All tests on macOS M1 - Mac Ventura (13.0) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: f243be4f102c52cb4bd2fcc36eee148f6789b2dd [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: simulator tests.

🎉 All 227 tests passed 🎉

Tests counts

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 27 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: f243be4f102c52cb4bd2fcc36eee148f6789b2dd [PR build]

@rolfbjarne rolfbjarne merged commit 70de850 into xamarin:main May 17, 2023
@rolfbjarne rolfbjarne deleted the issue-18161-multiple-blocks-to-be-kept-alive branch May 17, 2023 12:14
@rolfbjarne
Copy link
Member Author

/sudo backport release/7.0.2xx-xcode14.3

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch release/7.0.2xx-xcode14.3 Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=7794131 for more details.

dalexsoto pushed a commit that referenced this pull request May 24, 2023
…e block alive multiple times. Fixes #18161. (#18303)

We can be asked to keep the same block+delegate pair alive multiple
times, so
add support for keeping track how many times a block must be freed once
the
corresponding delegate is collected by the GC.

Fixes #18161.


Backport of #18277

Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Blocks marshalling in 8.0 sometimes fails with ArgumentException
5 participants