Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Getting the PropertyValueNotifier<Selection?> was used after being disposed error while opening the drawer. #977

Closed
divyanshub024 opened this issue Dec 1, 2024 · 1 comment
Assignees
Labels
good first issue for experienced devs for the experienced community developers to claim p0

Comments

@divyanshub024
Copy link

Bug Description

Getting the PropertyValueNotifier<Selection?> was used after being disposed error while opening the drawer after typing some text.

======== Exception caught by scheduler library =====================================================
The following assertion was thrown during a scheduler callback:
A PropertyValueNotifier<Selection?> was used after being disposed.

Once you have called dispose() on a PropertyValueNotifier<Selection?>, it can no longer be used.
When the exception was thrown, this was the stack: 
#0      ChangeNotifier.debugAssertNotDisposed.<anonymous closure> (package:flutter/src/foundation/change_notifier.dart:183:9)
#1      ChangeNotifier.debugAssertNotDisposed (package:flutter/src/foundation/change_notifier.dart:190:6)
#2      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:416:27)
#3      PropertyValueNotifier.value= (package:appflowy_editor/src/editor/util/property_notifier.dart:25:5)
#4      _MobileSelectionServiceWidgetState._updateSelection.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/selection/mobile_selection_service.dart:396:36)
#5      SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#6      SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1331:11)
#7      SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#8      _invoke (dart:ui/hooks.dart:312:13)
#9      PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#10     _drawFrame (dart:ui/hooks.dart:283:31)
====================================================================================================

How to Reproduce

I have a drawer and Appflow editor on the screen.

  1. Enter some text in the Editor.
  2. Open Drawer

Expected Behavior

Error should not be thrown.

Operating System

iOS 18.1

AppFlowy Editor Version(s)

4.0.0

Screenshots

No response

Additional Context

No response

@LucasXu0 LucasXu0 added p0 good first issue for experienced devs for the experienced community developers to claim labels Dec 11, 2024
@asjqkkkk
Copy link
Contributor

Assign to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue for experienced devs for the experienced community developers to claim p0
Projects
None yet
Development

No branches or pull requests

3 participants