Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

ActiveRepository is sometimes set to null when changing PR branches #1421

@jcansdale

Description

@jcansdale
  • GitHub Extension for Visual Studio version: v2.3.7.0
  • Visual Studio version: Visual Studio 2015 (14.0.25420.1)

You can see what's going on from the log:

2018-01-17 12:13:00.060 INFO [38] TeamExplorerContext       Refresh ActiveRepository: RepositoryPath=C:\Source\github.com\grokys\PullRequestSandbox, BranchName=comments-test, HeadSha=5affff80a92fcb44367df4a1e4244882105ecafa
2018-01-17 12:13:00.060 INFO [38] TeamExplorerContext       Fire PropertyChanged event for ActiveRepository
2018-01-17 12:14:44.513 INFO [09] TeamExplorerContext       Refresh ActiveRepository: RepositoryPath=C:\Source\github.com\grokys\PullRequestSandbox, BranchName=pr/34-possible-missing-comment, HeadSha=a16aa3a7b1288d4c02b7859f1d2de83c10f65b2e
2018-01-17 12:14:44.513 INFO [09] TeamExplorerContext       Fire StatusChanged event for ActiveRepository
2018-01-17 12:14:49.277 INFO [154] TeamExplorerContext       Refresh ActiveRepository: RepositoryPath=null, BranchName=null, HeadSha=null
2018-01-17 12:14:49.277 INFO [154] TeamExplorerContext       Fire PropertyChanged event for ActiveRepository
2018-01-17 12:14:50.306 EROR [01] PullRequestDetailViewModel Error loading pull request grokys/PullRequestSandbox/34 from GitHub
System.NullReferenceException: Object reference not set to an instance of an object.
   at GitHub.Services.PullRequestService.<>c__DisplayClass22_0.<<EnsureLocalBranchesAreMarkedAsPullRequests>b__0>d.MoveNext() in C:\source\github.com\github\VisualStudio\src\GitHub.App\Services\PullRequestService.cs:line 267
--- End of stack trace from previous location where exception was thrown ---
   at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception exception)
   at System.Reactive.ExceptionHelpers.ThrowIfNotNull(Exception exception)
   at System.Reactive.Subjects.AsyncSubject`1.GetResult()
   at GitHub.InlineReviews.Services.PullRequestSessionManager.<GetSession>d__14.MoveNext() in C:\source\github.com\github\VisualStudio\src\GitHub.InlineReviews\Services\PullRequestSessionManager.cs:line 148
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at GitHub.ViewModels.GitHubPane.PullRequestDetailViewModel.<Load>d__100.MoveNext() in C:\source\github.com\github\VisualStudio\src\GitHub.App\ViewModels\GitHubPane\PullRequestDetailViewModel.cs:line 344
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at GitHub.ViewModels.GitHubPane.PullRequestDetailViewModel.<Refresh>d__101.MoveNext() in C:\source\github.com\github\VisualStudio\src\GitHub.App\ViewModels\GitHubPane\PullRequestDetailViewModel.cs:line 448
2018-01-17 12:14:50.400 INFO [125] TeamExplorerContext       Refresh ActiveRepository: RepositoryPath=C:\Source\github.com\grokys\PullRequestSandbox, BranchName=pr/34-possible-missing-comment, HeadSha=a16aa3a7b1288d4c02b7859f1d2de83c10f65b2e
2018-01-17 12:14:50.400 INFO [125] TeamExplorerContext       Fire PropertyChanged event for ActiveRepository

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions