DanielKote / Foreman2

Visual planning tool for Factorio
Other
158 stars 14 forks source link

Error when adding a recipe in a new graph on a brand new install #80

Closed Soken50 closed 7 months ago

Soken50 commented 7 months ago

Not sure what the issue is, I'm not a programmer by any stretch of the definition, so here's the bug report if anyone can tell me what's wrong with it :

************** Exception Text **************
System.TypeInitializationException: The type initializer for 'Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'google-ortools-native': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_operations_research_linear_solver(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
   at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper..cctor()
   --- End of inner exception stack trace ---
   at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper..ctor()
   at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE..cctor()
   --- End of inner exception stack trace ---
   at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.Solver_CreateSolver(String jarg1)
   at Google.OrTools.LinearSolver.Solver.CreateSolver(String solver_id)
   at Foreman.GoogleSolver..ctor() in D:\software\Factorios\Foreman 2\Foreman\Models\Solver\GoogleSolver.cs:line 20
   at Foreman.ProductionSolver..ctor(Boolean pullOutputNodes, Double outputObjectiveC, Double factoryObjectiveC, Double overflowObjectiveC, Double errorObjectiveC, Double lowPriorityMultiplier) in D:\software\Factorios\Foreman 2\Foreman\Models\Solver\ProductionSolver.cs:line 80
   at Foreman.ProductionSolver..ctor(Boolean pullOutputNodes, Double pullPower, Double minRecipeOutRate, Double lowPriorityMultiplier) in D:\software\Factorios\Foreman 2\Foreman\Models\Solver\ProductionSolver.cs:line 70
   at Foreman.ProductionGraph.OptimiseNodeGroup(IEnumerable`1 nodeGroup) in D:\software\Factorios\Foreman 2\Foreman\Models\Solver\GraphOptimisation.cs:line 28
   at Foreman.ProductionGraph.OptimizeGraphNodeValues() in D:\software\Factorios\Foreman 2\Foreman\Models\Solver\GraphOptimisation.cs:line 16
   at Foreman.ProductionGraph.UpdateNodeValues() in D:\software\Factorios\Foreman 2\Foreman\Models\ProductionGraph.cs:line 313
   at Foreman.ProductionGraphViewer.<>c__DisplayClass108_0.<AddRecipe>g__ProcessNodeRequest|0(Object o, RecipeRequestArgs recipeRequestArgs) in D:\software\Factorios\Foreman 2\Foreman\ProductionGraphView\ProductionGraphViewer.cs:line 287
   at Foreman.RecipeChooserPanel.IRButton_MouseUp(Object sender, MouseEventArgs e) in D:\software\Factorios\Foreman 2\Foreman\Controls\IRChooserPanel.cs:line 652
   at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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.9195.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Foreman
    Assembly Version: 2.0.12.0
    Win32 Version: 2.0.12.0
    CodeBase: file:///C:/Users/willi/Downloads/Foreman%202/Release/Foreman.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9195.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9206.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    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.9037.0 built by: NET481REL1
    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.9200.0 built by: NET481REL1LAST_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.9037.0 built by: NET481REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.1.20720
    CodeBase: file:///C:/Users/willi/Downloads/Foreman%202/Release/Newtonsoft.Json.DLL
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
Google.OrTools
    Assembly Version: 9.1.9490.0
    Win32 Version: 9.1.9490.0
    CodeBase: file:///C:/Users/willi/Downloads/Foreman%202/Release/Google.OrTools.DLL
----------------------------------------
Soken50 commented 7 months ago

Is this no longer being maintained ? I loved Foreman2 until I had to upgrade my PC :/

ybeauchamph commented 7 months ago

You're probably missing Microsoft Visual C++ Redistributable. Check this comment: https://github.com/DanielKote/Foreman2/issues/65#issuecomment-1566140611

Soken50 commented 7 months ago

It was installed but installing it anew seems to have fixed the issue, thanks a lot for the help. I can keep graphing away once more :D