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

StartPage+ doesn't open at startup #4

Closed
MagicAndre1981 opened this issue Sep 24, 2019 · 15 comments
Closed

StartPage+ doesn't open at startup #4

MagicAndre1981 opened this issue Sep 24, 2019 · 15 comments
Milestone

Comments

@MagicAndre1981
Copy link

Installed product versions

  • Visual Studio: 2019 16.3
  • This extension: 0.12.1

Description

StartPage+ doesn't open at startup and crashes VS2019 when manually running it (but when I run devenv.exe inside Windbg, the page shows up).

Steps to recreate

  1. Install VS2019 16.3
  2. Install StartPage+
  3. restart

Current behavior

only empty environment hows up, clicking on "View"->"Start Page+" causes VS to crash

Expected behavior

Start Page+ hows up fine after start.

@MagicAndre1981
Copy link
Author

MagicAndre1981 commented Sep 24, 2019

now it gets wired. After I was only able to use Start Page+ when VS2019 was launched in Windbg, I can now run it fine without windbg 🤔 🤷‍♂️

@yannduran
Copy link
Member

Maybe your version was automatically updated to a later version. The current version is v0.12.1.4 - there is still an issue of the window not opening if you close it that I haven't had time to find out why yet.

Start Page+ should never have crashed VS though. I use it myself and that's never happened to me. Maybe there was something else affecting your VS Preview version. Who knows lol. I'm glad it's working for you now.

Can I close this issue now?

@MagicAndre1981
Copy link
Author

this was a complete fresh VS2019 16.3 final install without any 3rd party addons. I also disabled automatic VS update and extension update installation and installed StartPage+ from extension UI.

Eventlog shows NullreferenceException while loading Recent Items:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at StartPagePlus.UI.Services.RecentItemDataService.GetItems()
   at StartPagePlus.UI.ViewModels.RecentItemsViewModel.ExecuteRefresh()
   at StartPagePlus.UI.Views.RecentItemsView..ctor()

