RadPath / RadArcSegment is causing an out of memory exception

0 Answers 69 Views
Path
Angus
Top achievements
Rank 1
Iron
Iron
Angus asked on 23 Aug 2022, 01:12 PM | edited on 23 Aug 2022, 01:34 PM

I'm trying to follow your example for the arc segment here: https://docs.telerik.com/devtools/maui/controls/path/geometry-structure

However, when I use your example code my app throws an out of memory exception trying to draw the image. 

The error message suggests that it's trying to draw an enormous image.

"[Bitmap] OOM allocating Bitmap with dimensions 1080 x 16777216"

Any suggestions? I have copy pasted the example code exactly as it is in the link provided (although I removed the style attribute as I don't have the static resource it's referencing)

 

Didi
Telerik team
commented on 23 Aug 2022, 04:26 PM | edited

On which platform the issue can be reproduced? The example in the docs is the PathGeometry example located in our SDKBrowser Maui app/Controls/Path/Features/ folder https://docs.telerik.com/devtools/maui/demos-and-sample-apps/sdkbrowser-app I tested the example and no issues and no exceptions.

Angus
Top achievements
Rank 1
Iron
Iron
commented on 24 Aug 2022, 05:53 AM

Hi, 

This is happening on Android phone. (12.0 API 31)

So it looks like the issue happens when the Path is not wrapped in a Grid (documentation page I linked does not have it wrapped in any Layout). If I put it inside a StackLayout for example, it will break. You can test this by creating a brand new MAUI app and just replacing the default content with the path example as per  https://docs.telerik.com/devtools/maui/controls/path/geometry-structure

Is the control always meant to be in a Grid? 

Didi
Telerik team
commented on 24 Aug 2022, 08:15 AM

I have tested with and without Grid layout on Android emulator Pixel 5 API 31 and no exceptions. 

Regarding to the Stack you will need to add a height to the path so the control to be measured. This is a layout issue and it is related to the parent payout in which the control is positioned.

No answers yet. Maybe you can help?

Tags
Path
Asked by
Angus
Top achievements
Rank 1
Iron
Iron
Share this question
or