Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cannot access a disposed object

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, csharp
Domain
mobile-dev

Research direction

Start by inspecting NotificationBuilder.TimerFinished and the Notify timer callback shown in the stack trace. Reproduce the failure on the reported Android environment if possible, then verify that the notification cancellation path no longer accesses a disposed Android.App.NotificationManager.

Written by the indexing model from the issue text.

Description

This is on a Xamarin Forms app.
Android: 9
Android Build: PKQ1.190118.001
Manufacturer: vivo
Model: vivo 1727

Xamarin Exception Stack:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.App.NotificationManager'.
  at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <4d2af34ca2694c37a4ea3d8074f2f66b>:0
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <4d2af34ca2694c37a4ea3d8074f2f66b>:0
  at Android.App.NotificationManager.Cancel (System.Int32 id) [0x00022] in <519a5f3aaae444f4b50cf623ff03eb78>:0
  at Plugin.Toasts.NotificationBuilder.TimerFinished (System.String id, System.Boolean cancel, System.Boolean allowTapInNotificationCenter) [0x00028] in <ff2bac5dfa8f470a8c69cfd33f67eef9>:0
  at Plugin.Toasts.NotificationBuilder+<>c__DisplayClass23_1.<Notify>b__0 (System.Object x) [0x00031] in <ff2bac5dfa8f470a8c69cfd33f67eef9>:0
  at System.Threading.Timer+Scheduler.TimerCB (System.Object o) [0x00007] in <254b242c97154351aae8e0970082105e>:0
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <254b242c97154351aae8e0970082105e>:0
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <254b242c97154351aae8e0970082105e>:0
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <254b242c97154351aae8e0970082105e>:0
Dominant language
C#
Stars
275
Forks
81
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EgorBo/Toasts.Forms.Plugin

All issues in EgorBo/Toasts.Forms.Plugin

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.