Closed haavamoa closed 1 month ago
➤ dotnet workload list
ios 17.5.8020/8.0.100 SDK 8.0.300
maui 8.0.72/8.0.100 SDK 8.0.300
android 34.0.113/8.0.100 SDK 8.0.300
Hi, @haavamoa !
I've also tried the trace profiling, but no luck there as well :(
Let's try to find the problem using the trace
mode:
Run your iOS application (you can use debug + simulator) with trace. Can you see the following messages?
Can you see the Output File:
message?
If you don't see this message, is your app currently showing your MainPage or it is .NET SplashScreen?
Hi, @haavamoa !
I've also tried the trace profiling, but no luck there as well :(
Let's try to find the problem using the
trace
mode:
- Run your iOS application (you can use debug + simulator) with trace. Can you see the following messages?
- Can you see the
Output File:
message?- If you don't see this message, is your app currently showing your MainPage or it is .NET SplashScreen?
Unfortunately , trace
seems to exit my application once the splash screen is gone.
This was not the behaviour this morning.
I notice you deploy using simulator, I am using a device.
Can you check this behavior with simulator?
I just did, now I get a infamous clang+++ error with AppCenter package when building.
usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1641,3): error : clang++ exited with code 1: [<my-repo-patch>/<my-csproj>csproj::TargetFramework=net8.0-ios]
/usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1641,3): error : ld: in <my-repo-patch>/obj/Debug/net8.0-ios/iossimulator-arm64/linker-cache/AppCenter.a(MSACAppCenter.o), building for iOS Simulator, but linking in object file built for iOS, file '<my-repo-path>/obj/Debug/net8.0-ios/iossimulator-arm64/linker-cache/AppCenter.a' [<my-repo-path>/<my-csproj>csproj::TargetFramework=net8.0-ios]
/usr/local/share/dotnet/x64/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1641,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation) [<my-repo-path>/<my-csproj>csproj::TargetFramework=net8.0-ios]
This is fixed by adding this to the csproj, which makes sure I can build in Rider, but somehow not when I am using .NET Meteor in VSCode :(
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
</PropertyGroup>
Ah yeah, I notice that in VSCode it sets -p:RuntimeIdentifier=iossimulator-arm64
when building, and my property will get overridden.
I forgot to mention I run on Apple Sillicon.
I started using Meteor today, how can I override what it tries to set when building? :)
Yes, you can override it. Update to the latest version (5.3.1
and higher) and use the following workaround:
.vscode/tasks.json
file
{
"version": "2.0.0",
"tasks": [
{
"type": "dotnet-meteor.task",
"target": "build",
"problemMatcher": [
"$dotnet-meteor.problemMatcher"
],
"label": "dotnet-meteor: Build",
"args": [
// It removes auto provided value
"-p:RuntimeIdentifier="
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
And update your launch.json
file
{
"version": "0.2.0",
"configurations": [
{
...
},
// Your new configuration for simulator-x64 only
{
"name": "(simX64) .NET Meteor Debugger",
"type": "dotnet-meteor.debugger",
"request": "launch",
// You can specify path to the application here
"program": "${workspaceFolder}/bin/Debug/net8.0-ios/iossimulator-x64/MauiTestApp.app",
"preLaunchTask": "dotnet-meteor: Build",
}
]
}
And you can select your new configuration here:
Thanks, I followed your steps and added "-p:RuntimeIdentifier=iossimulator-x64"
to my tasks.json
. Now It builds, but it's unable to launch due to looking in the wrong folders:
Failed to launch the simulator: Could not find file '<my-repo-path>/bin/Debug/net8.0-ios/iossimulator-arm64/<myapp>.
We can continue trying to solve this, or can we focus on device? Testing simulator is nice, but device is what I will have to run on when collecting memory dumps / traces in the end of the day.
Also you can try to reproduce it in the new empty project (dotnet new maui). Maybe some library is a reason of this behavior. I can't reproduce this on a simulator or device with the latest version of iOS.
Just tested with this project: https://github.com/DIPSAS/DIPS.Mobile.UI , and it works.
Its nice, but at the same time not as the actual app I want to profile does not work :(
Originally, I wanted to test gcdump on my project. As you see it runs, but it throws exceptions when I dump. Is there anything I can do to get some more details regarding that exception?
/dump -v
command handled by DotNet.Meteor.Debug.GCDumpLaunchAgent
Writing gcdump to '/Users/<myuser>/code/<myproject>/src/<myproject>/.meteor/<myproject>.gcdump'...
0,0s: Creating type table flushing task
0,0s: [Error] Exception during gcdump: System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.Stream.ReadAtLeastCore(Span`1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream)
at System.IO.BinaryReader.InternalRead(Int32 numBytes)
at System.IO.BinaryReader.ReadUInt16()
at Microsoft.Diagnostics.NETCore.Client.IpcHeader.Parse(BinaryReader reader) in /Users/runner/work/1/s/src/DotNet.Diagnostics/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcHeader.cs:line 55
at Microsoft.Diagnostics.NETCore.Client.IpcMessage.Parse(Stream stream) in /Users/runner/work/1/s/src/DotNet.Diagnostics/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcMessage.cs:line 117
I think you can try to remove some nuget packages for testing. Maybe AppCenter
package that you mentioned above...
Hi, this is an awesome project. I just tried it to memory profile my iOS app, but when I do a dump I get the following:
I do get a connected successfully of dotnet-dsrouter:
I've also tried the trace profiling, but no luck there as well :(
I've tried the troubleshooting, but no luck :(
Android works fine, but not iOS :(