chkn / Xamarin.SwiftUI

.NET bindings for SwiftUI
MIT License
98 stars 7 forks source link

Even length namespace and class names cause crash #35

Closed chkn closed 3 years ago

chkn commented 4 years ago

Definitely sounds like something weird is going on. We could clone the Swift source and try to catch the crash in the debugger

Originally posted by @chkn in https://github.com/chkn/Xamarin.SwiftUI/pull/28#issuecomment-653702689

CartBlanche commented 4 years ago

@chkn I asked Steve if he'd heard of or come across this and he mentioned the following...

If I were to guess what’s going on I’d say that there’s an issue in encoding the class names from .NET into C# in the type metadata.

There are two types of encodings that happen - one is for the actual name which should go into UTF8 and is unlikely to be the problem, but it might be that there are symbols being generated that need to be in punycode and there’s an issue in the punycode encoder.