EDDiscovery / EDDiscovery

Captains log and 3d star map for Elite Dangerous
Apache License 2.0
769 stars 171 forks source link

crash on opening 3d map ubuntu 22.04 #3338

Closed adamthat closed 1 year ago

adamthat commented 1 year ago

Description

Additional Information

Exception Details:

EDDiscovery v15.1.1.500 There was an unhandled UI exception.

==== BEGIN ====
System.DllNotFoundException: opengl32.dll assembly:<unknown assembly> type:<unknown type> member:(null)
 at (wrapper managed-to-native) GLOFC.GLStatics.wglGetCurrentContext()
 at GLOFC.GLStatics.GetContext () [0x00000] in <8e95fc6b11c24186aef5eb01c2c9e02f>:0 
 at GLOFC.WinForm.GLWinFormControl..ctor (System.Windows.Forms.Control attachcontrol, OpenTK.Graphics.GraphicsMode mode, System.Int32 major, System.Int32 minor, OpenTK.Graphics.GraphicsContextFlags flags) [0x001e4] in <8e95fc6b11c24186aef5eb01c2c9e02f>:0 
 at EDDiscovery.UserControls.UserControl3DMap.Init () [0x0000d] in /home/adam/src/EDDiscovery/EDDiscovery/UserControls/3DMap/UserControl3DMap.cs:40 
 at EDDiscovery.UserControls.UserControlCommonBase.Init (EDDiscovery.EDDiscoveryForm ed, System.Int32 dn) [0x0005b] in /home/adam/src/EDDiscovery/EDDiscovery/UserControls/UserControlCommonBase.cs:63 
 at (wrapper remoting-invoke-with-check) EDDiscovery.UserControls.UserControlCommonBase.Init(EDDiscovery.EDDiscoveryForm,int)
 at EDDiscovery.PopOutControl.PopOut (EDDiscovery.PanelInformation+PanelIDs selected) [0x000e3] in /home/adam/src/EDDiscovery/EDDiscovery/PopOuts.cs:120 
 at EDDiscovery.EDDiscoveryForm+<>c__DisplayClass210_0.<buttonExtPopOut_Click>b__0 (System.Object s, System.EventArgs ea) [0x00001] in /home/adam/src/EDDiscovery/EDDiscovery/EDDiscoveryForm.cs:1433 
 at ExtendedControls.ExtListBoxForm.listcontrol_SelectedIndexChanged (System.Object sender, System.EventArgs e) [0x0001f] in /home/adam/src/EDDiscovery/ExtendedControls/ExtendedControls/Forms/ListBoxForm.cs:110 
 at ExtendedControls.ExtListBox.lbsys_SelectedIndexChanged (System.Object sender, System.EventArgs e) [0x00020] in /home/adam/src/EDDiscovery/ExtendedControls/ExtendedControls/Controls/ListBox.cs:491 
 at System.Windows.Forms.ListBox.OnSelectedIndexChanged (System.EventArgs e) [0x00020] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.ListBox.OnItemClick (System.Int32 index) [0x00000] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.ListBox.OnMouseUpLB (System.Object sender, System.Windows.Forms.MouseEventArgs e) [0x00063] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.Control.OnMouseUp (System.Windows.Forms.MouseEventArgs e) [0x00019] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00078] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001b4] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.ListBox.WndProc (System.Windows.Forms.Message& m) [0x0003e] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <28e46de2d20c496895000ef0abfc2106>:0 
 at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00085] in <28e46de2d20c496895000ef0abfc2106>:0 
===== END =====
klightspeed commented 1 year ago

I guess the 3D map control should be disabled under non-windows platforms, given that GLOFC uses pinvoke without checking what platform it's running on.

adamthat commented 1 year ago

The 3D map works on the same system under Version 12.1.4.0, where I get a separate button for it at the top of the main menu The problem I described now occurs as soon as I start ED using version 15.1.1.500 Previously I could at least attempt to open the 3D map via the entry in the 'Click to select a pop-out panel to display' submenu, though I saw no top-level button for it. Now it doesn't even get that far The Fatal Error message appears immediately on version 15.1.1.500 application startup with the the contents:

A fatal exception was encountered while initializing EDDiscovery.

==== BEGIN ==== System.DllNotFoundException: opengl32.dll assembly: type: member:(null) at (wrapper managed-to-native) GLOFC.GLStatics.wglGetCurrentContext() at GLOFC.GLStatics.GetContext () [0x00000] in <8e95fc6b11c24186aef5eb01c2c9e02f>:0 at GLOFC.WinForm.GLWinFormControl..ctor (System.Windows.Forms.Control attachcontrol, OpenTK.Graphics.GraphicsMode mode, System.Int32 major, System.Int32 minor, OpenTK.Graphics.GraphicsContextFlags flags) [0x001e4] in <8e95fc6b11c24186aef5eb01c2c9e02f>:0 at EDDiscovery.UserControls.UserControl3DMap.Init () [0x0000d] in /home/adam/src/EDDiscovery/EDDiscovery/UserControls/3DMap/UserControl3DMap.cs:40 at EDDiscovery.UserControls.UserControlCommonBase.Init (EDDiscovery.EDDiscoveryForm ed, System.Int32 dn) [0x0005b] in /home/adam/src/EDDiscovery/EDDiscovery/UserControls/UserControlCommonBase.cs:63 at (wrapper remoting-invoke-with-check) EDDiscovery.UserControls.UserControlCommonBase.Init(EDDiscovery.EDDiscoveryForm,int) at EDDiscovery.PopOutControl.PopOut (EDDiscovery.PanelInformation+PanelIDs selected) [0x000e3] in /home/adam/src/EDDiscovery/EDDiscovery/PopOuts.cs:120 at EDDiscovery.PopOutControl.LoadSavedPopouts () [0x00076] in /home/adam/src/EDDiscovery/EDDiscovery/PopOuts.cs:88 at EDDiscovery.EDDiscoveryForm.EDDiscoveryForm_Shown (System.Object sender, System.EventArgs e) [0x000b5] in /home/adam/src/EDDiscovery/EDDiscovery/EDDiscoveryForm.cs:556 at System.Windows.Forms.Form.OnShown (System.EventArgs e) [0x00019] in <28e46de2d20c496895000ef0abfc2106>:0 at EDDiscovery.Forms.DraggableFormPos.OnShown (System.EventArgs e) [0x00009] in /home/adam/src/EDDiscovery/EDDiscovery/Forms/DraggableFormPos.cs:154 at System.Windows.Forms.Form.SetVisibleCore (System.Boolean value) [0x0013d] in <28e46de2d20c496895000ef0abfc2106>:0 at System.Windows.Forms.Control.set_Visible (System.Boolean value) [0x00009] in <28e46de2d20c496895000ef0abfc2106>:0 at System.Windows.Forms.Control.Show () [0x00000] in <28e46de2d20c496895000ef0abfc2106>:0 at EDDiscovery.EDDApplicationContext.SwitchContext (System.Windows.Forms.Form newForm) [0x0001c] in /home/adam/src/EDDiscovery/EDDiscovery/EDDApplicationContext.cs:157 at EDDiscovery.EDDApplicationContext.InitialiseEDD (System.Object sender, System.EventArgs e) [0x00323] in /home/adam/src/EDDiscovery/EDDiscovery/EDDApplicationContext.cs:251 ===== END =====

adamthat commented 1 year ago

apologies I closed the issue by mistake, have just reopened. Have tried a fresh reinstall, get 15.1.4.0 now,same exception other details as in my last comment A fatal exception was encountered while initializing EDDiscovery.

==== BEGIN ==== System.DllNotFoundException: opengl32.dll assembly: type: member:(null) at (wrapper managed-to-native) GLOFC.GLStatics.wglGetCurrentContext() at GLOFC.GLStatics.GetContext () [0x00000] in :0 at GLOFC.WinForm.GLWinFormControl..ctor (System.Windows.Forms.Control attachcontrol, OpenTK.Graphics.GraphicsMode mode, System.Int32 major, System.Int32 minor, OpenTK.Graphics.GraphicsContextFlags flags) [0x001e4] in :0 at EDDiscovery.UserControls.UserControl3DMap.Init () [0x0000d] in /home/adam/EDDiscovery/EDDiscovery/UserControls/3DMap/UserControl3DMap.cs:40 at EDDiscovery.UserControls.UserControlCommonBase.Init (EDDiscovery.EDDiscoveryForm ed, System.Int32 dn) [0x0005b] in /home/adam/EDDiscovery/EDDiscovery/UserControls/UserControlCommonBase.cs:63 at (wrapper remoting-invoke-with-check) EDDiscovery.UserControls.UserControlCommonBase.Init(EDDiscovery.EDDiscoveryForm,int) at EDDiscovery.PopOutControl.PopOut (EDDiscovery.PanelInformation+PanelIDs selected) [0x000e3] in /home/adam/EDDiscovery/EDDiscovery/PopOuts.cs:120 at EDDiscovery.PopOutControl.LoadSavedPopouts () [0x00076] in /home/adam/EDDiscovery/EDDiscovery/PopOuts.cs:88 at EDDiscovery.EDDiscoveryForm.EDDiscoveryForm_Shown (System.Object sender, System.EventArgs e) [0x000b5] in /home/adam/EDDiscovery/EDDiscovery/EDDiscoveryForm.cs:556 at System.Windows.Forms.Form.OnShown (System.EventArgs e) [0x00019] in <28e46de2d20c496895000ef0abfc2106>:0 at EDDiscovery.Forms.DraggableFormPos.OnShown (System.EventArgs e) [0x00009] in /home/adam/EDDiscovery/EDDiscovery/Forms/DraggableFormPos.cs:154 at System.Windows.Forms.Form.SetVisibleCore (System.Boolean value) [0x0013d] in <28e46de2d20c496895000ef0abfc2106>:0 at System.Windows.Forms.Control.set_Visible (System.Boolean value) [0x00009] in <28e46de2d20c496895000ef0abfc2106>:0 at System.Windows.Forms.Control.Show () [0x00000] in <28e46de2d20c496895000ef0abfc2106>:0 at EDDiscovery.EDDApplicationContext.SwitchContext (System.Windows.Forms.Form newForm) [0x0001c] in /home/adam/EDDiscovery/EDDiscovery/EDDApplicationContext.cs:157 at EDDiscovery.EDDApplicationContext.InitialiseEDD (System.Object sender, System.EventArgs e) [0x00323] in /home/adam/EDDiscovery/EDDiscovery/EDDApplicationContext.cs:251 ===== END =====

klightspeed commented 1 year ago

For the exception on starting, you will likely need to reset your tabs by holding shift while starting EDDiscovery, or using the -safemode argument when starting EDDiscovery.

Eahlstan commented 1 year ago

The button you mentioned opened the old 3D map, it's gone now. The new map uses OpenGL and as the error states that's not found on your Linux. klightspeed is the one here who knows Linux better than anyone else, so if he says that disabling the whole map on Linux is the correct solution I guess there's no way to get it running on it.

klightspeed commented 1 year ago

The issue is that OFC doesn't check the current platform. https://github.com/Foundation-Classes-For-OpenTK/OFC/blob/8d20720a19fa03f9e89cd87a8179b1c38c80efd4/OFC/GL/GLStatics.cs#L31-L40

        [DllImport("opengl32.dll", EntryPoint = "wglGetCurrentContext")]
        extern static IntPtr wglGetCurrentContext();// DCAl

        /// <summary>
        /// Get the currentopenGL rendering context handle.
        /// </summary>
        public static IntPtr GetContext()
        {
            return wglGetCurrentContext();
        }

I am looking to see if there is an equivalent call in OpenTK - though it's quite possible there is none.

robbyxp1 commented 1 year ago

Acknowledged. Will be fixed in next version. Thanks for the report.

klightspeed commented 1 year ago

Acknowledged. Will be fixed in next version. Thanks for the report.

That PR for OFC is still waiting with:

I've not forgotton about this, but I really want to make OFC tests run on Linux first, get a stable base, then look into this.

from 2 months ago.

Eahlstan commented 1 year ago

That explains why I got confused by the other issue yesterday. I had in mind that there was already a fix for "3D map crashing EDD on Linux".