Closed jguy1987 closed 10 months ago
The mod hasn't been officially updated for A21, so not sure how you even got it working to begin with!?
I took the files from e792426 and compiled them using the prettify.bat.
It loads and initially works on singleplayer, but honestly never tested leaving and re-joining to see if they still worked. On initial server launch using a new map the mod loads just fine. But, after power items are placed and loaded up (generators with engines, banks with batteries, etc), you get this error.
I know its not "official", but I noticed the github, noticed the update so I thought I'd try it out, fully aware that if there were bugs I was on my own but thought I'd contribute in any way possible.
Can confirm still an issue reading power.dat after restart Note: If you remove power.dat.bak the server will still throw the error but does actually boot. So if you download the power.dat before you stop the server, stop the server, then delete both the power.dat and power.dat.bak, finally upload the power.dat you downloaded before then boot the server everything seems to work fine. Seems the problem is when the server saves the power state when shutting down it puts something out of an array range and causes the error.
Just wanted to say love your mods btw and appreciate the work you do.
Can confirm still an issue reading power.dat after restart Note: If you remove power.dat.bak the server will still throw the error but does actually boot. So if you download the power.dat before you stop the server, stop the server, then delete both the power.dat and power.dat.bak, finally upload the power.dat you downloaded before then boot the server everything seems to work fine. Seems the problem is when the server saves the power state when shutting down it puts something out of an array range and causes the error.
Just wanted to say love your mods btw and appreciate the work you do.
I can confirm that backing up the power.dat file before shut down and adding it back before starting the server works. But it does leave problem of having to do it ever time and I'm not sure if it caused it or not, but all the items(solar cells, batteries, and ammo) in my power objects had gone poof.
When you use a backed up power.dat file you can still load but it will give this warring.
2024-01-12T11:16:02 142.183 WRN Failed to read Power Manager Save State 2024-01-12T11:16:02 142.183 WRN Falling back to read previous backup file 2024-01-12T11:16:02 142.206 WRN Error: System.IO.EndOfStreamException: Attempted to read past the end of the stream. at PooledBinaryReader.FillBuffer (System.Int32 _numBytes) [0x00030] in <477357009e7c466f9f1fa230d1b5570e>:0 at PooledBinaryReader.ReadString () [0x00049] in <477357009e7c466f9f1fa230d1b5570e>:0 at ItemValue.Read (System.IO.BinaryReader _br) [0x0006d] in <477357009e7c466f9f1fa230d1b5570e>:0 at ItemStack.Read (System.IO.BinaryReader _br) [0x00015] in <477357009e7c466f9f1fa230d1b5570e>:0 at GameUtils.ReadItemStack (System.IO.BinaryReader _br) [0x00012] in <477357009e7c466f9f1fa230d1b5570e>:0 at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00029] in <477357009e7c466f9f1fa230d1b5570e>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at (wrapper dynamic-method) PowerItem.DMD<PowerItem::read>(PowerItem,System.IO.BinaryReader,byte) at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <477357009e7c466f9f1fa230d1b5570e>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at (wrapper dynamic-method) PowerItem.DMD<PowerItem::read>(PowerItem,System.IO.BinaryReader,byte) at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <477357009e7c466f9f1fa230d1b5570e>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at (wrapper dynamic-method) PowerItem.DMD<PowerItem::read>(PowerItem,System.IO.BinaryReader,byte) at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <477357009e7c466f9f1fa230d1b5570e>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at (wrapper dynamic-method) PowerItem.DMD<PowerItem::read>(PowerItem,System.IO.BinaryReader,byte) at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <477357009e7c466f9f1fa230d1b5570e>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at (wrapper dynamic-method) PowerItem.DMD<PowerItem::read>(PowerItem,System.IO.BinaryReader,byte) at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <477357009e7c466f9f1fa230d1b5570e>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at (wrapper dynamic-method) PowerItem.DMD<PowerItem::read>(PowerItem,System.IO.BinaryReader,byte) at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <477357009e7c466f9f1fa230d1b5570e>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerManagerBase.Read (System.IO.BinaryReader br) [0x00036] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerManagerBase.LoadPowerManager () [0x00040] in <a597c321e96c411fb2d65f98d888381b>:0
There is no official A21 release yet!
There is no official A21 release yet!
While that might be, you have your code hosted on Github, and you've made a commit that indicates you're moving toward A21 compatibility. Being that you've done all of this, people are offering their time and energy to assisting in a full A21 release by testing what you have and offering feedback and crash reports as they can.
I know there are bugs, that's why I haven't cut a release yet :) In case you want to debug it yourself, feel free, but it's not meant for end users yet!
We understand this isn't released for the public. Some people like me just don't enjoy the game fully without your mod, so even though its buggy and not released I still am going to use it until you have the time to update it eventually! Please keep up the work and don't mind us here, were just reporting our findings so others like us may be able to play or figure something new out.
We understand this isn't released for the public. Some people like me just don't enjoy the game fully without your mod, so even though its buggy and not released I still am going to use it until you have the time to update it eventually! Please keep up the work and don't mind us here, were just reporting our findings so others like us may be able to play or figure something new out.
Thank you. You said everything I feel about this awesome mod. I did not make my first post to start drama. I knew and had fully understood this mod was not A21 ready. I had a problem and I saw someone else posted about it here with a "temp" fix. I only wanted to add that I too got it to work with the fix and give what little more insight I could to others and to the creator. I'm sorry to everyone that my updated post to this issue seemed to start drama, and sorry to the creator, I did not mean to make you feel pressured.
No drama from my side, just wanted to make it clear that it is not supported from my side. For the future (applies to any mod), if you really want to help, a bug report must include at least what steps you did, what versions you are running and most ideally a full logfile. Otherwise the reports are unfortunately not of much use to me. Thanks!
A player placed some power items on my server last night. This afternoon I had to restart the server machine itself. When trying to start the server back up, this error is encountered:
2023-09-29T16:27:04 90.637 WRN Failed to read Power Manager Save State 2023-09-29T16:27:04 90.637 WRN Falling back to read previous backup file 2023-09-29T16:27:04 90.646 WRN Error: System.IO.EndOfStreamException: Attempted to read past the end of the stream. at PooledBinaryReader.ReadByte () [0x00008] in <aa9c1f60dcc749c98d88a1474a3dbca4>:0 at ItemValue.Read (System.IO.BinaryReader _br) [0x00000] in <aa9c1f60dcc749c98d88a1474a3dbca4>:0 at ItemStack.Read (System.IO.BinaryReader _br) [0x00015] in <aa9c1f60dcc749c98d88a1474a3dbca4>:0 at GameUtils.ReadItemStack (System.IO.BinaryReader _br) [0x00012] in <aa9c1f60dcc749c98d88a1474a3dbca4>:0 at PowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00029] in <aa9c1f60dcc749c98d88a1474a3dbca4>:0 at OcbPowerSource.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerSolarPanelBase.read (System.IO.BinaryReader _br, System.Byte _version) [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerManagerBase.Read (System.IO.BinaryReader br) [0x00036] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerManagerBase.LoadPowerManager () [0x00040] in <a597c321e96c411fb2d65f98d888381b>:0 ArgumentException: An item with the same key has already been added. Key: -3950, 35, 831 at System.Collections.Generic.Dictionary
2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <03bd9b261dff4c2b8b568aca27f561b2>:0 at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <03bd9b261dff4c2b8b568aca27f561b2>:0 at PowerManagerBase.AddPowerNode (PowerItem node, PowerItem parent) [0x00046] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerManagerBase.Read (System.IO.BinaryReader br) [0x0003b] in <a597c321e96c411fb2d65f98d888381b>:0 at PowerManagerBase.LoadPowerManager () [0x000d4] in <a597c321e96c411fb2d65f98d888381b>:0 at OcbPowerManager.LoadPowerManager () [0x00000] in <a597c321e96c411fb2d65f98d888381b>:0 at (wrapper dynamic-method) GameManager+<StartAsServer>d__146.DMD<GameManager+<StartAsServer>d__146::MoveNext>(GameManager/<StartAsServer>d__146) at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <4bba812690714c578170328b4ec178d0>:0
Note: the mod worked fine until someone started placing power items and hooking them up.
Info from the logs about the server:
2023-09-29T16:25:34 0.812 INF Version: Alpha 21.1 (b16) Compatibility Version: Alpha 21.1, Build: WindowsPlayer 64 Bit 2023-09-29T16:25:34 0.814 INF System information: 2023-09-29T16:25:34 0.814 INF OS: Windows 10 (10.0.17763) 64bit 2023-09-29T16:25:34 0.815 INF CPU: Common KVM processor (cores: 4) 2023-09-29T16:25:34 0.815 INF RAM: 15999 MB 2023-09-29T16:25:34 0.815 INF GPU: Null Device (128 MB) 2023-09-29T16:25:34 0.822 INF Graphics API: NULL 1.0 [1.0] (shader level 5.0) 2023-09-29T16:25:34 0.822 INF Last played version: Alpha 21.1 2023-09-29T16:25:34 0.826 INF Local UTC offset: -5 hours
Note: Actually its Windows Server 2019 Datacenter.Removal of the mod allows the server to start successfully however any electricity item is broken beyond repair and requires restore from backup. Note: No other mods on the server that touch power are present with exception of a quick xml mod that allows the crafting of solar panels and cells.