Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

[Bug] PhoneDialer.PlatformOpen failing with NullReferenceException when certain values passed #1661

@MitchBomcanhao

Description

@MitchBomcanhao

Description

Certain phone number strings can cause this method to fail with a Null Reference Exception.
I've only reproduced this on Android and I assume that different platforms may have different implementations so they may or may not fail, also might have different results when passing the same test strings.

Steps to Reproduce

  1. Call PhoneDialer.Open with the value set to 0111 999 9999 TESTABC
  2. The dialer will appear with number 011199999998378222, with the letters converted to numbers as per T9 keyboard (is this expected?)
  3. Now call the same method with 0111 999 9999 TESTABCD (one additional letter)
  4. Alternatively try using a phone number that is purely text such as TEST

Expected Behavior

Not sure if converting letters to numbers via T9 keyboard equivalence is the expected behaviour, but then it should still work.

Actual Behavior

PhoneDialer.PlatformOpen fails with NullReferenceException.

Edit: I've made a copy of the PlatformOpen method to quickly debug this issue -
image
The FormatNumber method can return NULL, and that is what happens in these scenarios.
When this happens, there's no chance of the remaining code completing successfully, ie it'll fail with the null reference exception.

Basic Information

  • Version with issue: 1.5.3.2
  • Last known good version: unknown
  • IDE: VS 16.8.3
  • Platform Target Frameworks:
    • Android: API 29
  • Affected Devices: reproduced this on Android 9 devices, unknown on others. I am in a GB locale, do not know if that can affect how the dialling code works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingin-progressActively being worked on.triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions