Author Topic: Aurora C# for Linux?  (Read 28084 times)

0 Members and 1 Guest are viewing this topic.

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Aurora C# for Linux?
« Reply #45 on: April 26, 2020, 07:26:08 PM »
BTW top kudos to cpw who not only managed to figure out what was causing the crash in libgdiplus, but fixed it, *and* submitted a pull request *and* got it accepted.
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #46 on: April 28, 2020, 11:22:43 AM »
Jovus you probably should put it up on github, due to some of us needing to recompile some of the libs.
I had the same problem as Rastaman which was fixed by recompiling the SQLite as he did.
I also had problems with the libgdiplus supplied in the discord pin, until I got around to compiling that on my system also.
I suspect these problems are due to differences in core distros, those of us on debian may have to do the above.

That's a good idea. Real life is kicking my butt at the moment or I probably would have already. That said, feel free: decompiling the DLLs into a mono fork should be super-easy.
 
The following users thanked this post: db48x

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #47 on: April 29, 2020, 07:10:12 PM »
Is anyone else unable to create waypoints when using Mono to run Aurora? Works fine in wine.
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #48 on: April 30, 2020, 04:51:34 AM »
Is anyone else unable to create waypoints when using Mono to run Aurora? Works fine in wine.

I'm unable to set waypoints too.

There are also constant Function #2661 and #2662 error popups, which on windows are connected to an outdated dotnet installation according to Steve.
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #49 on: April 30, 2020, 08:30:27 AM »
There are also constant Function #2661 and #2662 error popups, which on windows are connected to an outdated dotnet installation according to Steve.

That can probably be fixed by installing a newer version of Mono. What version do you have installed? I have 6.8.0.105 and don't get those errors.
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #50 on: April 30, 2020, 02:21:41 PM »
There are also constant Function #2661 and #2662 error popups, which on windows are connected to an outdated dotnet installation according to Steve.

That can probably be fixed by installing a newer version of Mono. What version do you have installed? I have 6.8.0.105 and don't get those errors.


I thought so too, so I'm using the nightly Mono releases, where I think the inputs of our Aurora-Mono-Team are already implemented. They are at 6.10.0.104 as of today, but the errors keep coming. Before that I used the stable release version you are using. I even tried on a fresh virtual machine install, to no avail. The next thing to do is use a different distro altogether. Ubuntu might just not work.
« Last Edit: April 30, 2020, 02:26:18 PM by Rastaman »
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #51 on: April 30, 2020, 04:41:20 PM »
Tried it in Fedora 32, no change, there's still the following message:

Function #2662: Could not load file or assembly 'System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

Function #2661 also comes up regularly with exactly the same message.

I have mono 6.13.0.137 installed under Fedora and 6.10.0.104 under Ubuntu, which are both the current nightly builds.

So there must be something I'm doing wrong, but I don't know what. I'm installing mono-complete.
« Last Edit: April 30, 2020, 04:44:33 PM by Rastaman »
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #52 on: April 30, 2020, 06:17:22 PM »
Tried it in Fedora 32, no change, there's still the following message:

Function #2662: Could not load file or assembly 'System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

Function #2661 also comes up regularly with exactly the same message.

I have mono 6.13.0.137 installed under Fedora and 6.10.0.104 under Ubuntu, which are both the current nightly builds.

So there must be something I'm doing wrong, but I don't know what. I'm installing mono-complete.

I've seen those two messages intermittently; it has something to do with recovering facilities or tech from ruins. It's a pretty odd message, given the circumstances.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Aurora C# for Linux?
« Reply #53 on: May 04, 2020, 04:02:48 PM »
yeah I'm also having the problem with waypoints. not sure whats going on there.
 

Offline SpikeTheHobbitMage

  • Bug Moderators
  • Commodore
  • ***
  • S
  • Posts: 670
  • Thanked: 159 times
Re: Aurora C# for Linux?
« Reply #54 on: May 04, 2020, 04:21:44 PM »
That looks like a missing dependency.  The fun part is that I can't find it on my system either, despite not getting those errors.  Will keep looking.  Note: I'm running under wine-mono rather than native mono, but that might still provide useful info.

Edit: Aurora might be trying to load the Entity Framework PluralizationService to do text formatting.

Edit2: I can't find anything current, so this might be a red herring, but there are old reports that mono's PluralizationService has problems if your language settings are set to something other than English.

Edit3: I just updated wine-mono to 5.0.0 and Aurora is now completely unplayable.
Console error message: fixme:mscoree:parse_supported_runtime sku=L".NETFramework,Version=v4.0" not implemented

This error did not occur before the upgrade, version was 4.9.4.

Those of you running under native mono, are you seeing anything similar?

Never mind.  It appears that wine-staging 5.7 is broken.  Updating to mono 5.0.0 within staging 5.6 works.  Sorry about the noise.

Edit4: And now I'm getting errors 2662 and 2661 in wine.
« Last Edit: May 04, 2020, 06:29:41 PM by SpikeTheHobbitMage »
 
The following users thanked this post: Rastaman

Offline SpikeTheHobbitMage

  • Bug Moderators
  • Commodore
  • ***
  • S
  • Posts: 670
  • Thanked: 159 times
Re: Aurora C# for Linux?
« Reply #55 on: June 01, 2020, 12:19:42 PM »
So, I just tried installing .net in wine to run Aurora.

Upside: File dialogs work so images can be selected.   ;D
Downside: Fuel consumption calculations are utterly borked.   :o

While 10HS and 0.1HS engines are handled correctly, a 9.9HS Nuclear Thermal Engine with 95% Engine Power and 1L/EPH Fuel Consumption should use 41.57L/h, not 0.07L/h.  This isn't a just display glitch, either.

Tested with .net 4.0, 4.7.2, and 4.8 in both 32 and 64 bit prefixes.  All show exactly the same bug.
Wine-mono gets it right.

???
 

Offline SpikeTheHobbitMage

  • Bug Moderators
  • Commodore
  • ***
  • S
  • Posts: 670
  • Thanked: 159 times
Re: Aurora C# for Linux?
« Reply #56 on: June 02, 2020, 01:18:05 AM »
I finally got Aurora working on native Mono using Jovis' updated instructions.  cpw's patch made the difference.

Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:15:28 UTC 2020)
AuroraLinuxLibs.zip
Trunk version of libgdiplus.so.0 built from source.

Up sides:
Aurora starts in a quarter of the time.
Tactical map redraw/zoom/scroll are all near-instant, even in Sol with all asteroids visible.
Aurora doesn't hang on exit.

Down sides:
Switching tabs in any window has obnoxious flicker, filling with light grey before anything is drawn.
The mouse wheel scrolls whatever control has keyboard focus rather than the control the mouse is over.
Can't set waypoints.  Once the process is started, the mouse pointer gets stuck as a '+' and the operation can't be cancelled.
Layout errors resulting in missing controls.

Changing images still doesn't work.  The change image dialog returns a bogus path unless you manually select the directory. (/path/to/aurora/Races/Races/Races123.bmp)  Even if you do, Aurora still chokes on *nix paths trying to split off the file name.

Create New Race window:
The mouse cursor gets stuck showing a busy indicator.

Deleting the stock game after creating a new campaign gives:
1.11.0 Function #1699: list position
Trying to select an existing game in the drop-down then asks if the player wants to quit.

Selecting 'Play Game' gives:
1.11.0 Function #1690: Year, Month, and Day parameters describe an un-representable DateTime.
1.11.0 Function #1355; An item with the same key has already been added. Key: 3
1.11.0 Function #1690: Year, Month, and Day parameters describe an un-representable DateTime.
1.11.0 Function #1355; An item with the same key has already been added. Key: 3
1.11.0 Function #1690: Year, Month, and Day parameters describe an un-representable DateTime.
And then #1690 forever.  Aurora must be killed and restarted.

This logged to console twice:
Code: [Select]
System.IndexOutOfRangeException: list position
  at System.Windows.Forms.CurrencyManager.get_Current () [0x00022] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.CurrencyManager.EndCurrentEdit () [0x0000d] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.CurrencyManager.set_Position (System.Int32 value) [0x00043] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ListControl.OnSelectedIndexChanged (System.EventArgs e) [0x0002f] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ComboBox.OnSelectedIndexChanged (System.EventArgs e) [0x00000] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ComboBox+ComboListBox.OnMouseUp (System.Windows.Forms.MouseEventArgs e) [0x00093] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x0007e] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x0016f] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ComboBox+ComboListBox.WndProc (System.Windows.Forms.Message& m) [0x00019] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x0008e] in <c03d10ee440e4eee8278e61d3b7f025c>:0

All-in-all a much better impression than the last time I tried it.

@Jovus would it be possible to get access to the source code for your 'horrible kludges', or at least a hint as to what you did?  Using FONT_NAME="Liberation Sans" without the FONT_SIZE or SCALEHACK* parameters almost nails it and I'd like to try my hand against the remaining  ~3 pixel error in text positioning that is still causing grief.
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #57 on: June 04, 2020, 02:08:26 PM »
Has anyone else tried 1.11.1 successfully? With mono 6.8.0.123 I get a crash; here's an excerpt of the stack trace that it prints:

        0x7f3d0de568d9 - /lib64/libc.so.6 : abort
        0x7f3d0deb14af - /lib64/libc.so.6 : (null)
        0x7f3d0deb8a9c - /lib64/libc.so.6 : (null)
        0x7f3d0deba920 - /lib64/libc.so.6 : (null)
        0x7f3cff44efa9 - /lib64/libgdiplus.so.0 : GdipDeletePen
        0x4150cff3 - Unknown

In wine 5.7 w/ wine-mono it seems to go into an infinite loop while rendering the system view. Possibly it's just really slow and it will finish eventually; I only gave it about five minutes before I killed it.
 

Offline SpikeTheHobbitMage

  • Bug Moderators
  • Commodore
  • ***
  • S
  • Posts: 670
  • Thanked: 159 times
Re: Aurora C# for Linux?
« Reply #58 on: June 04, 2020, 05:59:15 PM »
Has anyone else tried 1.11.1 successfully? With mono 6.8.0.123 I get a crash; here's an excerpt of the stack trace that it prints:

        0x7f3d0de568d9 - /lib64/libc.so.6 : abort
        0x7f3d0deb14af - /lib64/libc.so.6 : (null)
        0x7f3d0deb8a9c - /lib64/libc.so.6 : (null)
        0x7f3d0deba920 - /lib64/libc.so.6 : (null)
        0x7f3cff44efa9 - /lib64/libgdiplus.so.0 : GdipDeletePen
        0x4150cff3 - Unknown

In wine 5.7 w/ wine-mono it seems to go into an infinite loop while rendering the system view. Possibly it's just really slow and it will finish eventually; I only gave it about five minutes before I killed it.
Unless you are posting from the future, I think you mean 1.11.0.  :)

Native mono requires a trunk version of libgdiplus due to a bug in the current release version.  It isn't hard to build it from source.

To build libgdiplus.so.0, in an empty directory run:
Code: [Select]
git clone https://github.com/mono/libgdiplus libgdiplus
cd libgdiplus
./autogen.sh
make
mv ./src/.libs/libgdiplus.so.0.0.0 ../libgdiplus.so.0
then move libgdiplus.so.0 into your Aurora directory.

Wine 5.7 and newer automatically install wine-mono-5.0.0, which is bugged all to hell.  You will need to download and manually install the wine-mono-5.0.1-x86.msi from https://github.com/madewokherd/wine-mono/releases
« Last Edit: June 04, 2020, 06:06:11 PM by SpikeTheHobbitMage »
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #59 on: June 04, 2020, 07:10:27 PM »
Yes, that was a typo.

I think this is a different bug, since I've used this version of mono/libgdiplus before, unless something has gone wrong… Anyway, I filed a bug for this crash, see https://github.com/mono/libgdiplus/issues/653 for the details I was able to figure out.