Aurora-RGB / Aurora

Unified lighting effects across multiple brands and various games. http://www.project-aurora.com/
http://www.project-aurora.com/
MIT License
270 stars 38 forks source link

Fatal Exception caught : System.Exception: The component 'Aurora.Settings.Layers.Controls.Control_PercentLayer' does not have a resource identified by the URI #143

Closed LuckyNewman closed 1 year ago

LuckyNewman commented 1 year ago

Expected Behaviour

Aurora should start with script used to broadcast device update (colors) to arduino based led strips through UDP (I have modified script found online somewhere).

Actual Behaviour

During application start I receive this crash:

[FATAL] 17:42:04: Fatal Exception caught : System.Exception: The component 'Aurora.Settings.Layers.Controls.Control_PercentLayer' does not have a resource identified by the URI '/Aurora;V1.0.0.0;component/settings/layers/controls/control_percentlayer.xaml'. at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at Aurora.Settings.Layers.Controls.Control_PercentLayer.InitializeComponent() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\Controls\Control_PercentLayer.xaml:line 1 at Aurora.Settings.Layers.Controls.Control_PercentLayer..ctor() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\Controls\Control_PercentLayer.xaml.cs:line 11 at Aurora.Settings.Layers.Controls.Control_PercentLayer..ctor(PercentLayerHandler context) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\Controls\Control_PercentLayer.xaml.cs:line 14 at Aurora.Settings.Layers.PercentLayerHandler.CreateControl() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\PercentLayerHandler.cs:line 136 at Aurora.Settings.Layers.LayerHandler1.get_Control() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\LayerHandler.cs:line 226 at Aurora.Settings.Layers.PercentLayerHandler1.SetApplication(Application profile) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\PercentLayerHandler.cs:line 120 at Aurora.Settings.ApplicationProfile.SetApplication(Application app) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\ApplicationProfile.cs:line 55 at Aurora.Profiles.Application.<.ctor>b410(Object , NotifyCollectionChangedEventArgs e) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\Application.cs:line 128 at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection1.InsertItem(Int32 index, T item) at Aurora.Profiles.Application.LoadProfiles() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\Application.cs:line 593 at Aurora.Profiles.Application.Initialize() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\Application.cs:line 143 at Aurora.Profiles.LightingStateManager.Initialize() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\LightingStateManager.cs:line 112 at Aurora.Modules.LightningStateManagerModule.Initialize() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Modules\LightningStateManagerModule.cs:line 35 at Aurora.Modules.LightningStateManagerModule.InitializeAsync() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Lombok.NET\Lombok.NET.MethodGenerators.AsyncGenerator\Aurora_Modules_LightningStateManagerModule.Initialize.g.cs:line 12 at Aurora.App.<>c.b15_1(IAuroraModule m) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 109 at System.Collections.Generic.List1.ConvertAll[TOutput](Converter2 converter) at Aurora.App.OnStartup(StartupEventArgs e) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 109 at System.Windows.Application.<.ctor>b1_0(Object unused) 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) System.Exception: The component 'Aurora.Settings.Layers.Controls.Control_PercentLayer' does not have a resource identified by the URI '/Aurora;V1.0.0.0;component/settings/layers/controls/control_percentlayer.xaml'. at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at Aurora.Settings.Layers.Controls.Control_PercentLayer.InitializeComponent() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\Controls\Control_PercentLayer.xaml:line 1 at Aurora.Settings.Layers.Controls.Control_PercentLayer..ctor() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\Controls\Control_PercentLayer.xaml.cs:line 11 at Aurora.Settings.Layers.Controls.Control_PercentLayer..ctor(PercentLayerHandler context) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\Controls\Control_PercentLayer.xaml.cs:line 14 at Aurora.Settings.Layers.PercentLayerHandler.CreateControl() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\PercentLayerHandler.cs:line 136 at Aurora.Settings.Layers.LayerHandler1.get_Control() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\LayerHandler.cs:line 226 at Aurora.Settings.Layers.PercentLayerHandler1.SetApplication(Application profile) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\Layers\PercentLayerHandler.cs:line 120 at Aurora.Settings.ApplicationProfile.SetApplication(Application app) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Settings\ApplicationProfile.cs:line 55 at Aurora.Profiles.Application.<.ctor>b410(Object , NotifyCollectionChangedEventArgs e) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\Application.cs:line 128 at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection1.InsertItem(Int32 index, T item) at Aurora.Profiles.Application.LoadProfiles() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\Application.cs:line 593 at Aurora.Profiles.Application.Initialize() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\Application.cs:line 143 at Aurora.Profiles.LightingStateManager.Initialize() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\LightingStateManager.cs:line 112 at Aurora.Modules.LightningStateManagerModule.Initialize() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Modules\LightningStateManagerModule.cs:line 35 at Aurora.Modules.LightningStateManagerModule.InitializeAsync() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Lombok.NET\Lombok.NET.MethodGenerators.AsyncGenerator\Aurora_Modules_LightningStateManagerModule.Initialize.g.cs:line 12 at Aurora.App.<>c.b15_1(IAuroraModule m) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 109 at System.Collections.Generic.List1.ConvertAll[TOutput](Converter2 converter) at Aurora.App.OnStartup(StartupEventArgs e) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 109 at System.Windows.Application.<.ctor>b__1_0(Object unused) 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) [FATAL] 17:42:39: Fatal Exception caught : System.NullReferenceException: Object reference not set to an instance of an object. at Aurora.Profiles.LightingStateManager.Dispose() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\LightingStateManager.cs:line 603 at Aurora.Modules.LightningStateManagerModule.Dispose() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Modules\LightningStateManagerModule.cs:line 56 at Aurora.Modules.LightningStateManagerModule.DisposeAsync() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Lombok.NET\Lombok.NET.MethodGenerators.AsyncGenerator\Aurora_Modules_LightningStateManagerModule.Dispose.g.cs:line 12 at Aurora.App.<>c.b19_0(IAuroraModule m) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 265 at System.Collections.Generic.List1.ConvertAll[TOutput](Converter2 converter) at Aurora.App.OnExit(ExitEventArgs e) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 265 at System.Windows.Application.DoShutdown() at System.Windows.Application.ShutdownImpl() at System.Windows.Application.ShutdownCallback(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) System.NullReferenceException: Object reference not set to an instance of an object. at Aurora.Profiles.LightingStateManager.Dispose() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Profiles\LightingStateManager.cs:line 603 at Aurora.Modules.LightningStateManagerModule.Dispose() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Modules\LightningStateManagerModule.cs:line 56 at Aurora.Modules.LightningStateManagerModule.DisposeAsync() in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\Lombok.NET\Lombok.NET.MethodGenerators.AsyncGenerator\Aurora_Modules_LightningStateManagerModule.Dispose.g.cs:line 12 at Aurora.App.<>c.b__19_0(IAuroraModule m) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 265 at System.Collections.Generic.List1.ConvertAll[TOutput](Converter2 converter) at Aurora.App.OnExit(ExitEventArgs e) in D:\a\Aurora\Aurora\Project-Aurora\Project-Aurora\App.xaml.cs:line 265 at System.Windows.Application.DoShutdown() at System.Windows.Application.ShutdownImpl() at System.Windows.Application.ShutdownCallback(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)

Reproduction steps

Put attached .cs script to the Scripts/Devices folder of Aurora

Frequency

Every start it crashes,

Aurora Version:

v129 is crashing

Previously an Issue?

It was working in v65 (was not testing newer versions yet, sorry).

arduino_script_udp 2 strips extended.zip

Aytackydln commented 1 year ago

Hi, sorry about that. I'm aware scripts are broken after .net 6 update. I will need to focus on this later. I can't say for sure but I will try to fix it this weekend.

LuckyNewman commented 1 year ago

Hello, thank you for trying, I would really appreciate it, as it's basically my main RGB system with 2 led strips on Wi-Fi through Arduino. It is quite cheap and powerful way how to make whole room RGB programmable and Aurora was doing so great job using that script!

Please let me know if there is anything I can do or test.

Aytackydln commented 1 year ago

win10-x64.zip

Can you try with this patch on latest version of Aurora?

I had to implement a workaround, compilation of scripts break the app but compiled assemblies are now saved as dll. So next time Aurora opens it will just load the assemblies