- Home
- Forum
- Xamarin.Android
- Android - SfCircularGauge Causes App Crashing Randomly
Android - SfCircularGauge Causes App Crashing Randomly
Hi guys,
We have a problem here: the gauge keeps making the app crashed randomly.
The app setup is: we have some fragment, in one of those we put the gauge here. Whenever the fragment becomes foreground, we will reload the data for the gauge.
And we enabled the animation for it.
We believe it happens during the fragment transition. Unfortunately, we do not know the actual reproduce steps yet. It just happens randomly in our app.
However, based on the crashing reports we managed to collect, the bug only exists on Android 8.0 and Android 8.1 devices.
The exception we caught is:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.Graphics.Paint'.
in GaugeHeaderRenderer.OnDraw (Android.Graphics.Canvas canvas)
Please let us know if this is a known bug, or if there is any fix / walk around.
Thanks,
Ric
SIGN IN To post a reply.
9 Replies
SG
Sri Gayathri Gopalakrishnan
Syncfusion Team
May 11, 2018 01:25 PM UTC
Query: SfCircularGauge Causes App Crashing Randomly
We have analyzed your query and have prepared sample based on your requirement. We have made a transition between two fragments using FragmentTransaction Manager and we were tried to reproduce the reported scenario. Please download the sample from the below link,
Since we are not aware of the exact scenario in which issue reproduced, we would like to know the following details to provide you the solution sooner,
-Modify the existing sample or provide your sample with replication procedure
Note: We have tested in product version 16.1.0.37 and tested in below device,
Device configuration:
Device Model – Galaxy s8+
Android Version – 8.0
Regards,
Sri Gayathri. G
NI
Nicolas
May 25, 2018 09:31 AM UTC
Hello, i also have this ´random crash issue’ with the SfCircularGauge on Android. Did someone figure-out a work-around or bug fix?
I’m using Android 7.0 Api 24 on a LG tablet. No crash without this component and with the component, i randomly have the Cannot access a disposed object.
Best regards,
Nicolas.
SG
Sri Gayathri Gopalakrishnan
Syncfusion Team
May 29, 2018 12:52 PM UTC
Hi Nicolas,
Thanks for contacting Syncfusion Support,
We have analyzed your query and we were unable to reproduce the scenario at our end but based on exception call stack, we have logged defect report. A support incident to track the status of this defect has been created under your account
Please log on to our support website to check for further updates.
Regards,
Sri Gayathri. G
DA
Dabiel
June 14, 2018 08:42 AM UTC
We have the same problem with SfCircularGauge. It crashes randonmly. The error is
Cannot access a disposed object.
Object name: 'Android.Graphics.Paint'.
Our app worked fine with a former version of the library. It starts to fail the same day we updated to the latest Syncfunsion verision
For now, we have not found any solution.
SG
Sri Gayathri Gopalakrishnan
Syncfusion Team
June 14, 2018 10:49 AM UTC
Hi Dabiel,
We have analyzed your query and we were unable to reproduce the scenario at our end but based on exception call stack, we have logged defect report. A support incident to track the status of this defect has been created under your account
Please log on to our support website to check for further updates.
Regards,
Sri Gayathri. G
MO
Mohammad
June 18, 2018 03:55 PM UTC
I just wanted to mention that we also have this problem with SfCircularGauge (sometimes with other objects too, but less frequent):
Cannot access a disposed object.
Object name: 'Android.Graphics.Paint'.
Its worth mentioning that It gets better when animations are disabled (Tested on Android 7 Noughat)
SG
Sri Gayathri Gopalakrishnan
Syncfusion Team
June 19, 2018 11:39 AM UTC
Hi Mohammad,
Sorry for the inconvinence,
We have already fixed the SfCircularGauge “Cannot access a disposed object” exception issue and this fix has been included in our upcoming volume 2 main release which is expected to be rolled out by the end of this month. We appreciate your patience until then.
Regards,
Sri Gayathri. G
DA
Dabiel
September 10, 2018 04:38 PM UTC
I am using the latest version 16.0.2.50 and I get the same error. In fact, now it is more frequent. It is random error, in some versions I get this exception maybe twice per day, in others, like this last one, I get this error in few steps in few seconds. It seems that it happens when I return to the main activity, where the gauge lives, and needs to be refreshed.
I cannot send you a basic example because it is in a complex app. Probably in a simple app it will work fine. As I say, it is random, and it seems that for some reason, Android tries to refresh gauges that have been memory released. I placed the gauges in a ListView. I think that it is the problem.
Googling, I see that in 2016 other users had the same problem:
https://forums.xamarin.com/discussion/79315/xamarin-forms-bug-system-objectdisposedexception-cannot-access-a-disposed-object
In this case, they solved by setting CachingStrategy = "RecycleElement" in my listview
YS
Yogapriya Shanmugam
Syncfusion Team
September 11, 2018 11:46 AM UTC
Hi Dabiel,
Query: ObjectDisposedException raised on using circular gauge.
We have analyzed your query and currently we are validating the reported issue at our end by using gauge inside the list view.
Meanwhile, could you please provide us the stack race of this exception. Since it is a random error this would help us to resolve the issue quickly.
Regards,
Yogapriya.S
SIGN IN To post a reply.
- 9 Replies
- 6 Participants
-
RI Ric
- May 10, 2018 11:54 PM UTC
- Sep 11, 2018 11:46 AM UTC