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

Random System.NullReferenceException .Net Maui app under macOS #6645

Closed
paratype-fonts opened this issue Apr 29, 2022 · 3 comments
Closed

Random System.NullReferenceException .Net Maui app under macOS #6645

paratype-fonts opened this issue Apr 29, 2022 · 3 comments
Labels
platform/macOS 🍏 macOS / Mac Catalyst s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working
Milestone

Comments

@paratype-fonts
Copy link

paratype-fonts commented Apr 29, 2022

Description

macOS, the lates .NET Maui and Visual Studio 2022 Preview as of 04/28/2022

A random System.NullReferenceException thrown when the app is running:

public class Program
{
	// This is the main entry point of the application.
	static void Main(string[] args)
	{
		// if you want to use a different Application Delegate class from "AppDelegate"
		// you can specify it here.
		UIApplication.Main(args, null, typeof(AppDelegate));
	}
}

System.NullReferenceException: Object reference not set to an instance of an object.
at at Microsoft.Maui.ElementHandlerExtensions.ToPlatform(IElementHandler elementHandler)
at at Microsoft.Maui.ViewHandlerExtensions.PlatformArrangeHandler(IViewHandler viewHandler, Rect rect)
at at Microsoft.Maui.Controls.Handlers.Compatibility.ViewCellRenderer.ViewTableCell.LayoutSubviews()
at at Microsoft.Maui.Controls.Handlers.Compatibility.CellTableViewCell.GetPlatformCell(UITableView tableView, Cell cell, Boolean recycleCells, String templateId)
at at Microsoft.Maui.Controls.Handlers.Compatibility.ListViewRenderer.ListViewDataSource.GetCell(UITableView tableView, NSIndexPath indexPath)
at at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
at Fontoscope.Program.Main(String[] args) in .../Platforms/MacCatalyst/Program.cs:13

Steps to Reproduce

The crash happens with no correlation with any specific user action

Version with bug

Release Candidate 1

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

Visual Studio Community 2022 for Mac Preview Version 17.0 Preview (17.0 build 8754)

Did you find any workaround?

No

Relevant log output

No response

@paratype-fonts paratype-fonts added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Apr 29, 2022
@drasticactions
Copy link
Contributor

Did you hit this from a new template, or from an app your building?

Looking at the stack trace, my guess is that you have the Xamarin.Forms Compatibility stuff turned on and the error is in ListView. So this isn't a "random error" but a specific bug in the compatibility list view control. Could you maybe make a repro project?

@Eilon Eilon added the s/needs-repro Attach a solution or code which reproduces the issue label May 2, 2022
@ghost
Copy link

ghost commented May 2, 2022

Hi @paratype-fonts. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@jfversluis jfversluis removed the s/needs-verification Indicates that this issue needs initial verification before further triage will happen label May 2, 2022
@Redth Redth added this to the 6.0.300-servicing milestone May 3, 2022
@ghost ghost added the s/no-recent-activity Issue has had no recent activity label May 9, 2022
@ghost
Copy link

ghost commented May 9, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost closed this as completed May 12, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 11, 2022
@samhouts samhouts added the platform/macOS 🍏 macOS / Mac Catalyst label Feb 1, 2024
@ghost ghost removed the s/no-recent-activity Issue has had no recent activity label Feb 1, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/macOS 🍏 macOS / Mac Catalyst s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants