-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] Loading embedded font causes the app to crash on iOS after upgrade to Visual Studio 16.11.7 and 17.0.1, еmbedded images are not loaded anymore on iOS #14905
Comments
Right now I can't debug apps on physical iPhone. I get that error and this one that I posted here. I need to test the camera and push notifications and I can't. Everything works fine in the emulator. |
Update:
|
I have the same issue with embedded images are not loaded on iOS. Please fix. |
I can reproduce the same issue on an iPhone with iOS 15.0.2. Using VS 2022 17.0.1 On the output window I get almost the same: `
` |
I have a similar problem.
|
Happening here, too. Succeeds when I'm debugging an iPhone connected to my Mac, but fails when I'm debugging an iPhone directly connected to Windows. |
Does anybody know a workaround for this? |
Tried https://github.com/xamarin/Xamarin.Forms/files/7563932/App5.zip in iPhone 8 with iOS 15.1 and iPad Mini with iPadOS 15.1 and cannot reproduce, could someone share a sample where reproduce the issue? |
Did you try to build and deploy it with the latest version of Visual Studio 2022 (17.0.1)? |
In addition: Attached: App6.zip. Reproduces the problem with embedded images on iOS. (Successfully loads on Android and UWP, but fails on iOS). |
Same problem here. After the update from Visual Studio 2022 17.0.0. to 17.0.1 the app crashes on my iOS device - Iphone. Same error as vg12345 |
Exactly same problem here. After update of VS2019 and VS2022. Same code works well on ios simulator and also on another machine with older VS2019&VS2022 |
Update: |
Looks like more generic problem in Foundation.NSData:FromStream |
This comment has been minimized.
This comment has been minimized.
they are investigating the problem |
Seems like a problem that is not related directly to Xamarin.Forms then. Please follow the linked support ticket, thanks :) |
Seems like nobody in Xamarin team wants even try to debug the attached application to ensure that the problem is not really in Xamarin.iOS platform. |
There are a couple of responses that point out we did, not sure what you're trying to achieve here? Also, as the title suggests: it happens when you upgraded Visual Studio, not Xamarin.Forms. Isn't that a big hint that this is a problem in the IDE and not this SDK? As much as I hate that we confuse customers with different portals to report issues in different products and all the problems that come with it, the reality is that when it's a problem with Visual Studio, the most effective way is to go through the Developer Community portal that is linked above. |
iOS applications crash if using embedded resources. |
You say you are using Visual Studio 17.0.1 and are deploying to an iPhone. That means you are using what is called Hot Restart. The way Hot Restart works is that there is a prebuilt iOS app, that will dynamically load all of the Xamarin.Forms content, both from us on the SDK side as well as the code you write, inside of it. Including all the embedded resources and everything that is needed to run the app. To be honest, I don't know how this piece of magic exactly works, I do know that we do not "own" the prebuilt iOS app that is provided as well as the infrastructure that is used to actually deploy and compile and do magic on you iOS device from Windows. So yes, you are using Xamarin.Forms, I totally understand how this must look like a Xamarin or Xamarin.Forms bug to you, but it most likely isn't.
If this is true, then the right place to report it would be the xamarin-macios repository since that is Xamarin.iOS, we build on top of that. But as far as I know Xamarin.iOS is not supported for Hot Restart and also your App6 is another Xamarin.Forms app not a pure Xamarin.iOS app
How can that be if it also occurs with Xamarin.iOS projects? But seeing that App6 is also a Forms app, I guess the stack trace would show that indeed :)
Not likely because of how everything works when using Hot Restart, see above
You can see that I linked a good number of issues on the Xamarin.Forms repo as well as from the Developer Community Portal, so yes people are busy looking into this. I understand that you might be frustrated by this not working and it not being resolved quickly enough for you, but we're here to make things work. Not trying to close this as "not my problem", I hope that is clear from taking the time to respond to you in detail about how all this is going down. Just to make sure one more time, I pulled down your App6 sample, ran it on a iPhone XS and an internal Visual Studio version 17.1.0 and I see that the image is not loading there, but with a different stack trace than yours. I'm installing VS2019 as we speak to see if that makes a difference. Do I understand correctly that the problem was not in 16.11.6 but the problem is in 16.11.7? |
The last versions without the problem are: All later versions contain the problem. Unfortunately, there is no any option to return to one of these "normal" versions for community edition.
The stacks are different for fonts, images and probably other staff (I included the stack specifically for fonts - App5). at <0xffffffff> |
Unfortunately I can't use VS2019 with iOS 15 it seems. Trying to see if I can somehow get my hands on Vs 17.0.0 to try. But if this indeed has something to do with NSData.FromStream then this is still not on us. Again; not to say: not our problem, just so I know where to route this to so this can be resolved. @dalexsoto does any of this mean something to you? |
Of cause, I have no idea which team is responsible for some specified part of code. |
I'm not sure what you want from me here? That is exactly what I am trying to do right now? But my willingness to help is kind of draining if I keep getting negative comments like this to be honest. We're trying to achieve the same here. |
I'm not trying to offend you and my notes are not pointed personally to you, So, please, don't take it personally. |
I don't take it personally and I'm not offended no worries. However repeating the same thing over and over again is not very constructive while I am, I think, obviously trying to help you. Also, the issue is not lost, else I wouldn't have closed it. As pointed out, the same issue has been reported through the Developer Community portal and is open there and I still believe that this is the right place for it as the cause of this bug does not originate in Xamarin.Forms. I understand that from the "outside" it's hard to see which product is causing this, and frankly, as a customer you shouldn't even have to care, I get that. But routing this issue to the right product and team is the fastest way to get it resolved. Keeping it open here won't help anything. |
I had this issue and found that I had some old mtouch arguments ( |
Oh that is great information, thank you! |
Application that uses embedded font crashes on iOS
Reproduced on iOS 14.8.1
After upgrade of Visual Studio 2019 from 16.11.6 to 16.11.7
After upgrade of Visual Studio 2022 from 17.0.0 to 17.0.1
Xamarin Forms 5.0.0.2196 (same after upgrade to 5.0.0.2244)
Attached: App5.zip - the most simple application that reproduces the problem
App5.zip
Update:
Attached: App6.zip. Reproduces the problem with embedded images on iOS. (Successfully loads on Android and UWP, but fails on iOS).
App6.zip
Important: you must build it and deploy to iPhone with Visual Studio 2022 version 17.0.1 to reproduce the problem!
Update:
Same problem on Visual Studio 2022 version 17.0.2
================================================================
=================================================================
The app has been terminated.
The text was updated successfully, but these errors were encountered: