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

[Bug] [Android] ToolkitPlatform.Context used by AvatarView is causing a NullReferenceException #1345

@Cfun1

Description

@Cfun1

Description

AvatarView causing a System.NullReferenceException at this line

var imageSource = await handler.LoadImageAsync(source, ToolkitPlatform.Context).ConfigureAwait(false);
because of ToolkitPlatform.Context
return renderer.View.Context ?? throw new NullReferenceException($"{nameof(Context)} cannot be null");

Steps to Reproduce

  1. Run the app, click on physical back button.

Expected Behavior

No exception should be thrown.

Actual Behavior

Exception thrown: System.NullReferenceException: 'Object reference not set to an instance of an object.'

Basic Information

  • Version with issue: 1.2.0-pre2
  • Last known good version: -
  • Platform Target Frameworks: Tested on Android only.
    • iOS:
    • Android 10:
    • UWP:
  • Affected Devices: Emulator and real devices.

Reproduction Link

https://github.com/Cfun1/XamsungHealth

cc @pictos

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. Breaky break.in-progressActively being worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions