Draconic Evolution

Draconic Evolution

77M Downloads

[1.10.2-2.0.0.101] Energy core stopped accepting energy after working fine for a long time

RealGrep opened this issue ยท 12 comments

commented

Description

My energy core was working just fine for over a week. It's a tier 7, and it was full, and energy was flowing through it correctly. Today, I noticed that it read 0 RF/t gain/loss and that it was 100% and at 2.14T RF in the GUI. However, OpenComputers reports it was losing power and below 100% full. The two disagree.

The ingoing energy pylon is not showing energy flowing into the core, though the output pylon is showing outgoing energy. Both are set correctly for input and output, and I've broken and replaced the input quantum entangloporter and reset it a few times. Same for the pylons, glass, etc. I've attached a RFTools powercell as a test, and the core will not pull from it. I've deactivated and reactivated the core, even broken a block and replaced it. It continues to read that it is full if I right click a stabilizer, but it is clearly not.

It seems to me that it is not accepting power because part of the code thinks it is completely full. Obviously the part that deals with OpenComputers has the right data since it shows outgoing energy flow and less than 100% stored.

This might be rather difficult to replicate. As I said, it's been working perfectly for over a week. A server restart also failed to fix the issue, BTW. But hopefully you can figure it out from the clues I gave.

Base information

  • Minecraft version: 1.10.2
  • Minecraft Forge version: 2095
  • Draconic Evolution version: 2.0.0.101
    Also, BrandonCore version: 2.1.0.46

Mod List or Mod Pack (include version)

It's my own as yet unreleased pack. However, this is the input file I used to build the manifest. In CSV format, the fields are: Name, Curse mod ID, Curse file ID. All are the latest versions as of now, except Baubles.

https://www.dropbox.com/s/b8nc869qwrjzkh9/ModList%20%28Case%20Conflict%29.txt?dl=0

Crash report

It has not crashed, nor is there anything that seems to help in the server log, but because I'm not one of "those people", here's the log file. :)

https://www.dropbox.com/s/hsrf9aarbwmein8/fml-server-latest_FORDE.log?dl=0

Thanks for making one of my all time favourite mods! Let me know if there's anything else I can do, and sorry for bringing up an issue which might be tough to replicate. I hate those! <3

commented

Its very odd... If you disconnect the input dose the core drain?
I have not been able to recreate the issue so far. https://puu.sh/rC5Cm/f1e5abb215.png
Also RFTools used the RF API to read the energy stored which has a cap of MAX_INT but the t7 energy core holds much more than max int so the value you get will never be higher than max int. Thats why i added CC/OC support.

commented

This is the program i use if you want to give it a try https://puu.sh/rC5Uz/f1475af70e.lua
I just made it for a quick demo so its not the best. Its meant for a 3x1 monitor.

commented

Wonderful, I appear to have corrupted my world when updating things and removing Railcraft. Figured since it was the one new mod that maybe it was doing something funky. I believe updating ElecCore before Deep Resonance and such have also updated to match broke my world file quite thoroughly. Backup from yesterday seems to be fine, at least. Yay for backups, right?

However, guess what else is working fine now. Of course, Railcraft is gone, but it's likely innocent anyway. It was working fine yesterday, after all. I guess I'll let you know if it breaks again. :/

I just can't win today, can I? Perhaps it's one of those days where I should just curl up into a ball and wait for tomorrow. lol

Well, thanks for the help. I appreciate it. Hopefully it was either a problem in the world and not your code and it will work now, or at least will happen again if there's really an issue in the code.

EDIT: Thanks for the program! It looks nicer than mine. :)

commented

lol well good luck. And yea whenever i play minecraft for real i have automatic hourly backups because #BacjupsAreloveBackupsAreLife lol

commented

Well, it started again, right after this crash (and if you have a clue how the heck I can figure out the source, please do share!):

https://www.dropbox.com/s/o1ttwubupal5148/crash-2016-10-08_19.33.11-server.txt?dl=0

When I restarted, it began acting up again. I also had to mess with the EIO capacitor for it to start passing power again. The issue isn't specific to DE. There's something funky going on. I need to solve it and find the source, but I'm at a loss.

Anyway, I don't think it's your problem at all, but something more general. I thought it would be good to let you know this new information on the issue. I'd be delighted if you had a hint on how to figure it out, but it's really not your problem, I don't think, so no worries. <3

commented

Hmm... Very odd... The energy value is stored in a single field in the core which everything accesses so if the gui says its full then it should be full. It calculates the transfer in the gui by checking the storage over the last second and figuring out how much it has changed so if the input is greater or equal to the output the energy flow meter in the gui will always read 0.

Dose your OC program use the energy core API to check the energy flow? of it dose it should also read 0. But if your using some sort of flow meter from another mod it would tell you how much energy is being extracted.

You should be able to test the input using an EnderIO capacitor just remember the core dose not "pull" energy so you would just have to set the capacitor to output to the pylon or use a conduit in between.

Also would you mind showing me your OC program?

commented

Yeah, it's just using the CC API through OC. A EIO OC conduit is connected to an OC adapter, and that is connected to the outgoing pylon. My Extreme Reactors program (port of Direwolf20's program to OC) shows the same values. I'll try a EIO capacitor as well, though there are also no particles showing flow into the core. As for the OC program, nothing fancy or particularly long. It is:

local component = require("component")
local term = require("term")

local core = component.draconic_rf_storage

maxEnergy = core.getMaxEnergyStored()
energy = core.getEnergyStored()

function abbrNumber(num)
  local output = string.format("%.3f", num)
  abbr_val = {1000000000000, 1000000000, 1000000, 1000}
  abbr = {"T", "G", "M", "k"}

  for i = 1,4 do
    if num >= abbr_val[i] then
      x = num / abbr_val[i]
      output = string.format("%.3f", x) .. abbr[i]
      break
    end
  end
  return output
end

--print(abbrNumber(1234, 2))
--print(energy .. "/" .. maxEnergy)

local gpu = term.gpu()
x, y = gpu.getResolution()
--print("Resolution: " .. x .. " " .. y)
gpu.setResolution(80, 25)

term.clear()
local last_energy = core.getEnergyStored()
os.sleep(1)

while true do
  term.setCursor(20, 10)
  term.clearLine()
  term.setCursor(20, 10)

  energy = core.getEnergyStored()
  percent = energy / maxEnergy * 100.0

  term.write("Core energy (RF): " .. abbrNumber(energy) .. " / " .. abbrNumber(maxEnergy) .. "  (" .. string.format("%.2f", percent) .. "%)")

  change = (energy - last_energy) / 20
  term.setCursor(20, 11)
  term.clearLine()
  term.setCursor(20, 11)
  if change >= 0 then
    gpu.setForeground(0x00FF00)
  else
    gpu.setForeground(0xFF00FF)
  end
  term.write("     Change (RF): " .. abbrNumber(change) .. " RF/tick")
  gpu.setForeground(0xFFFFFF)

  last_energy = energy
  os.sleep(1)
end

EDIT: I should mention the Quantum Entangloporter is set to eject energy (and has worked for a while in that configuration).

commented

Hmm... That program looks fine although you can replace your transfer calculation with core.getTransferPerTick() (let me know if that changes the transfer rate to 0)

How much energy dose the computer say is stored?

commented

Ok, set it up as Engangloporter->EIO Capacitor->Ingoing pylon and made sure to configure all the sides. The EIO capacitor filled up completely, but nothing is flowing in, still.

The computer says it's at 99.96% or 2.139T with, currently, a flow of -5904.5 RF/tick. And yes, with the use of core.getTransferPerTick() it now reads 0 transfer rate. The core was maxed, so it clearly has lost and is losing power (no worries, it'll last a while. lol). The calculation using the core energy directly still reads about -5770 RF/t at the moment. Power is being drained, for sure. I even see particles flowing from the core to the outgoing pylon, but the GUI still shows full and 0 RF/t transfer.

Another EDIT: I removed the abbreviation of the energy stored and I can see the current energy steadily dropping.

commented

Ok while the capacitor is connected disconnect its input and see if it drains into the core. It may be filling faster than it can drain. Also while energy is flowing through the core it may never read exactly 100% try disconnecting the output and see if it goes to 100%.

commented

EIO capacitor is remaining full. Disconnecting the output entangloporter stops the outgoing particles flowing to the outgoing pylon. The core energy displayed by the OC program has stopped dropping, as has my calculated RF/tick which now reads 0 RF/tick. The energy reads less than full in OC, but full in the core GUI. (To be clear, hovering over the energy bar in the GUI that shows the full energy number shows 2,140,000,000,000 RF)

commented

I wrote a quickie RFTools control program to read and print the energy, as well. It reads 2147483647. Which would be MAX_INT, so it thinks it's full as well, I guess. Oddly though, the OC value is the only one that makes sense. This is definitely a weird one. If it's stored in one place and everything accesses it, then how the heck is this even possible! lol