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

[iOS, 9.0 Preview 6] Build process of iOS projects with SkiaSharp hangs up in Release configuration in Visual Studio 17.11.0 Preview 4.0 #23776

Open
janne-hmp opened this issue Jul 23, 2024 · 3 comments
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@janne-hmp
Copy link

Description

When using Visual Studio 17.11.0 Preview 4.0 to build a project using .NET MAUI 9.0 Preview 6 and SkiaSharp in Release configuration for iOS, the build process hangs up indefinitely in the AOT compilation step. Debug configuration for iOS works fine. Other platforms work fine, too, as does. Xamarin iOS in both configurations. Both SkiaSharp 3.0 Preview 3.1 and 4.1 do hang up, so it is not about (the latest) SkiaSharp version. Also, projects without SkiaSharp build fine for iOS in Release configuration.

Steps to Reproduce

  1. Rebuild the sample project at https://github.com/hyvanmielenpelit/iOSMauiSkiaSharpMemoryLeak in Release configuration using .NET MAUI 9.0 Preview 6 and Visual Studio 17.11.0 Preview 4.0 (using Rebuild) for net9.0-ios.
  2. The build process hangs up indefinitely in AOT compilation. In Debug configuration, it does not hang up.

Link to public reproduction project repository

https://github.com/hyvanmielenpelit/iOSMauiSkiaSharpMemoryLeak

Version with bug

9.0.0-preview.6.24327.7

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.0-preview.5.24307.10

Affected platforms

iOS

Affected platform versions

iOS 17.5.1, but build did not finish for deplayment

Did you find any workaround?

No, but probably would have to use .NET 9.0 Preview 5 and Visual Studio 17.11.0 Preview 3.0

Relevant log output

1>        Done building target "IncrementalClean" in project "SkiaSharpMemoryLeak.csproj".
1>        Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')) was evaluated as ('' != '' and ('' != 'OnOutputUpdated' or '' != '')).
1>        Target "GenerateBuildDependencyFile" skipped. Previously built successfully.
1>        Target "GenerateBuildRuntimeConfigurationFiles" skipped. Previously built successfully.
1>        Target "CoreBuild" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets":
1>        Done building target "CoreBuild" in project "SkiaSharpMemoryLeak.csproj".
1>        Target "AfterBuild" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets":
1>        Done building target "AfterBuild" in project "SkiaSharpMemoryLeak.csproj".
1>        Target "_CheckBrowserWorkloadNeededButNotAvailable" skipped, due to false condition; ('$(RuntimeIdentifier)' == 'browser-wasm' and '$(_BrowserWorkloadDisabled)' != 'true' and '$(WasmNativeWorkloadAvailable)' != 'true') was evaluated as ('win10-x64' == 'browser-wasm' and '' != 'true' and '' != 'true').
1>        Target "_ErrorWorkloadDisabledForTFMLessThan6" skipped, due to false condition; ('$(_BrowserWorkloadNotSupportedForTFM)' == 'true') was evaluated as ('' == 'true').
1>        Target "_ErrorDualWasmThreadPropsOn7" skipped, due to false condition; ('$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and
1>            '$(BrowserWorkloadDisabled)' != 'true' and '$(WasmEnableThreads)' == 'true' and '$(WasmEnablePerfTrace)' == 'true') was evaluated as ('' == 'true' and 'win10-x64' == 'browser-wasm' and
1>            '' != 'true' and '' == 'true' and '' == 'true').
1>        Target "Build" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets":
1>        Done building target "Build" in project "SkiaSharpMemoryLeak.csproj".
1>        Target "CallPublishContainerSdkContainerProfile" skipped, due to false condition; ('$(EnableSdkContainerDebugging)' == 'true' AND '$(SdkContainerPublishOnBuild)' == 'true') was evaluated as ('' == 'true' AND '' == 'true').
1>        Target "_CalculatePostXamarinTelemetry" skipped. Previously built successfully.
1>        Target "_PostXamarinTelemetry" skipped. Previously built successfully.
1>        Target "RestorePackageVersion" skipped, due to false condition; ('$(InteractiveExperiencesVersion)'!='') was evaluated as (''!='').
1>        Target "_PackAsBuildAfterTarget" skipped, due to false condition; ('$(GeneratePackageOnBuild)' == 'true' AND '$(IsInnerBuild)' != 'true') was evaluated as ('false' == 'true' AND 'true' != 'true').
1>        Target "_CheckContainersPackage" in file "C:\Program Files\dotnet\sdk\9.0.100-preview.6.24328.19\Containers\build\Microsoft.NET.Build.Containers.targets":
1>          Set Property: _ContainersPackageIdentity=Microsoft.NET.Build.Containers
1>          Set Property: _WebDefaultSdkVersion=7.0.300
1>          Set Property: _WorkerDefaultSdkVersion=8.0.100
1>          Set Property: _ConsoleDefaultSdkVersion=8.0.200
1>          Set Property: _SdkCanPublishWeb=True
1>          Set Property: _SdkCanPublishWorker=True
1>          Set Property: _SdkCanPublishConsole=True
1>          Set Property: _ContainerPackageIsPresent=false
1>          Set Property: _IsWebProject=false
1>          Set Property: _IsWorkerProject=false
1>          Task "Warning" skipped, due to false condition; ($(_ContainerPackageIsPresent)
1>                  and (
1>                    ($(_SdkCanPublishWeb) and $(_IsWebProject)) or
1>                    ($(_SdkCanPublishWorker) and $(_IsWorkerProject)) or
1>                    ($(_SdkCanPublishConsole) and '$(EnableSdkContainerSupport)' == 'true')
1>                  )) was evaluated as (false
1>                  and (
1>                    (True and false) or
1>                    (True and false) or
1>                    (True and '' == 'true')
1>                  )).
1>        Done building target "_CheckContainersPackage" in project "SkiaSharpMemoryLeak.csproj".
1>        Target "AfterRebuild" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets":
1>        Done building target "AfterRebuild" in project "SkiaSharpMemoryLeak.csproj".
1>        Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
1>        Target "Rebuild" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets":
1>        Done building target "Rebuild" in project "SkiaSharpMemoryLeak.csproj".
1>
1>        Done building project "SkiaSharpMemoryLeak.csproj".
1>        [xma][info]: Pinging client 'Broker'...
1>        [xma][info]: Sending Request Xamarin.Messaging.PingMessage to topic xma/ping/Broker
1>        [xma][info]: Received Response of Xamarin.Messaging.PingMessage to topic build3160817324janne/ /xma/ping/Broker
1>        [xma][info]: The client 'Broker' has acknowledged the ping
1>        [xma][info]: Pinging client 'Broker'...
1>        [xma][info]: Sending Request Xamarin.Messaging.PingMessage to topic xma/ping/Broker
1>        [xma][info]: Received Response of Xamarin.Messaging.PingMessage to topic build3160817324janne/ /xma/ping/Broker
1>        [xma][info]: The client 'Broker' has acknowledged the ping
1>        [xma][info]: Pinging client 'Broker'...
1>        [xma][info]: Sending Request Xamarin.Messaging.PingMessage to topic xma/ping/Broker
1>        [xma][info]: Received Response of Xamarin.Messaging.PingMessage to topic build3160817324janne/ /xma/ping/Broker
1>        [xma][info]: The client 'Broker' has acknowledged the ping
1>        [xma][info]: Pinging client 'Broker'...
1>        [xma][info]: Sending Request Xamarin.Messaging.PingMessage to topic xma/ping/Broker
1>        [xma][info]: Received Response of Xamarin.Messaging.PingMessage to topic build3160817324janne/ /xma/ping/Broker
1>        [xma][info]: The client 'Broker' has acknowledged the ping

Never finishes, ping continues forever in Release.
@janne-hmp janne-hmp added the t/bug Something isn't working label Jul 23, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 24, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.11.0 Preview 5.0(9.0.0-preview.6.24327.7). Can repro on iOS platform. And 9.0.0-preview.6.24327.7 also repro this issue.

@janne-hmp
Copy link
Author

This is still a problem in Visual Studio 17.12.0 and .NET 9.0 Preview 7. The known workaround is to add <MtouchUseLlvm>false</MtouchUseLlvm> to the project.

@samhouts samhouts added the area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants