-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Bug] MAUI templates crashing on iOS (Foundation.NSMutableData:AppendBytes) #61153
Comments
This feels like a bug in iOS since we are using the same code in maui - the only difference is the ios/runtime version. |
The p11 iOS workload contains breaking changes that may very well cause this (the last version doesn't work for other reasons). If you attach a binlog, I can see exactly which version you built with, and check if it's a breaking change or a bug. |
This seems to be an interpreter bug. If I disable the interpreter, the sample works. The crash occurs in
The length is supposed to be 32768 (0x8000), but instead it's a pointer to that value. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This is breaking the default MAUI template, so it's a rather high priority. It's rather obnoxious to reproduce, because of other breaking changes in later commits that hides this problem, but I believe it should be possible by installing .NET 6 (RTM), and then this package: https://bosstoragemirror.blob.core.windows.net/wrench/main/40db84a71e10a549cdcd3dab746120dba3f84554/5378878/package/notarized/Microsoft.iOS.Bundle.15.0.101-preview.11.279.pkg |
/cc @BrzVlad |
Tagging subscribers to this area: @BrzVlad Issue DetailsDescriptionApplication is failing to start
Steps to Reproduce
Expected Behaviordoesn't crash Actual Behaviorcrashes Basic Information
This is acting like an issue with the iOS workloads. If you change the version of MAUI to be p.10 but still use the p.11 iOS workloads the app still crashes.
|
Closed by mistake -- reopening again |
Instead of loading font files into an NSData object via a .NET managed stream, load them by filename via the CGDataProvider directly (no need to marshal the file byte data). This also mitigates the issue addressed in dotnet/runtime#61153 for the specific instance encountered by loading fonts this way.
Instead of loading font files into an NSData object via a .NET managed stream, load them by filename via the CGDataProvider directly (no need to marshal the file byte data). This also mitigates the issue addressed in dotnet/runtime#61153 for the specific instance encountered by loading fonts this way.
Instead of loading font files into an NSData object via a .NET managed stream, load them by filename via the CGDataProvider directly (no need to marshal the file byte data). This also mitigates the issue addressed in dotnet/runtime#61153 for the specific instance encountered by loading fonts this way.
I am not quite sure how it's possible but this bug exists in the Hot Restart code in VS 2022 when running legacy Xamarin code. I'd expect the prebuilt app to use legacy Mono and behave identically to VS 2019 but that's not the case. It crashes with a similar stack trace for the same underlying reasons: Stack trace
The Mono backport (mono/mono#21317) was closed without an explanation. I assumed it's just not needed because the changes in runtime/X.iOS should not be affecting it but apparently some change did affect it. Additional reports of the same issue:
cc @mauroa |
The X.iOS 15.0.0.6 release from 23/09/2021 still used |
Bump mono to get fix for dotnet/runtime#61153. New commits in mono/mono: * mono/mono@45efaa3b6f9 [interp] Remove hack for nint/nfloat * mono/mono@a5d1934898b transform sgen_get_descriptor to parallel safe version in job_major_mod_union_preclean Diff: https://github.com/mono/mono/compare/b8d7525156acaecf311ba468147caa74d8c190f6..45efaa3b6f9bb6aa5e6e2ef82d08ad849a40a34c
Bump mono to get fix for dotnet/runtime#61153. New commits in mono/mono: * mono/mono@45efaa3b6f9 [interp] Remove hack for nint/nfloat * mono/mono@a5d1934898b transform sgen_get_descriptor to parallel safe version in job_major_mod_union_preclean Diff: https://github.com/mono/mono/compare/b8d7525156acaecf311ba468147caa74d8c190f6..45efaa3b6f9bb6aa5e6e2ef82d08ad849a40a34c
Bump mono to get fix for dotnet/runtime#61153. New commits in mono/mono: * mono/mono@45efaa3b6f9 [interp] Remove hack for nint/nfloat * mono/mono@a5d1934898b transform sgen_get_descriptor to parallel safe version in job_major_mod_union_preclean Diff: https://github.com/mono/mono/compare/b8d7525156acaecf311ba468147caa74d8c190f6..45efaa3b6f9bb6aa5e6e2ef82d08ad849a40a34c
Bump mono to get fix for dotnet/runtime#61153. New commits in mono/mono: * mono/mono@45efaa3b6f9 [interp] Remove hack for nint/nfloat * mono/mono@a5d1934898b transform sgen_get_descriptor to parallel safe version in job_major_mod_union_preclean Diff: https://github.com/mono/mono/compare/b8d7525156acaecf311ba468147caa74d8c190f6..45efaa3b6f9bb6aa5e6e2ef82d08ad849a40a34c Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This has been fixed, and the next service release will include the fix. @BrzVlad I believe this bug can be closed now. |
Description
Application is failing to start
Steps to Reproduce
Expected Behavior
doesn't crash
Actual Behavior
crashes
Basic Information
This is acting like an issue with the iOS workloads. If you change the version of MAUI to be p.10 but still use the p.11 iOS workloads the app still crashes.
The text was updated successfully, but these errors were encountered: