AutoSave (Developer help needed)

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
576
607
63
I have been working on this project for several weeks, unfortunately I am getting some error, I explain below that it is AutoSave....

AutoSave - Save the map rust_island_2013.sav Using the working method in second plane, in this way it is possible to save the map obtaining 0% of lag from the server.

Here are some things you need to know before using this plugin.

CHARACTERISTICS
1. Save rust_island_2013.sav every 10 minutes suffering 0% lag no matter how many objects your server has.
2. Save Rust ++ (shared doors, friends lists, administrator list, user cache)

VERY IMPORTANT
1. To use this plugin you must have Rust ++ installed.
2. This plugin disables the original saving of your server and implements saving in the background every 10mins.
3. It is your responsibility to confirm that you are saving the map correctly, by looking at the .log files on your server.

RECOMMENDATIONS
Whenever you go to restart your server for (bug, crash, or whatever), I personally recommend doing fougerite.save from the console to ensure everything is working correctly, since this plugin uses a timer and in some circumstances the timers can Failures ... but should not.

INSTALLATION
1. Extract in the main directory of the Rust server.
2. AutoSave = AutoSave Add this line in Fougerite.cfg, in [Modules] section.
3. Restart server.

P.S. Below you can write your comments with the experience suffered with this plugin, this would help a lot to continue with its development if necessary, greetings !!

If you are a developer like (@DreTaX ,@Jakkee ,@xandeturf ,@_NewAge ,@salva )you can visit this link of the project https://github.com/salvadj1/AutoSave, currently there is only one error that crash the server and is provided here https://github.com/salvadj1/AutoSave/issues. ... Without saying goodbye asking you any help, idea, theory or method that you can contribute will be very welcome, greetings
 

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
576
607
63
I've done some tests and everything was fine, but I went back to crash ... maybe because I have too many things open and doing at the same time in my PC-trash ?, these are the results:

AutoSave Test:

upload_2018-2-11_23-44-27.png


Using in save command "save.all" (you can see how the server is paralyzed)
upload_2018-2-11_23-46-3.png

Crash Obtained:
Code:
Unity Player [version: Unity 4.5.5f1_7684ad0c5a44]

rust_server.exe caused an Access Violation (0xc0000005)
  in module rust_server.exe at 001b:012933b0.

Error occurred at 2018-02-11_234642.

88% memory in use.
3037 MB physical memory [358 MB free].
0 MB paging file [1492 MB free].
2048 MB user address space [166 MB free].
Read from location 00000008 caused an access violation.


========== OUTPUTING STACK TRACE ==================

(0x012933B0) (rust_server): (filename not available): Behaviour::Transfer<StreamedBinaryWrite<0> > + 0x27f90
(0x013E248E) (rust_server): (filename not available): Behaviour::Transfer<StreamedBinaryWrite<0> > + 0x17706e
(0x0A90E900) (Mono JIT code): (filename not available):  (wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type) + 0x28 (0A90E8D8 0A90E924) [035A4E70 - Unity Root Domain] + 0x0
(0x21C4FC04) (Mono JIT code): (filename not available):  ServerSaveManager:Get (bool) + 0x14 (21C4FBF0 21C4FD16) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCD4AC) (Mono JIT code): (filename not available):  Fougerite.Hooks:SaveAll (string) + 0x35c (21CCD150 21CCDEB1) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCBC69) (Mono JIT code): (filename not available):  Fougerite.Hooks:ServerSaved () + 0x151 (21CCBB18 21CCBC7F) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCBB03) (Mono JIT code): (filename not available):  ServerSaveManager:AutoSave () + 0xb (21CCBAF8 21CCBB05) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB759) (Mono JIT code): (filename not available):  save:all (ConsoleSystem/Arg&) + 0x19 (21CCB740 21CCB769) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCFB14) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) <Module>:runtime_invoke_void_ConsoleSystem/Arg& (object,intptr,intptr,intptr) + 0x44 (03BCFAD0 03BCFB68) [035A4E70 - Unity Root Domain] + 0x0
(0x100F0376) (mono): (filename not available): mono_set_defaults + 0x22cb
(0x1005D78C) (mono): (filename not available): mono_runtime_invoke + 0x51
(0x100625E9) (mono): (filename not available): mono_runtime_invoke_array + 0x38b
(0x1002F5BC) (mono): (filename not available): mono_domain_finalize + 0x3b19
(0x03B95983) (Mono JIT code): (filename not available):  (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) + 0x33 (03B95950 03B959C3) [035A4E70 - Unity Root Domain] + 0x0
(0x03B94EF6) (Mono JIT code): (filename not available):  System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) + 0x12e (03B94DC8 03B9502B) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCF9DE) (Mono JIT code): (filename not available):  System.Reflection.MethodBase:Invoke (object,object[]) + 0x26 (03BCF9B8 03BCF9E3) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCD17E) (Mono JIT code): (filename not available):  ConsoleSystem:RunCommand (ConsoleSystem/Arg&,bool) + 0x296 (03BCCEE8 03BCE2CC) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCC8ED) (Mono JIT code): (filename not available):  ConsoleSystem:Run (string,bool) + 0x6d (03BCC880 03BCC922) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB2B9) (Mono JIT code): (filename not available):  AutoSave.AutoSave:GuardarMapaA (object,System.ComponentModel.DoWorkEventArgs) + 0x51 (21CCB268 21CCB726) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB25C) (Mono JIT code): (filename not available):  System.ComponentModel.BackgroundWorker:OnDoWork (System.ComponentModel.DoWorkEventArgs) + 0x24 (21CCB238 21CCB261) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB104) (Mono JIT code): (filename not available):  System.ComponentModel.BackgroundWorker:ProcessWorker (object,System.ComponentModel.AsyncOperation,System.Threading.SendOrPostCallback) + 0x54 (21CCB0B0 21CCB229) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB05A) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_object_object (object,intptr,intptr,intptr) + 0x52 (21CCB008 21CCB0AE) [035A4E70 - Unity Root Domain] + 0x0
(0x100F0376) (mono): (filename not available): mono_set_defaults + 0x22cb
(0x1005D78C) (mono): (filename not available): mono_runtime_invoke + 0x51
(0x100625E9) (mono): (filename not available): mono_runtime_invoke_array + 0x38b
(0x10062883) (mono): (filename not available): mono_runtime_invoke_array + 0x625
(0x1007A287) (mono): (filename not available): mono_security_set_mode + 0x3517
(0x1007AA7C) (mono): (filename not available): mono_security_set_mode + 0x3d0c
(0x1007DA5B) (mono): (filename not available): mono_thread_interruption_request_flag + 0x406
(0x1010B4D6) (mono): (filename not available): mono_unity_thread_clear_domain_fields + 0x3a4b
(0x75E7EE1C) (kernel32): (filename not available): BaseThreadInitThunk + 0x12
(0x77AA37EB) (ntdll): (filename not available): RtlInitializeExceptionChain + 0xef
(0x77AA37BE) (ntdll): (filename not available): RtlInitializeExceptionChain + 0xc2

========== END OF STACKTRACE ===========

**** Crash! ****
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,066
4,441
113
At your house.
github.com
I see the problem, this will require a small review of a function, we might be able to solve it with patching. Will check if i am home.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,066
4,441
113
At your house.
github.com
I've done some tests and everything was fine, but I went back to crash ... maybe because I have too many things open and doing at the same time in my PC-trash ?, these are the results:

AutoSave Test:

View attachment 2429


Using in save command "save.all" (you can see how the server is paralyzed)
View attachment 2430

Crash Obtained:
Code:
Unity Player [version: Unity 4.5.5f1_7684ad0c5a44]

rust_server.exe caused an Access Violation (0xc0000005)
  in module rust_server.exe at 001b:012933b0.

Error occurred at 2018-02-11_234642.

88% memory in use.
3037 MB physical memory [358 MB free].
0 MB paging file [1492 MB free].
2048 MB user address space [166 MB free].
Read from location 00000008 caused an access violation.


========== OUTPUTING STACK TRACE ==================

(0x012933B0) (rust_server): (filename not available): Behaviour::Transfer<StreamedBinaryWrite<0> > + 0x27f90
(0x013E248E) (rust_server): (filename not available): Behaviour::Transfer<StreamedBinaryWrite<0> > + 0x17706e
(0x0A90E900) (Mono JIT code): (filename not available):  (wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type) + 0x28 (0A90E8D8 0A90E924) [035A4E70 - Unity Root Domain] + 0x0
(0x21C4FC04) (Mono JIT code): (filename not available):  ServerSaveManager:Get (bool) + 0x14 (21C4FBF0 21C4FD16) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCD4AC) (Mono JIT code): (filename not available):  Fougerite.Hooks:SaveAll (string) + 0x35c (21CCD150 21CCDEB1) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCBC69) (Mono JIT code): (filename not available):  Fougerite.Hooks:ServerSaved () + 0x151 (21CCBB18 21CCBC7F) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCBB03) (Mono JIT code): (filename not available):  ServerSaveManager:AutoSave () + 0xb (21CCBAF8 21CCBB05) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB759) (Mono JIT code): (filename not available):  save:all (ConsoleSystem/Arg&) + 0x19 (21CCB740 21CCB769) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCFB14) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) <Module>:runtime_invoke_void_ConsoleSystem/Arg& (object,intptr,intptr,intptr) + 0x44 (03BCFAD0 03BCFB68) [035A4E70 - Unity Root Domain] + 0x0
(0x100F0376) (mono): (filename not available): mono_set_defaults + 0x22cb
(0x1005D78C) (mono): (filename not available): mono_runtime_invoke + 0x51
(0x100625E9) (mono): (filename not available): mono_runtime_invoke_array + 0x38b
(0x1002F5BC) (mono): (filename not available): mono_domain_finalize + 0x3b19
(0x03B95983) (Mono JIT code): (filename not available):  (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) + 0x33 (03B95950 03B959C3) [035A4E70 - Unity Root Domain] + 0x0
(0x03B94EF6) (Mono JIT code): (filename not available):  System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) + 0x12e (03B94DC8 03B9502B) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCF9DE) (Mono JIT code): (filename not available):  System.Reflection.MethodBase:Invoke (object,object[]) + 0x26 (03BCF9B8 03BCF9E3) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCD17E) (Mono JIT code): (filename not available):  ConsoleSystem:RunCommand (ConsoleSystem/Arg&,bool) + 0x296 (03BCCEE8 03BCE2CC) [035A4E70 - Unity Root Domain] + 0x0
(0x03BCC8ED) (Mono JIT code): (filename not available):  ConsoleSystem:Run (string,bool) + 0x6d (03BCC880 03BCC922) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB2B9) (Mono JIT code): (filename not available):  AutoSave.AutoSave:GuardarMapaA (object,System.ComponentModel.DoWorkEventArgs) + 0x51 (21CCB268 21CCB726) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB25C) (Mono JIT code): (filename not available):  System.ComponentModel.BackgroundWorker:OnDoWork (System.ComponentModel.DoWorkEventArgs) + 0x24 (21CCB238 21CCB261) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB104) (Mono JIT code): (filename not available):  System.ComponentModel.BackgroundWorker:ProcessWorker (object,System.ComponentModel.AsyncOperation,System.Threading.SendOrPostCallback) + 0x54 (21CCB0B0 21CCB229) [035A4E70 - Unity Root Domain] + 0x0
(0x21CCB05A) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_object_object (object,intptr,intptr,intptr) + 0x52 (21CCB008 21CCB0AE) [035A4E70 - Unity Root Domain] + 0x0
(0x100F0376) (mono): (filename not available): mono_set_defaults + 0x22cb
(0x1005D78C) (mono): (filename not available): mono_runtime_invoke + 0x51
(0x100625E9) (mono): (filename not available): mono_runtime_invoke_array + 0x38b
(0x10062883) (mono): (filename not available): mono_runtime_invoke_array + 0x625
(0x1007A287) (mono): (filename not available): mono_security_set_mode + 0x3517
(0x1007AA7C) (mono): (filename not available): mono_security_set_mode + 0x3d0c
(0x1007DA5B) (mono): (filename not available): mono_thread_interruption_request_flag + 0x406
(0x1010B4D6) (mono): (filename not available): mono_unity_thread_clear_domain_fields + 0x3a4b
(0x75E7EE1C) (kernel32): (filename not available): BaseThreadInitThunk + 0x12
(0x77AA37EB) (ntdll): (filename not available): RtlInitializeExceptionChain + 0xef
(0x77AA37BE) (ntdll): (filename not available): RtlInitializeExceptionChain + 0xc2

========== END OF STACKTRACE ===========

**** Crash! ****


For this I would need to modify the whole autosaving process, and run the FindObjectsofType on the main thread first and then do the rest. This will be complicated but i will try to look at it.