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

System.NullReferenceException in Settings #443

Closed
juanitogan opened this issue Mar 19, 2018 · 1 comment
Closed

System.NullReferenceException in Settings #443

juanitogan opened this issue Mar 19, 2018 · 1 comment

Comments

@juanitogan
Copy link

Suspect the following error was due to this:
After new portable install, created a new folder but that folder did not appear in Settings >> Folders. Checked several times and only the Default folder was appearing there. Removed the Default folder. Then, next time attempting to open Settings, this crash happened. After SycnTrayzor restart, Settings >> Folders showed my new folder, and only my new folder, correctly.

Version: 1.1.21.0; Variant: Portable; Arch: Amd64
Path: C:\Program Files Portable\SyncTrayzorPortable-x64\SyncTrayzor.exe
System.NullReferenceException: Object reference not set to an instance of an object.
   at SyncTrayzor.Pages.Settings.SettingsViewModel.<LoadFromSyncthingStartupData>b__138_0(FolderConfiguration x) in C:\projects\synctrayzor\src\SyncTrayzor\Pages\Settings\SettingsViewModel.cs:line 296
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at Stylet.BindableCollection`1.<>c__DisplayClass1.<AddRange>b__0() in c:\projects\stylet\Stylet\BindableCollection.cs:line 115
   at SyncTrayzor.Pages.Settings.SettingsViewModel.LoadFromSyncthingStartupData() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\Settings\SettingsViewModel.cs:line 305
   at Stylet.Screen.<Stylet.IScreenState.Activate>b__1d(ScreenState oldState, ScreenState newState) in c:\projects\stylet\Stylet\Screen.cs:line 170
   at Stylet.Screen.SetState(ScreenState newState, Action`2 changedHandler) in c:\projects\stylet\Stylet\Screen.cs:line 155
   at Stylet.ScreenExtensions.TryActivate(Object screen) in c:\projects\stylet\Stylet\ScreenExtensions.cs:line 18
   at Stylet.WindowManager.WindowConductor..ctor(Window window, Object viewModel) in c:\projects\stylet\Stylet\WindowManager.cs:line 222
   at Stylet.WindowManager.CreateWindow(Object viewModel, Boolean isDialog) in c:\projects\stylet\Stylet\WindowManager.cs:line 196
   at Stylet.WindowManager.ShowDialog(Object viewModel) in c:\projects\stylet\Stylet\WindowManager.cs:line 102
   at SyncTrayzor.Pages.ShellViewModel.ShowSettings() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\ShellViewModel.cs:line 131
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Stylet.Xaml.ActionBase.InvokeTargetMethod(Object[] parameters) in c:\projects\stylet\Stylet\Xaml\ActionBase.cs:line 201
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@canton7
Copy link
Owner

canton7 commented Mar 20, 2018

Thanks! The extra info you provided helped me track this down, much appreciated.

This will be fixed in the next update. Until then, restarting Syncthing will refresh the list of folders in the Settings.

@canton7 canton7 mentioned this issue May 1, 2018
@canton7 canton7 closed this as completed in a2b17e4 Oct 5, 2018
This was referenced Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants