Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [macOS] Rendering Line shape crashes the app in case xCode 13.2 installed #15026

Closed
sady4850 opened this issue Jan 5, 2022 · 8 comments
Assignees
Labels
a/shapes s/unverified New report that has yet to be verified t/bug 🐛

Comments

@sady4850
Copy link

sady4850 commented Jan 5, 2022

Description

With Xcode 13.2 installed, any Xamarin Forms app that uses Line shapes crashes immediately when the line is rendered.

Steps to Reproduce

  1. Make sure xCode 13.2 is installed
  2. Add a Line shape in XAML (or in code)
  3. Run app
    For example, this page will crash the app:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="XFLineBug.MainPage">

    <Grid>
        <Line X1="10" Y1="10" X2="100" Y2="50" Stroke="Red" StrokeThickness="3"/>
    </Grid>

</ContentPage>

Exception thrown: Could not initialize an instance of the type 'CoreGraphics.CGPath': handle is null.

Repro project: CGPathIssue.zip
(this is a clean new Xamarin Forms macOS project with the MainPage changed to show a line shape)

Expected Behavior

Line is shown on screen

Actual Behavior

App crashes immediately.

100% reproducible

Basic Information

  • Version with issue: 5.0.0.2125 and 5.0.0.2291 (possibly earlier versions as well)
  • Last known good version: unknown
  • Platform Target Frameworks:
    • macOS
    • iOS: N.A
    • Android: N/A
    • UWP: N/A
      Android Support Library / AndroidX Version: N/A
      Affected Devices: all macOS devices

Environment

Show/Hide Visual Studio info
Visual Studio for Mac 8.10.16
@jfversluis
Copy link
Member

Fixed with #14993

@activa
Copy link
Contributor

activa commented Jan 10, 2022

@jfversluis How can this be fixed by PR #14993? This issue is for MacOS but the PR only changes the iOS code

@jfversluis
Copy link
Member

If you look in the csproj file of the macOS project you will see that the ShapeRenderer is linked and thus shared from the iOS codebase

https://github.com/xamarin/Xamarin.Forms/blob/5.0.0/Xamarin.Forms.Platform.MacOS/Xamarin.Forms.Platform.macOS.csproj#L302

@activa
Copy link
Contributor

activa commented Jan 10, 2022

@jfversluis Right, just figured that out as well.
Thanks, learned something new today :-)

@jfversluis
Copy link
Member

Depending on which area iOS and macOS code is pretty similar so sometimes code is shared between them. But I can see that this is something you would need to know, else it isn't very obvious :)

@jfversluis
Copy link
Member

Should be any day :) probably early next week

@davibittencourtome
Copy link

I have this same bug using "<Path", @pictos recommended me to use version "5.0.0.2336-nighly", which already has the fix and everything is fine so far. Please, what is the release forecast for a new version in release?

@davibittencourtome
Copy link

Should be any day :) probably early next week

Thank you @jfversluis , have a great weekend!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/shapes s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

5 participants