Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

The numbers can be integers.

Fixes #109632

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. labels Aug 16, 2022
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkwingsmt
Copy link
Contributor

As a side note: I've searched as double throughout the flutter/flutter repo and it doesn't seem like we have other cases like this. PlatformView converts a method channel result from dynamic to double but it uses the standard codec.

@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 17, 2022
@auto-submit auto-submit bot merged commit 8caa14e into flutter:master Aug 17, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 17, 2022
@LongCatIsLooong LongCatIsLooong deleted the fix-method-channel-double-casting branch August 17, 2022 16:26
@nohli
Copy link
Contributor

nohli commented Sep 5, 2022

@dkwingsmt @LongCatIsLooong

Is this not part of Flutter 3.3.0? I first see this error after upgrading Flutter stable.
(commenting here, since #109632 is closed and locked)

Error:

type '_Smi' is not a subtype of type 'double' in type cast

Stacktrace:

#0      _toTextPoint (package:flutter/src/services/text_input.dart:1513)
#1      TextInput._handleTextInputInvocation (package:flutter/src/services/text_input.dart:1827)
#2      TextInput._loudlyHandleTextInputInvocation (package:flutter/src/services/text_input.dart:1701)
#3      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:536)
#4      MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:529)
#5      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:387)
#6      _invoke2.<anonymous closure> (dart:ui/hooks.dart:189)
#7      _rootRun (dart:async/zone.dart:1391)
#8      _CustomZone.run (dart:async/zone.dart:1293)
#9      _CustomZone.runGuarded (dart:async/zone.dart:1201)
#10     _invoke2 (dart:ui/hooks.dart:188)
#11     _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42)
#12     _Channel.push (dart:ui/channel_buffers.dart:132)
#13     ChannelBuffers.push (dart:ui/channel_buffers.dart:329)
#14     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:599)
#15     _dispatchPlatformMessage (dart:ui/hooks.dart:89)

@LongCatIsLooong
Copy link
Contributor Author

No but it will likely be included in the next stable release. See https://github.com/flutter/flutter/wiki/Where's-my-Commit%3F

@limenote135
Copy link

@dkwingsmt @LongCatIsLooong Is there a plan to hotfix this into the stable branch?

@dmitry-fbm
Copy link

dmitry-fbm commented Oct 26, 2022

Can this please be included into next release?

@dtq
Copy link

dtq commented Oct 28, 2022

@dkwingsmt Would it be possible to have this hotfixed into 3.3 stable? We're seeing hundreds of these reports per day in our crash logs for a production app since moving to 3.3.

The fix appears to be scheduled for 3.4, but it's unclear when that release will happen.

@AlexV525
Copy link
Member

AlexV525 commented Nov 7, 2022

I've submitted a CP request for this.

AlexV525 pushed a commit to AlexV525/flutter that referenced this pull request Nov 7, 2022
AlexV525 pushed a commit to AlexV525/flutter that referenced this pull request Nov 9, 2022
CaseyHillers pushed a commit that referenced this pull request Nov 9, 2022
(cherry picked from commit 8caa14e)

Co-authored-by: LongCatIsLooong <[email protected]>
Co-authored-by: Casey Hillers <[email protected]>
@DimitarMilushev
Copy link

DimitarMilushev commented Nov 10, 2022

As a side note: I've searched as double throughout the flutter/flutter repo and it doesn't seem like we have other cases like this. PlatformView converts a method channel result from dynamic to double but it uses the standard codec.

It's part of [TextureAndroidViewController]. Since the error has been observed on iOS it's unlikely that to be the cause.

@vishalpatel1327
Copy link

The thing is error log cant be represented by the last mile file name, so no one can trace it that where the actual issue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_toTextPoint throws type '_Smi' is not a subtype of type 'double' in type cast

9 participants