-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#53553Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamOwned by iOS platform team
Description
Steps to reproduce
- Enter the Flutter page,
- manipulate the TextView, perform copy and paste operations, generate undo actions,
- exit the Flutter page, and then perform a three-finger slide to undo
Expected results
not crash
Actual results
crash,The root cause is that the FlutterUndoManagerPlugin is not released, while the FlutterEngine has already been released. Attempting to send a message to an object that has been released leads to a crash. In this scenario, the question is whether the FlutterUndoManagerDelegate within FlutterUndoManagerPlugin can be marked with weak.
Code sample
@implementation [FlutterUndoManagerPlugin](https://api.flutter.dev/ios-embedder/interface_flutter_undo_manager_plugin.html) {
id<FlutterUndoManagerDelegate> _undoManagerDelegate;
}
- (instancetype)initWithDelegate:(id<[FlutterUndoManagerDelegate](https://api.flutter.dev/ios-embedder/protocol_flutter_undo_manager_delegate-p.html)>)undoManagerDelegate {
self = [super init];
if (self) {
// `_undoManagerDelegate` is a weak reference because it should retain FlutterUndoManagerPlugin.
_undoManagerDelegate = undoManagerDelegate;
}
return self;
}
Screenshots or Video
Logs
Logs
[Paste your logs here]Flutter Doctor output
none
Metadata
Metadata
Assignees
Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamOwned by iOS platform team
