x:Array as resource with key crashes app on device launch
See original GitHub issueDescription
This works in the iOS simulator and on desktop. The goal is to have an array of data I can reuse by key.
<?xml version="1.0" encoding="UTF-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<x:Array Type="{x:Type x:String}" x:Key="CategoriesArray">
<x:String>Noodles</x:String>
<x:String>Rice</x:String>
<x:String>Appetizers</x:String>
<x:String>Desserts</x:String>
<x:String>Beverages</x:String>
</x:Array>
</ResourceDictionary>
This initially was in the Styles.xaml which I split apart for troubleshooting and used merged dictionaries.
That doesn’t work on an iOS device. I get an error about the type converter failing.
The below however does work on the ContentPage
s:
<BindableLayout.ItemsSource>
<x:Array Type="{x:Type x:String}" >
<x:String>Noodles</x:String>
<x:String>Rice</x:String>
<x:String>Appetizers</x:String>
<x:String>Desserts</x:String>
<x:String>Beverages</x:String>
</x:Array>
</BindableLayout.ItemsSource>
Steps to Reproduce
Add an array with key to your styles, bind to a BindableLayout, and then run on an iOS device.
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15
Did you find any workaround?
don’t use a resource
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:18 (13 by maintainers)
Top Results From Across the Web
Why does my kernel restarts/dies when displaying or ...
1 Answer 1 ... xr.DataArray.values is a property which returns all of the data as a numpy array. Numpy has no concept of...
Read more >ChangeLog
Without the patch, the crash fails to start a session with the error message: /var/tmp/ramdump_elf_XXXXXX: ELF header read: No such file or directory...
Read more >Troubleshooting Reader Connectivity Issues
Press the Windows key and R at the same time. Run dialog opens. Enter devmgmt.msc and click OK button. If prompted, choose Yes....
Read more >Fix memory problems - Microsoft Edge Development
Use Microsoft Edge DevTools to find memory issues that affect page performance, including memory leaks, memory bloat, and frequent garbage ...
Read more >Active questions tagged crash - Stack Overflow - RSSing.com
My iOS application is crashing randomly in a remote site due to a CPU usage warning, which is not reported in Crashlytics.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi,
The issue happens also when we publish Android app with AOT enable.
Regards.
I can also attest that this issue is still happening. On a blank MAUI template project, adding
x:String
entries to theStyles.xaml
resource dictionary causes the app to crash when it is deployed to a device (iOS and Android). Interestingly, it only occurs when<MtouchLink>
is set toSdkOnly
in the csproj file. If it is set toNone
, the problem goes away.This is a serious blocker to a project I am working on.
My workload version are as follows:
Hope this issue can be fixed in the near future.