mirror of
https://github.com/quasar/Quasar.git
synced 2026-04-25 15:25:59 +03:00
[GH-ISSUE #902] System.NullReferenceException: "StartupManager" StartupItems was null. #620
Labels
No labels
bug
bug
cant-reproduce
discussion
duplicate
easy
enhancement
help wanted
improvement
invalid
need more info
pull-request
question
wont-add
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Quasar#620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BurntDog on GitHub (Dec 28, 2020).
Original GitHub issue: https://github.com/quasar/Quasar/issues/902
Clicking Quit will show errors then
close apps one at a time client first server last Debug Mode: https://prnt.sc/wbsaoq
Exception thrown on Line 140 "foreach (var item in StartupItems)"
https://prnt.sc/wbjer1
https://prnt.sc/wbjg1c
https://prnt.sc/wbjgzg
Describe the bug
Startup manager will crash before it populates
the form
To Reproduce
Steps to reproduce the behavior:
Try to view Startup Manager
Crashes with errors
Expected behavior
Startup Manager should open and populate
System
Installed
dotnet-sdk-5.0.101-win-x64 <--- installed from Visual Studio
ndp48-devpack-enu.exe
on both Client/Server Windows10 OS
Additional context
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Quasar.Server.Forms.FrmStartupManager.StartupItemsChanged(Object sender, List`1 startupItems)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
Quasar
Assembly Version: 1.4.0.0
Win32 Version: 1.4.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Quasar.exe
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Quasar.Common
Assembly Version: 1.4.0.0
Win32 Version: 1.4.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Quasar.Common.DLL
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
Open.Nat
Assembly Version: 1.0.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Open.Nat.DLL
System.Security
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4261.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
System.Data.SqlXml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.SqlXml/v4.0_4.0.0.0__b77a5c561934e089/System.Data.SqlXml.dll
System.Configuration.Install
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration.Install/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
protobuf-net
Assembly Version: 2.4.0.0
Win32 Version: 2.4.6.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/protobuf-net.DLL
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
Mono.Cecil
Assembly Version: 0.11.2.0
Win32 Version: 0.11.2.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Mono.Cecil.DLL
Vestris.ResourceLib
Assembly Version: 2.1.0.0
Win32 Version: 2.1.0.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Vestris.ResourceLib.DLL
Gma.System.MouseKeyHook
Assembly Version: 5.6.130.0
Win32 Version: 5.6.130.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Gma.System.MouseKeyHook.DLL
************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
at System.Windows.Forms.Application.ExitInternal()
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
Quasar
Assembly Version: 1.4.0.0
Win32 Version: 1.4.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Quasar.exe
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Quasar.Common
Assembly Version: 1.4.0.0
Win32 Version: 1.4.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Quasar.Common.DLL
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
Open.Nat
Assembly Version: 1.0.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Open.Nat.DLL
System.Security
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4261.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
System.Data.SqlXml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.SqlXml/v4.0_4.0.0.0__b77a5c561934e089/System.Data.SqlXml.dll
System.Configuration.Install
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration.Install/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
protobuf-net
Assembly Version: 2.4.0.0
Win32 Version: 2.4.6.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/protobuf-net.DLL
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
Mono.Cecil
Assembly Version: 0.11.2.0
Win32 Version: 0.11.2.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Mono.Cecil.DLL
Vestris.ResourceLib
Assembly Version: 2.1.0.0
Win32 Version: 2.1.0.0
CodeBase: file:///C:/Users/cyclo/Desktop/Quasar-master/bin/Release/net452/Vestris.ResourceLib.DLL
@BurntDog commented on GitHub (Dec 30, 2020):
OK, this is not a proper fix but a Band-Aid
Code needs a proper fix because a Exception is thrown when there is no data at all to be read
in these locations:
lstStartupItems.Groups.Add(new ListViewGroup("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
===================================================================================
The Quick and dirty fix/Band-Aid, below
private void StartupItemsChanged(object sender, List StartupItems)
{
lstStartupItems.Items.Clear();
try
{
foreach (var item in StartupItems)
{
var i = lstStartupItems.Groups.Cast().First(x => (StartupType)x.Tag == item.Type);
ListViewItem lvi = new ListViewItem(new[] { item.Name, item.Path }) { Group = i, Tag = item };
lstStartupItems.Items.Add(lvi);
}
}
catch (NullReferenceException)
{
I wish I was better then a good Script kiddie but, that's my reality I just don't have the brain power I guess.
Hope this helps some of you until a proper fix comes..
@BurntDog commented on GitHub (Dec 31, 2020):
"Made separate Bug report for this" Almost forgot to mention, when you try to add a startup entry in Path field using "Startup Manager" it won't
let you use special characters ie.. : \ " you're forced to copy and paste. "Made separate Bug report for this"
@BurntDog commented on GitHub (Dec 31, 2020):
"Made separate Bug report for this" I noticed that Startup Manger does not search these locations.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce
Will these be added back in future release? "Made separate Bug report for this"
@MaxXor commented on GitHub (Jan 1, 2021):
Please create a separate bug report for this.
@BurntDog commented on GitHub (Jan 1, 2021):
OK, thanks and Happy New Year @MaxXor
@BurntDog commented on GitHub (Jan 1, 2021):
Closed by mistake....