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

MAUI App crash at startup in net9.0.100-preview.6.24328.19 #24025

Closed
prathameshnarkhede opened this issue Aug 6, 2024 · 4 comments
Closed

MAUI App crash at startup in net9.0.100-preview.6.24328.19 #24025

prathameshnarkhede opened this issue Aug 6, 2024 · 4 comments
Labels
p/0 Work that we can't release without partner/macios Issues for the Mac / iOS SDK platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending t/bug Something isn't working

Comments

@prathameshnarkhede
Copy link

prathameshnarkhede commented Aug 6, 2024

Description

This bug is specific to .Net 9 Preview version : net9.0.100-preview.6.24328.19

As soon as application is launched on iOS physical device, the application crashes at launch. Same application works fine with iOS simulators.

Steps to Reproduce

  1. Create MAUI project with `dotnet new maui -n "MyMauiApp"
  2. Run the app on iOS device with Remote login to Mac
    OR
    Create app on Mac and deploy using dotnet build -t:Run -f net9.0-ios -p:RuntimeIdentifier=ios-arm64 -p:_DeviceName=MY_SPECIFIC_UDID

Link to public reproduction project repository

https://github.com/prathameshnarkhede/dotnet9maui.git

No response

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

8.0.3 GA

Affected platforms

iOS

Affected platform versions

iOS Devices

Did you find any workaround?

The same applications works well in simulators but crashes in actual iOS Devices

Relevant log output

INFO: The app MyMauiApp is already deployed on iPhone XS
INFO: Creating command connection...
INFO: Launching...
INFO: [iOS Debugger] Connecting to "iPhone XS" over USB on port 10000...
INFO: /Users/username/Library/Caches/Xamarin/XMA/SDKs/dotnet/packs/Microsoft.iOS.Sdk.net9.0_17.2/17.2.9714-net9-p6/tools/bin/mlaunch --devname "iPhone XS" --killdev "/Users/username/Library/Caches/Xamarin/mtbs/builds/MyMauiApp/f8dedfe896c512b93ffe8bc8543d79a73e193a362c4448d0e1cbe128765dda66/bin/Debug/net9.0-ios/ios-arm64/device-builds/iphone11.2-17.6/MyMauiApp.app" --launchdev "/Users/username/Library/Caches/Xamarin/mtbs/builds/MyMauiApp/f8dedfe896c512b93ffe8bc8543d79a73e193a362c4448d0e1cbe128765dda66/bin/Debug/net9.0-ios/ios-arm64/device-builds/iphone11.2-17.6/MyMauiApp.app" -argument=-monodevelop-port -argument=10000 -argument=-connection-mode -argument=usb --setenv=__XAMARIN_DEBUG_PORT__=10000 --wait-for-unlock   -v --sdkroot "/Applications/Xcode.app/Contents/Developer" -sdk 17.6
INFO: Starting debugger connection to the app 'MyMauiApp'. Debugger port: 55551, Device port: 10000
INFO: Launching app 'MyMauiApp' on device...
INFO: Xamarin.Hosting: Device discovery started
INFO: Using Xcode 15.4 found in /Applications/Xcode.app/Contents/Developer
INFO: Xamarin.Hosting: Connected to iPhone XS (<DEVICE_ID>) in 00:00:00.0030846
INFO: Xamarin.Hosting: Device discovery event: Connected (<DEVICE_ID>)
INFO: Xamarin.Hosting:     Verbosity: 1
INFO: Xamarin.Hosting:     Xcode: /Applications/Xcode.app
INFO: Xamarin.Hosting:     Version: 7dbab91212 (refs/heads/main)
INFO: Xamarin.Hosting:     Xcode Version: 15.4
INFO: Xamarin.Hosting: Xamarin.Hosting
INFO: xcrun devicectl -j /var/folders/9g/fcvcr27d7ls7jnpzdwpk4gv00000gp/T/tmpZSCRSL.tmp -v device info lockState --device "iPhone XS"
INFO: 	? passcodeRequired: false
INFO: 	? deviceIdentifier: <DEVICE_ID>
INFO: 	Current device lock state:
INFO: 	? unlockedSinceBoot: true
INFO: 	Saving JSON output file to /var/folders/9g/fcvcr27d7ls7jnpzdwpk4gv00000gp/T/tmpZSCRSL.tmp
INFO: 	Command Completed, took 0.130 seconds
INFO: 	Using verbose logging.
INFO: xcrun devicectl -j /var/folders/9g/fcvcr27d7ls7jnpzdwpk4gv00000gp/T/tmpALWLIz.tmp -v device process launch --terminate-existing --device "iPhone XS" com.companyname.mymauiapp --monodevelop-port 10000 --connection-mode usb
INFO: 	2024-08-05 18:17:13.519-0700  Acquired usage assertion.
INFO: 	Saving JSON output file to /var/folders/9g/fcvcr27d7ls7jnpzdwpk4gv00000gp/T/tmpALWLIz.tmp
INFO: 	Launched application with com.companyname.mymauiapp bundle identifier.
INFO: 	2024-08-05 18:17:13.414-0700  Enabling developer disk image services.
INFO: 	2024-08-05 18:17:13.350-0700  Acquired tunnel connection to device.
INFO: 	Using verbose logging.
INFO: 	Command Completed, took 0.297 seconds
INFO: The app 'com.companyname.mymauiapp' launched with pid 835
INFO: ...T*...J.......
0x104c3cd78  4c 69 69 38 6b 09 0c 8b 60 01 1f d6 00 00 40 
INFO: [iOS Debugger] Connecting to "iPhone XS" over USB on port 10000...
INFO: [iOS Debugger] Connected to "iPhone XS" over USB on port 10000.
INFO: Waiting for the debugger connection signal...
INFO: Debugger connection completed
INFO: [iOS Debugger] Connected to "iPhone XS" over USB on port 10000.
INFO: Connecting to debug stream from device...
INFO: Connecting to debug console stream...
INFO: Connecting to debug stream from remote debugger...
INFO: Debugger connection signal received
INFO: Connecting to remote debugger on port 55551...
INFO: [iOS Debugger] Connecting to "iPhone XS" over USB on port 10000...
INFO: [iOS Debugger] Connected to "iPhone XS" over USB on port 10000.
INFO: 	0x1c1b93154 - /usr/lib/dyld : <redacted>

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x104c3cd58):0x104c3cd48  ff 83 00 d1 fd 7b 01 a9 fd 43 00 91 c0 19 00 b4  ..
INFO: 	0x104b7a8fc - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : xamarin_main
	0x104d69ffc - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : main

INFO: _method
	0x104d28b04 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : interp_runtime_invoke
	0x104cf6e2c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_jit_runtime_invoke
	0x104c9ae78 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_runtime_invoke_checked
	0x104c55c9c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : create_exception_two_strings
	0x104c55a20 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_exception_from_name_two_strings_checked
	0x104c34080 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_runtime_init_checked
	0x104cf64c0 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiA
INFO: pp : mini_init
	0x104cfc73c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_jit_init_version
	0x104b757b8 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : xamarin_bridge_initialize

INFO: _platform.dylib : <redacted>
	0x104c4a740 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_class_create_ptr
	0x104c4a740 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_class_create_ptr
	0x104d3a5c4 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : interp_method_compute_offsets
	0x104d4c888 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : generate
	0x104d4c43c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_interp_transform_method
	0x104d36878 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : do_transform_method
	0x104d2a60c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_interp_exec
INFO: 
=================================================================
	Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0x104d275c4 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_dump_native_crash_info
	0x104d11efc - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_handle_native_crash
	0x104cf3cc4 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_sigsegv_signal_handler_debug
	0x1fad86e9c - /usr/lib/system/libsystem
INFO: Disposing input and output streams...
ERROR: An error occurred while writing to the debug stream. Details: ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, UsbStream
The app has been terminated.
INFO: 	0x104d4c43c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_interp_transform_method
	0x104d36878 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : do_transform_method
	0x104d2a60c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_interp_exec_method
	0x104d28b04 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : interp_runtime_invoke
	0x104cf6e2c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_jit_runtime_invoke
	0x104c9ae78 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_runtime_invoke_checked
	0x104c55c9c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : create_exception_two_strings

INFO: 	0x104c55a20 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_exception_from_name_two_strings_checked

INFO: 	0x104c34080 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_runtime_init_checked

INFO: 	0x104cf64c0 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mini_init
	0x104cfc73c - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_jit_init_version
	0x104b757b8 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : xamarin_bridge_initialize
	0x104b7a8fc - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : xamarin_main
	0x104d69ffc - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : main
	0x1c1b93154 - /usr/lib/dyld : <redacted>

Exiting early due to double fault.

INFO: Closing debug connection from device (USB)
INFO: Disposing input and output streams...
ERROR: An error occurred when writing to the output stream. Details: net_io_readfailure, Operation canceled
INFO: Closing debug connection from remote debugger (TCP)
INFO: 	0x104c4a740 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_class_create_ptr
	0x104c4a740 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_class_create_ptr
	0x104d3a5c4 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : interp_method_compute_offsets
	0x104d4c888 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : generate

INFO: Disposing console and debugger streams...
INFO: 	0x104d11efc - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_handle_native_crash
	0x104cf3cc4 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_sigsegv_signal_handler_debug
	0x1fad86e9c - /usr/lib/system/libsystem_platform.dylib : <redacted>

INFO: 
=================================================================
	Native stacktrace:
=================================================================
	0x104d275c4 - /private/var/containers/Bundle/Application/55C3B642-2745-4BE6-97FE-B14CDD518352/MyMauiApp.app/MyMauiApp : mono_dump_native_crash_info

INFO: f9  Lii8k...`.....@.

=================================================================
	Managed Stacktrace:
=================================================================
=================================================================

=================================================================
	Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

An error has occurred in the native fault reporting. Some diagnostic information will be unavailable.

INFO: ...{...C......
0x104c3cd58  08 08 40 b9 08 5d 10 53 09 05 00 51 3f 75 00 71  ..@..].S...Q?u.q
0x104c3cd68  e8 19 00 54 2a 0b 00 f0 4a a1 04 91 8b 00 00 10  
INFO: The application has been launched
INFO:
@prathameshnarkhede prathameshnarkhede added the t/bug Something isn't working label Aug 6, 2024
Copy link
Contributor

github-actions bot commented Aug 6, 2024

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.

@jfversluis jfversluis added the s/needs-repro Attach a solution or code which reproduces the issue label Aug 6, 2024
@prathameshnarkhede
Copy link
Author

Here is the GitHub repository link to repro sample application.

https://github.com/prathameshnarkhede/dotnet9maui.git

Just need to replace provisioning profile settings for iOS in csproj file to make application work on iOS.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Aug 6, 2024
@prathameshnarkhede
Copy link
Author

Update: I was able to deploy application with Hot Reload in Visual Studio Version 17.11.0 Preview 6.0 from Windows Machine. But it's still failing with deploy from Mac.

@PureWeen
Copy link
Member

PureWeen commented Aug 8, 2024

This will be fixed with preview.7

dotnet/runtime#105408

@PureWeen PureWeen closed this as completed Aug 8, 2024
@PureWeen PureWeen added partner/macios Issues for the Mac / iOS SDK p/0 Work that we can't release without and removed s/needs-attention Issue has more information and needs another look labels Aug 8, 2024
@samhouts samhouts added platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending labels Aug 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p/0 Work that we can't release without partner/macios Issues for the Mac / iOS SDK platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants