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

Bug: Opening repos with a large amount of files and dirs causes the app to crash #260

Open
2 tasks done
Tracked by #295
arihant2math opened this issue Sep 13, 2022 · 5 comments
Open
2 tasks done
Tracked by #295
Assignees
Labels
bug This issue is related to a bug in the app.

Comments

@arihant2math
Copy link
Contributor

arihant2math commented Sep 13, 2022

⏱️ Before you start...

  • Have you updated FluentHub? You might be using an old version.
  • Have you checked if a similar issue has already been reported?

🪟 What version of Windows is this issue present?

Windows 11 Beta

🔢 What version/architecture of FluentHub are you on?

0acd4f7 x64

📄 Description

Opening repos sometimes causes the app to crash, its the same repos and it always happens for those repos.

🪜 Steps To Reproduce

Open an affected repo.

🤔 Expected behavior

It should not crash.

📸 Assets

Stacktrace:

   at x => new Repository() {HomepageUrl = x.HomepageUrl, ForkingAllowed = x.ForkingAllowed, HasIssuesEnabled = x.HasIssuesEnabled, HasProjectsEnabled = x.HasProjectsEnabled, IsArchived = x.IsArchived, IsPrivate = x.IsPrivate, IsTemplate = x.IsTemplate, ViewerSubscription = Convert(Convert(x.ViewerSubscription, SubscriptionState), Nullable`1), Name = x.Name, Description = x.Description, StargazerCount = x.StargazerCount, ForkCount = x.ForkCount, IsFork = x.IsFork, IsInOrganization = x.IsInOrganization, ViewerHasStarred = x.ViewerHasStarred, UpdatedAt = x.UpdatedAt, LicenseInfo = x.LicenseInfo.Select(licenseInfo => new License() {Name = licenseInfo.Name}).SingleOrDefault(), DefaultBranchRef = x.DefaultBranchRef.Select(defaultbranchref => new Ref() {Name = defaultbranchref.Name}).SingleOrDefault(), Watchers = x.Watchers(null, null, null, null).Select(watchers => new UserConnection() {TotalCount = watchers.TotalCount}).Single(), Releases = x.Releases(null, null, null, null, null).Select(releases => new ReleaseConnection() {TotalCount = releases.TotalCount}).Single(), Issues = x.Issues(null, null, null, null, null, null, null, Convert(value(FluentHub.Octokit.Queries.Repositories.RepositoryQueries+<>c__DisplayClass1_0).issueState, Nullable`1)).Select(issues => new IssueConnection() {TotalCount = issues.TotalCount}).Single(), PullRequests = x.PullRequests(null, null, null, null, null, null, null, null, Convert(value(FluentHub.Octokit.Queries.Repositories.RepositoryQueries+<>c__DisplayClass1_0).pullRequestState, Nullable`1)).Select(issues => new PullRequestConnection() {TotalCount = issues.TotalCount}).Single(), Owner = x.Owner.Select(owner => new RepositoryOwner() {AvatarUrl = owner.AvatarUrl(Convert(Convert(100, Arg`1), Nullable`1)), Id = owner.Id, Login = owner.Login}).Single(), LatestRelease = x.Releases(null, null, Convert(Convert(1, Arg`1), Nullable`1), null, null).Nodes.Select(release => new Release() {DescriptionHTML = release.DescriptionHTML, IsDraft = release.IsDraft, IsLatest = release.IsLatest, IsPrerelease = release.IsPrerelease, Name = release.Name, PublishedAt = release.PublishedAt, Author = release.Author.Select(author => new User() {Login = author.Login, AvatarUrl = author.AvatarUrl(Convert(Convert(100, Arg`1), Nullable`1))}).Single()}).ToList().FirstOrDefault()}(Closure , JToken )
   at Octokit.GraphQL.Core.Builders.Rewritten.Value.Select[TResult](JToken source, Func`2 selector)
   at Octokit.GraphQL.Core.Deserializers.ResponseDeserializer.Deserialize[TResult](Func`2 deserialize, JObject data)
   at Octokit.GraphQL.Core.Deserializers.ResponseDeserializer.Deserialize[TResult](Func`2 deserialize, String data)
   at Octokit.GraphQL.Core.SimpleQuery`1.Runner.RunPage(CancellationToken cancellationToken)
   at Octokit.GraphQL.ConnectionExtensions.Run[T](IConnection connection, ICompiledQuery`1 query, Dictionary`2 variables, CancellationToken cancellationToken)
   at FluentHub.Octokit.Queries.Repositories.RepositoryQueries.GetDetailsAsync(String owner, String name)
   at FluentHub.Uwp.ViewModels.Repositories.Code.Layouts.DetailsLayoutViewModel.LoadRepositoryAsync(String owner, String name)
   at FluentHub.Uwp.ViewModels.Repositories.Code.Layouts.DetailsLayoutViewModel.LoadDetailsViewPageAsync()
@arihant2math arihant2math added the bug This issue is related to a bug in the app. label Sep 13, 2022
@arihant2math
Copy link
Contributor Author

Found the root cause, submitting a pr soon.

@arihant2math
Copy link
Contributor Author

#255 has reemerged for some reason ...

@arihant2math
Copy link
Contributor Author

I am unable to fix the issue, it seems to originate from the async await methods not fully completing.

@arihant2math arihant2math changed the title Opening repos sometimes causes the app to crash Opening repos and issues sometimes causes the app to crash Sep 13, 2022
@0x5bfa 0x5bfa added area-repocode more info This issue/PR needs more infomation. labels Sep 15, 2022
@0x5bfa 0x5bfa added this to the FluentHub v0.5 milestone Sep 15, 2022
@0x5bfa 0x5bfa mentioned this issue Sep 16, 2022
1 task
@0x5bfa 0x5bfa removed area-issue more info This issue/PR needs more infomation. labels Sep 16, 2022
@arihant2math
Copy link
Contributor Author

I noticed that it only happened to repos with a large amount of files and dirs in the root dir. Definitely an async issue then.

@0x5bfa
Copy link
Owner

0x5bfa commented Sep 17, 2022

What's the exceptiontitle?

@0x5bfa 0x5bfa changed the title Opening repos and issues sometimes causes the app to crash Bug: Opening repos and issues sometimes causes the app to crash Feb 10, 2023
@0x5bfa 0x5bfa self-assigned this Jul 31, 2023
@0x5bfa 0x5bfa changed the title Bug: Opening repos and issues sometimes causes the app to crash Bug: Opening repos with a large amount of files and dirs causes the app to crash Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is related to a bug in the app.
Projects
None yet
Development

No branches or pull requests

2 participants