dotnet / dotnet/macios

Changing interpreter setting (or codesigning) without manual clean can cause confusing runtime errors

Open
#15,757 1 comment 0 reactions 0 assignees View on GitHub
bug low-priority
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

Found in looking at https://github.com/xamarin/xamarin-macios/issues/15681

### Steps to Reproduce

1. Create a new iOS app
2. Run on device in release mode
3. Enable the interpreter
4. Run again

### Expected Behavior

Application launches with no crash

### Actual Behavior

```
2022-08-24 09:34:31.631 mauiAotProblem[1586:289107] *** Terminating app due to uncaught exception 'ObjCRuntime.RuntimeException', reason: 'Failed to marshal the Objective-C object 0x28383aa00 (type: AppDelegate). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'mauiAotProblem.AppDelegate' does not have a constructor that takes one NativeHandle argument).
Additional information:
Selector: respondsToSelector:
Method: Microsoft.Maui.MauiUIApplicationDelegate:RespondsToSelector (ObjCRuntime.Selector)
(ObjCRuntime.RuntimeException)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.