Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

shortcuts: hit alt+s to submit/post or alt+p to preview

Please read the rules before you post!


Topic Summary

Posted by: twice2double
« on: June 06, 2021, 09:43:37 PM »

So with AuroraPatch it is possible to create a mod for Aurora - which, if he likes it, Steve could very easily implement into his source code and make it part of the main game?!?

Maybe some things.
More likely than not it would be easier for Steve to implement a feature his own way without needing the Patch source code - patches are dealing with obfuscated code after all.
Posted by: TMaekler
« on: June 02, 2021, 03:00:35 AM »

So with AuroraPatch it is possible to create a mod for Aurora - which, if he likes it, Steve could very easily implement into his source code and make it part of the main game?!?
Posted by: twice2double
« on: May 08, 2021, 09:54:00 AM »

This fixed it for me. Thanks for taking the time.

Thanks for contributing!
Posted by: Droll
« on: May 08, 2021, 09:49:18 AM »

Ok so now I get this, what I don't understand is that it seems to be complaining about the NET framework version, but I can play aurora no problem so I should have that framework installed and working already.

OK, that makes sense. Windows won't load web-downloaded assemblies by default. Which explains why the devs never encountered this.
There's a few options but the simplest is to make the change in the code.

Try the new debug build attached. If it works I'll update the main release build attachment.

Edit: To clarify, this is a CAS policy issue, not really a .NET Framework issue. It just so happens that the .NET Framework version on your machine has that default policy in place to disallow foreign DLL loads (which I suspect is most people). The testing I did with a fresh VM was a VM oriented towards Microsoft developers (the only way I could get quick access to a VM image), so it probably had more open CAS policies in place.

This fixed it for me. Thanks for taking the time.
Posted by: twice2double
« on: May 08, 2021, 09:26:20 AM »

Ok so now I get this, what I don't understand is that it seems to be complaining about the NET framework version, but I can play aurora no problem so I should have that framework installed and working already.

OK, that makes sense. Windows won't load web-downloaded assemblies by default. Which explains why the devs never encountered this.
There's a few options but the simplest is to make the change in the code.

Try the new debug build attached. If it works I'll update the main release build attachment.

Edit: To clarify, this is a CAS policy issue, not really a .NET Framework issue. It just so happens that the .NET Framework version on your machine has that default policy in place to disallow foreign DLL loads (which I suspect is most people). The testing I did with a fresh VM was a VM oriented towards Microsoft developers (the only way I could get quick access to a VM image), so it probably had more open CAS policies in place.
Posted by: Droll
« on: May 08, 2021, 09:17:39 AM »

Ok this is much more helpful...

Can you replace the AuroraPatch.exe with this one attached. It should now print the exception encountered.

We'll get there! Haha.

Thanks for taking the time.

Ok so now I get this, what I don't understand is that it seems to be complaining about the NET framework version, but I can play aurora no problem so I should have that framework installed and working already.

Code: [Select]
08/05/2021 16:15:42 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 16:15:42 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 16:15:42 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 16:15:42 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 16:15:42 - AuroraPatch - Debug: Calculating checksum
08/05/2021 16:15:42 - AuroraPatch - Debug: Calculating checksum
08/05/2021 16:15:42 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 16:15:42 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 16:15:42 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 16:15:42 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:46 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 16:15:46 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 16:15:46 - AuroraPatch - Info: Running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Done running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Done running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Done running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Done running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Starting Aurora
08/05/2021 16:15:46 - AuroraPatch - Info: Starting Aurora
08/05/2021 16:15:46 - AuroraPatch - Info: TacticalMap found: jt
08/05/2021 16:15:46 - AuroraPatch - Info: TacticalMap found: jt
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
08/05/2021 16:15:51 - AuroraPatch - Info: Running PostStart
08/05/2021 16:15:51 - AuroraPatch - Info: Running PostStart
08/05/2021 16:15:51 - AuroraPatch - Info: Done running PostStart
08/05/2021 16:15:51 - AuroraPatch - Info: Done running PostStart

If my hunch is correct and the problem is the NET framework version somehow, what would I need to do in order to force the correct version for Aurora.exe and AuroraPatch.exe only, as I don't want to affect anything else on my computer.
Posted by: twice2double
« on: May 08, 2021, 09:04:30 AM »

Ok this is much more helpful...

Can you replace the AuroraPatch.exe with this one attached. It should now print the exception encountered.

We'll get there! Haha.

Thanks for taking the time.
Posted by: Droll
« on: May 08, 2021, 08:47:19 AM »

Quote
Just to clarify, the Patches directory is in the same directory as aurorapatch.exe and aurora.exe. There are two directories inside Patches called UIControls and BlueBeGone, each of those subdirectories contain their respective .dll files. This is correct right?

That's correct.

Can you try the attached debug build please?
Same deal, dump files in Aurora folder, run AuroraPatch.exe.
After closing AuroraPatch, the AuroraPatch.log file should get populated with (hopefully) useful information.
Ignore the double-logging for now :)

Ok this is much more helpful, the program is finding the patches correctly but cannot load them as assemblies for some reason. Here are the debug logs:
Code: [Select]
08/05/2021 15:45:45 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 15:45:45 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 15:45:45 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 15:45:45 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 15:45:45 - AuroraPatch - Debug: Calculating checksum
08/05/2021 15:45:45 - AuroraPatch - Debug: Calculating checksum
08/05/2021 15:45:45 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 15:45:45 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 15:45:45 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 15:45:45 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly.
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly.
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly.
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly.
08/05/2021 15:45:47 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 15:45:47 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 15:45:47 - AuroraPatch - Info: Running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Done running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Done running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Done running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Done running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Starting Aurora
08/05/2021 15:45:47 - AuroraPatch - Info: Starting Aurora
08/05/2021 15:45:47 - AuroraPatch - Info: TacticalMap found: jt
08/05/2021 15:45:47 - AuroraPatch - Info: TacticalMap found: jt
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
08/05/2021 15:45:52 - AuroraPatch - Info: Running PostStart
08/05/2021 15:45:52 - AuroraPatch - Info: Running PostStart
08/05/2021 15:45:52 - AuroraPatch - Info: Done running PostStart
08/05/2021 15:45:52 - AuroraPatch - Info: Done running PostStart
Posted by: twice2double
« on: May 08, 2021, 08:39:02 AM »

Quote
Just throwing a dart at the board: could it be a difference in .Net Framework version?

That could be a legit reason for it to break, but in this case everything is .NET 4.
Posted by: twice2double
« on: May 08, 2021, 08:37:07 AM »

I wanted to ask, could it be possible eventually to have a light theme too? Light backgrounds, black text.

Yes. That's going to be especially easy to do once a proper theme patch comes out.
Just a matter of someone forking the code, changing some RBG values, and sharing the new patch.
Posted by: twice2double
« on: May 08, 2021, 08:32:17 AM »

Quote
Just to clarify, the Patches directory is in the same directory as aurorapatch.exe and aurora.exe. There are two directories inside Patches called UIControls and BlueBeGone, each of those subdirectories contain their respective .dll files. This is correct right?

That's correct.

Can you try the attached debug build please?
Same deal, dump files in Aurora folder, run AuroraPatch.exe.
After closing AuroraPatch, the AuroraPatch.log file should get populated with (hopefully) useful information.
Ignore the double-logging for now :)
Posted by: Zincat
« on: May 08, 2021, 07:53:20 AM »

I'm following this with great interest. The blue color background hurts my eyes a LOT, so I'm a big fan.

I wanted to ask, could it be possible eventually to have a light theme too? Light backgrounds, black text.
Unfortunately my eyes have problems with contrast more than with luminosity, and dark backgrounds with white text is still hard on them. It's still much better than blue though....
Posted by: skoormit
« on: May 08, 2021, 07:38:30 AM »

In first instance it's a logger problem then. I have no idea how this is even possible, these are 3 lines of code in the logger's constructor:
Code: [Select]
Debug.Listeners.Add(traceListener);
Debug.AutoFlush = true;
LogInfo("AuroraPatch logger initialized");

The first line is what allows the message from the native library loader to show up in the log, so we know that is being called, the third line logs the "initialization" message through the exact same mechanism, and somehow that's not showing up.

Just throwing a dart at the board: could it be a difference in .Net Framework version?
Posted by: 01010100
« on: May 08, 2021, 07:16:09 AM »

In first instance it's a logger problem then. I have no idea how this is even possible, these are 3 lines of code in the logger's constructor:
Code: [Select]
Debug.Listeners.Add(traceListener);
Debug.AutoFlush = true;
LogInfo("AuroraPatch logger initialized");

The first line is what allows the message from the native library loader to show up in the log, so we know that is being called, the third line logs the "initialization" message through the exact same mechanism, and somehow that's not showing up.
Posted by: Cobaia
« on: May 08, 2021, 06:47:07 AM »

I'm having the same behavior, AuroraPatch doesn't show the patches, doesn't write in the log file.

I'm trying a fresh machine install.