Maassoft / ColorControl

Easily change NVIDIA display settings and/or control LG TV's
GNU General Public License v3.0
829 stars 39 forks source link

LCMS2 module missing error when generating color profiles #305

Closed cascardian closed 6 months ago

cascardian commented 6 months ago

Hi! Wanting to try out this new feature with my LG 27GR95QE-B after mainly solving the gamma issue by using the alternative solution on dylanraga's repo, I was met with this error on hitting the Generate button:

lcms2-module-missing-error

The lcms2.dll is there, of course. It occurs on default config. The OS is Windows 11 23H2. Please let me know if you need anything from me to help debug this.

Error message in text:

Error while initializing application: The type initializer for 'LittleCms.CmsNative' threw an exception. Inner exception: Unable to load DLL 'lcms2' or one of its dependencies: The specified module could not be found. (0x8007007E) at LittleCms.CmsNative.cmsCreate_sRGBProfile() at LittleCms.IccProfile.Create_sRGB() in C:\Users\vinni\source\repos\ColorControl\LittleCms\IccProfile.cs:line 30 at MHC2Gen.MHC2Wrapper.GenerateSdrAcmProfile(GenerateProfileCommand command) in C:\Users\vinni\source\repos\ColorControl\MHC2Gen\MHC2Wrapper.cs:line 17 at ColorControl.XForms.ColorProfileWindow.Button_Click(Object sender, RoutedEventArgs e) in .\XForms\ColorProfileWindow.xaml.cs:line 112 at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at Interop.User32.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context) at ColorControl.Program.MainAsync(String[] args) in .\Program.cs:line 159 at ColorControl.Program.Main(String[] args) in .\Program.cs:line 51

Maassoft commented 6 months ago

Thanks for submitting this error. This is fixed now with v9.8.0.1. The used debug 'lcms2.dll' version had dependencies on certain debug DLL's which only are there if you have installed Visual Studio or some SDK's.

cascardian commented 6 months ago

I can confirm this fixes the issue. Thanks!