Exception Info: System.Reflection.TargetInvocationException
   at System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)
   at System.RuntimeType.CreateInstanceSlow(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
   at System.Activator.CreateInstance(System.Type, Boolean)
   at System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[], System.Threading.StackCrawlMark ByRef)
   at System.Activator.CreateInstance(System.Type, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[])
   at System.Activator.CreateInstance(System.Type, System.Object[])
   at System.Xaml.Schema.SafeReflectionInvoker.CreateInstanceCritical(System.Type, System.Object[])
   at System.Xaml.Schema.SafeReflectionInvoker.CreateInstance(System.Type, System.Object[])
   at System.Xaml.Schema.XamlTypeInvoker.CreateInstance(System.Object[])
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(System.Xaml.XamlType, System.Object[])
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(System.Xaml.XamlType, System.Object[])
   at System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(MS.Internal.Xaml.Context.ObjectWriterContext)
   at System.Xaml.XamlObjectWriter.WriteEndObject()
   at System.Xaml.XamlWriter.WriteNode(System.Xaml.XamlReader)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter)
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector, System.Collections.Generic.List`1<System.Windows.DependencyObject>, System.Windows.UncommonField`1<System.Collections.Hashtable>)
   at System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject, System.Collections.Generic.List`1<System.Windows.DependencyObject>)
   at System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElementFactory, Int32, System.Collections.Specialized.HybridDictionary, System.Windows.FrameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.FrameworkElement)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
   at System.Windows.UIElement.Measure(System.Windows.Size)
   at System.Windows.Controls.Primitives.UniformGrid.MeasureOverride(System.Windows.Size)
   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
   at System.Windows.UIElement.Measure(System.Windows.Size)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(System.Object)
   at System.Windows.Media.MediaContext+InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)
   at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)


@MagicAndre1981
Copy link
Author

  • there is still an issue of the window not opening if you close it that I haven't had time to find out why yet.

this works fine for me in this fresh 16.3 install. I can close StartPage+ and reopen it when I want it. No issue for me.

@yannduran
Copy link
Member

Thanks for that followup André.

StartPagePlus.UI.Services.RecentItemDataService.GetItems() shows me where the problem you had is. It's possible that this method fails for some reason (and of course it shouldn't FAIL, I thought I had a try/catch around it - I'll look into that). It's possible that an exception could be thrown in a band new install when there aren't any recent items yet, I hadn't thought of that - I'll look into that as well.

Thanks for also letting me know that you can close and open Start Page+ without a problem, I stopped trying because it was a pain to have to restart VS to be able to get it back again. I'd certainly like to be able to cross that one off the list, though to be honest I couldn't figure out why it was doing it in the first place, which is why I put it off until later.

@MagicAndre1981
Copy link
Author

StartPagePlus.UI.Services.RecentItemDataService.GetItems() shows me where the problem you had is. It's possible that this method fails for some reason (and of course it shouldn't FAIL, I thought I had a try/catch around it - I'll look into that). It's possible that an exception could be thrown in a band new install when there aren't any recent items yet, I hadn't thought of that - I'll look into that as well.

it was wired because I got a messagebox but only strange error code and after clicking ok, VS crashed.

But now it works. Maybe OpenSubKey failed which is not wrapped around try/catch

@MagicAndre1981
Copy link
Author

@sevanmarc
Copy link
Contributor

That was me. Yes it only happened on a new VS preview install that had never been run before, with no recent items. I was actually trying to find some better colours, the exception fix was just something I had to get past first!

@yannduran
Copy link
Member

Thank Marc for that! I'll try to get that into Preview 2.

@yannduran yannduran modified the milestones: Preview 2, Preview 3 Sep 27, 2019
@yannduran yannduran changed the title StartPage+ doesn't open at startup and crashes VS2019 when manually running it StartPage+ doesn't open at startup Sep 30, 2019
@yannduran yannduran modified the milestones: Preview 3, Preview 4 Oct 2, 2019
@MagicAndre1981
Copy link
Author

as it works now fine, I'll close the issue.

@Dean-NC
Copy link

Dean-NC commented Jun 20, 2020

I'm guessing when you implement the auto-close when opening a solution feature, you will make it re-open when re-starting VS? Right now, if we close it, then it won't automatically show when re-starting VS.

@yannduran
Copy link
Member

At the moment that has more to do with the way Microsoft persists (or in this case doesn't persist) certain types of tool windows docked in the document well than it has to do with Start Page+ itself.

The Start Page+ window is just a tool window like any other tool window, but tool windows that are docked in the document well don't get properly persisted and Microsoft claim that this is by design. This includes tool windows like Git history, browser windows etc, . About the only exception seems to be the Output Window.

I've left off writing code to explicitly do it, hoping that they'll fix it in an imminent update while I've had more urgent features to address.

@stimpy77/aka @JonDavis-AZED submitted a pull request a while back that I haven't had the chance to integrate yet. It should be in v1.1, due by the end of the month.

I use Azure DevOps as my main repository, and only upload the final code to GitHub for each new release, so I don't think I can directly handle a pull request from GitHub into Azure DevOps. If anyone knows how to do this, please let me know.

@yannduran yannduran reopened this Jun 20, 2020
@yannduran yannduran modified the milestones: v1.0, v1.1 Jun 20, 2020
@Dean-NC
Copy link

Dean-NC commented Jun 20, 2020

@yannduran Ahh, I see. Thanks for the response. There's no doubt MS has no interest in auto-showing a "tool window", but maybe there's a way to get it done.

@yannduran
Copy link
Member

Hey guys, is this still a problem for you?

@yannduran yannduran modified the milestones: v1.1, v1.2 Apr 24, 2021
@yannduran yannduran modified the milestones: v1.2, v1.3 Apr 24, 2021
@MagicAndre1981
Copy link
Author

MagicAndre1981 commented Apr 24, 2021

If it doesn't show I need to click once in Menu to open it. Next time StartPage++ starts fine.

So I think it is time to close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants