ADRIFT for Mac

I see that there’s a new ADRIFT game nominated for the XYZZY “Best Game” category, Skybreak!

What’s the current state of ADRIFT for macOS? I see that there’s a very new version of ADRIFT 5 out, like, released literally last week, including an update of the Mono version of ADRIFT, but last time I tried it, the Mono version was completely broken, even on Linux.

Does the Mono version work at all, on any platform? Does it work on macOS? Could it be fixed?

The online ADRIFT runner is down, right? (Is it ever running? It was down when I last investigated ADRIFT in 2018 and as far as I’m aware it hasn’t worked in years.)


The online Runner has been working since IFComp 2019, except from some initial problems, but I understand why you ask.

It seems likely that the Mono-version still does not work on Mac, since (at least in the past) the Developer of ADRIFT was not able to test the Mac-version. I will ask him anyway - perhaps he has tested on Linux, which would increase the chance that the Mono-version also works on Mac. I will post here when I know more.

1 Like

I just spent some time updating my Mono installation and installing the new ADRIFT runner (with the Sept. 9 release date) under Linux, and the package itself seems to be broken. Trying to run /usr/local/bin/adrift crashes, complaining that it can’t find /usr/local/lib/adrift5/MonoRunner.exe. This file is listed in the package contents in the README file, but doesn’t seem to be included in the archive itself.

1 Like

Interesting. I tried it several times for Skybreak and it just sat there spinning for a minute plus and I gave up, but then I tried it just now and it just worked!


Thanks for reporting this. I will pass this on to the developer. Hopefully, he will upload a fixed version soon.

1 Like

I haven’t tried anything like that. Perhaps your location matters(? - I am seated in Europe) or how many are playing simultaneously.

Hope you will have a problem free session of Skybreak! :slight_smile:

You were right, the MonoRunner.exe was missing previously, and that may also have been the case last year(?).

Anyway, the Mono-version has been updated on the download-page (you might have to refresh the page before downloading, so you don’t download an earlier version), so now it contains MonoRunner.exe. Hope you can get it to work on Linux. If you do, please let us know. If so, there is a chance it will work on Mac too.

I spent some time with the Mono build today, and I failed to get it to work. I claim that the Mono build doesn’t work at all on any game, though I’d be happy to be proven wrong.

I downloaded which includes a /usr/local directory. I copied its ./usr/local/bin/adrift script into /usr/local/bin and its ./usr/local/lib/adrift5 directory into /usr/local/lib.

On Ubuntu 20.04, I at first ran mono and Ubuntu prompted me to sudo apt install mono-runtime. This was a trap. When I tried running adrift after that, it printed on the Terminal: System.IO.FileNotFoundException: Could not load file or assembly 'WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.

Googling, I found that the problem was that mono-runtime doesn’t include WindowsBase, and so I really needed to sudo apt install mono-complete.

Once I did that and reran adrift, it just spit out a couple of error dialogs.

Could not load type of field 'ADRIFT.My.MyProject:m_ComputerObjectProvider' (0) due to: Could not load file or assembly 'Microsoft.VisualBasic, Version=, Culture=neutral, PublicKeyToken=b03f5f711d50a3a' or one of its dependencies.

More Googling indicated that despite the name mono-complete, it doesn’t include Visual Basic, forcing me to sudo apt install mono-vbnc. When I did that and re-ran adrift, it popped up this error dialog exactly 34 times.

SaveSetting error: Invalid path
  at System.IO.Path.GetDirectoryName (System.String path) [0x00010] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at ADRIFT.CSettings.SetupXMLFileName (System.String fn) [0x00017] in <9259f900a8e14b0ab74dda08bc33280f>:0
  at ADRIFT.CSettings.SaveSetting (System.String AppTitle, System.String Settings, System.String Key, System.String Value) [0x0000d] in <9259f900a8e14b0ab74dda08bc33280f>:0

Despite those 34 errors, it did in fact launch!

Then I tried opening skybreak 1.2.taf and it printed another error.

The game didn’t start. Just in case this was somehow specific to Skybreak! I also tried Six Silver Bullets, and got a different error:

I didn’t get nearly this far when running Mono on macOS Catalina 10.15.6. I ran brew cask install mono-mdk, installed adrift in /usr/local/bin and adrift5 in /usr/local/lib, but when I launch adrift it crashes, presumably because Windows.Forms isn’t available in mono on 64-bit Catalina (Catalina provides only 64-bit libraries, with no 32-bit backward-compatibility support).

dfab: ~ % adrift
WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all

	Native Crash Reporting
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

	Native stacktrace:
	0x104eb3ad9 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_dump_native_crash_info
	0x104e4bfb5 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_handle_native_crash
	0x104eadc56 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : altstack_handle_and_restore
	0x7fff6078a066 - /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight : SLDisplayBounds
	0x10d2ce848 - Unknown
	0x108150986 - Unknown
	0x104da9ae2 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_jit_runtime_invoke
	0x104fb9342 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_runtime_try_invoke
	0x104fb7f68 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_runtime_class_init_full
	0x104da1610 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_jit_compile_method_inner
	0x104da507a - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_jit_compile_method_with_opt
	0x104e4eabe - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : common_call_trampoline
	0x104e4e510 - /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono : mono_magic_trampoline
	0x1052a5393 - Unknown
	0x10d2cd22b - Unknown
	0x10d2ccff3 - Unknown
	0x10d2cb843 - Unknown

	Telemetry Dumper:
Pkilling 0x7000046b3000 from 0x1071a0dc0
Entering thread summarizer pause from 0x1071a0dc0
Finished thread summarizer pause from 0x1071a0dc0.
Failed to create breadcrumb file (null)/crash_hash_0x1585bf6fe1

Waiting for dumping threads to resume

	External Debugger Dump:

	Basic Fault Address Reporting
Memory around native instruction pointer (0x7fff6078a066):0x7fff6078a056  53 50 48 89 fb 48 8b 05 ee fa b5 2f 48 8b 48 18  SPH..H...../H.H.
0x7fff6078a066  48 89 4f 18 48 8b 48 10 48 89 4f 10 48 8b 08 48  H.O.H.H.H.O.H..H
0x7fff6078a076  8b 40 08 48 89 47 08 48 89 0f 89 f7 48 89 de e8  .@.H.G.H....H...
0x7fff6078a086  4d df fb ff 48 89 d8 48 83 c4 08 5b 5d c3 55 48  M...H..H...[].UH

	Managed Stacktrace:
	  at <unknown> <0xffffffff>
	  at System.Windows.Forms.XplatUICarbon:CGDisplayBounds <0x000b7>
	  at System.Windows.Forms.XplatUICarbon:get_WorkingArea <0x00072>
	  at System.Windows.Forms.XplatUICarbon:get_VirtualScreen <0x00043>
	  at System.Windows.Forms.XplatUI:get_VirtualScreen <0x00048>
	  at System.Windows.Forms.Screen:.cctor <0x0017a>
	  at System.Object:runtime_invoke_void <0x000a5>
	  at <unknown> <0xffffffff>
	  at MessageBoxForm:InitFormsSize <0x000fa>
	  at MessageBoxForm:RunDialog <0x00062>
	  at MessageBoxForm:RunDialog <0x000a2>
	  at System.Windows.Forms.MessageBox:Show <0x000ba>
	  at Microsoft.VisualBasic.Interaction:MsgBox <0x00242>
	  at ADRIFT.SharedModule:ErrMsg <0x0023a>
	  at ADRIFT.CSettings:SaveSetting <0x0043a>
	  at ADRIFT.Mono:SaveSetting <0x00072>
	  at ADRIFT.Map:set_ShowAxes <0x000ca>
	  at ADRIFT.Map:set_ShowAxes <0x000aa>
	  at ADRIFT.RunnerSession:.ctor <0x00752>
	  at ADRIFT.frmRunner:.ctor <0x00472>
	  at System.Object:runtime_invoke_void__this__ <0x000b0>
	  at <unknown> <0xffffffff>
	  at System.Reflection.RuntimeConstructorInfo:InternalInvoke <0x000b8>
	  at System.Reflection.RuntimeConstructorInfo:InternalInvoke <0x00057>
	  at System.RuntimeType:CreateInstanceMono <0x00136>
	  at System.RuntimeType:CreateInstanceSlow <0x00059>
	  at System.RuntimeType:CreateInstanceDefaultCtor <0x00072>
	  at System.Activator:CreateInstance <0x000a8>
	  at MyForms:Create__Instance__ <0x001ca>
	  at MyForms:get_frmRunner <0x0004a>
	  at ADRIFT.frmRunner:Main <0x0004a>
	  at System.Object:runtime_invoke_void <0x000a5>
	  at <unknown> <0xffffffff>
	  at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x000b8>
	  at System.Reflection.RuntimeMethodInfo:Invoke <0x00116>
	  at System.Reflection.MethodBase:Invoke <0x00047>
	  at R.P:Main <0x00292>
	  at <Module>:runtime_invoke_void_object <0x000b0>
zsh: abort      adrift
1 Like

Thanks for the detailed information. I have passed this on to the ADRIFT Forum. Hopefully, the developer Campbell Wild will remove the Mono-version until it has been fixed.

Finally got a chance to sit down and try the updated version – I had an experience almost identical to Dan’s.

For future reference, is it better to report errors directly on the ADRIFT download page?

1 Like

Here on is good enough, since I will pass on the message to the ADRIFT Forum. But if you feel like it, I guess(?) it may also help to mail the “webmaster” (same person, i.e. Campbell who created ADRIFT). You probably won’t get a response but it may remind him anyway.

1 Like

Ive run through a similar process on arch Linux tho i did manage to get an if game working ( it was a taf file, i havn’t got any blorbs working yet and the referenced file did crash in much the same way. I personally don’t care about getting the game working on mac but looking at the source code I can see that the errors I get tend to refer to missing xml files (clsUserSession.vb 202) for instance reads Dim sMacrosFile As String = DataPath(True) & "ADRIFTMacros.xml" and another error I get is regarding a missing Layout xml file (Blorb.vb 353 Dim sXMLFile As String = DataPath(True) & "RunnerLayout.xml")

The error seems to be with DataPath(True)
BinPath(True) returns a value where as DataPath(True) crashes

So I hacked together a solution and it now works with Blorbs and the Macros work
basically you want DataPath() to return something valid its definition is in Global.vb (it seems to be a macro)

I made the following change

#If www Then
Return IO.Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, “App_Data”) & IO.Path.DirectorySeparatorChar
Return Application.StartupPath & If(bSeparatorCharacter, IO.Path.DirectorySeparatorChar, “”).ToString & “/data”
'Dim sPath As String = My.Computer.FileSystem.SpecialDirectories.MyDocuments & IO.Path.DirectorySeparatorChar & “ADRIFT”
'If Not IO.Directory.Exists(sPath) Then IO.Directory.CreateDirectory(sPath)
'Return sPath ’ & IO.Path.DirectorySeparatorChar
#End If
’ 'Return Application.StartupPath & IO.Path.DirectorySeparatorChar
’ Dim sPath As String
’ If Application.LocalUserAppDataPath IsNot Nothing Then
’ sPath = Application.LocalUserAppDataPath.Substring(0, Application.LocalUserAppDataPath.IndexOf(“\ADRIFT”)) & “\ADRIFT” '& IO.Path.DirectorySeparatorChar
’ Else
’ sPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments & IO.Path.DirectorySeparatorChar & “ADRIFT”
’ End If

’ If Not IO.Directory.Exists(sPath) Then IO.Directory.CreateDirectory(sPath)
’ Return sPath & If(bSeparatorCharacter, IO.Path.DirectorySeparatorChar, “”).ToString
#End If

where i commented out the else region that existed before and replaced it with my own

(I hate vb)

been mucking arround with the code for a bit you can get overlapping text and I thought that was because i was on wayland but oh no you get the same under x and worse x doesn’t handle key presses correctly so if you hold down windows or shift the game crashes wich is pritty funny anyway here is a screenshot of it working under i3 and prof you can get decently far into a game before a crash if ur carefull to not press said characters. also audio is broken but thats not a supprise audio under linux is a mess and mono is doing its best. It may be recoverable but the fact is the code base its self isn’t very hacker friendly the dev needs to at least have compile instructions and make shure that the code he commits actually compiles its rediculase having to edit visual studio files and correcting capitalisation before u can compile. let alone the fact he has fragments of his own compile path in the github code (C:/Users/Campbell/Appdata). RIP adrift u will likely never run on linux ( also f bsd 3-clause).

I uploaded other pic to the other post cause some jank new user stuff