Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes PA voltage stack overflow on load #1027

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

sirjoekcb
Copy link
Contributor

What

A build from latest dev is causing a stack overflow on load, I think this is probably a result of the recent overclocking fixes.

java.lang.StackOverflowError: Ticking block entity
	at com.lowdragmc.lowdraglib.misc.ItemStackTransfer.getStackInSlot(ItemStackTransfer.java:69) ~[ldlib-forge-1.20.1-1.0.24.a.jar%231102!/:?] {re:classloading}
	at com.gregtechceu.gtceu.common.machine.multiblock.electric.ProcessingArrayMachine.getMachineDefinition(ProcessingArrayMachine.java:116) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.common.machine.multiblock.electric.ProcessingArrayMachine.getOverclockTier(ProcessingArrayMachine.java:179) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.api.machine.multiblock.TieredWorkableElectricMultiblockMachine.getOverclockVoltage(TieredWorkableElectricMultiblockMachine.java:60) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.common.machine.multiblock.electric.ProcessingArrayMachine.getMaxVoltage(ProcessingArrayMachine.java:196) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.common.machine.multiblock.electric.ProcessingArrayMachine.getOverclockTier(ProcessingArrayMachine.java:181) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.api.machine.multiblock.TieredWorkableElectricMultiblockMachine.getOverclockVoltage(TieredWorkableElectricMultiblockMachine.java:60) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.common.machine.multiblock.electric.ProcessingArrayMachine.getMaxVoltage(ProcessingArrayMachine.java:196) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.common.machine.multiblock.electric.ProcessingArrayMachine.getOverclockTier(ProcessingArrayMachine.java:181) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
	at com.gregtechceu.gtceu.api.machine.multiblock.TieredWorkableElectricMultiblockMachine.getOverclockVoltage(TieredWorkableElectricMultiblockMachine.java:60) ~[gtceu-1.20.1-1.1.4.jar%23755!/:?] {re:classloading}
...

Implementation Details

Removed overload for getMaxVoltage().

Outcome

I'm no longer getting the overflow, but I'm not 100% sure what the intended behavior for the PA is here. A quick test seemed right to me and since it's deprecated I'm not too worried about non game-breaking changes or I'd check in discord.

@sirjoekcb sirjoekcb requested a review from a team as a code owner March 28, 2024 09:28
@screret
Copy link
Member

screret commented Mar 28, 2024

does it still only OC up to the machine's tier?

@sirjoekcb
Copy link
Contributor Author

That's what it looked like, but it was an EV PA running HV electrolyzers with essentially random recipes so it wasn't really a structured test and I'm tired so maybe I did my math wrong. If you've got a better test in mind I can do it tomorrow if you haven't already tried it.

@screret
Copy link
Member

screret commented Mar 28, 2024

did it run the recipes with EV or HV speed?

@sirjoekcb
Copy link
Contributor Author

Yeah, it's running at HV or MV speed depending on parallelization. I did notice that the UI is saying max recipe tier is EV, but at least it's not processing EV recipes. That line was not in the UI in the previous build I was running.

@screret screret merged commit 40323c2 into GregTechCEu:1.20.1 Mar 29, 2024
1 check passed
screret pushed a commit that referenced this pull request Mar 30, 2024
screret added a commit that referenced this pull request Mar 30, 2024
* Port multi-amp energy hatches not giving overclocks. (#1009)

* port 1.12#2139, 1.12#1741

* run data

* fix crash

* requested change part 1

Co-authored-by: Mikerooni <[email protected]>

* requested changes part 2

---------

Co-authored-by: Mikerooni <[email protected]>

* Default predicated buttons to hidden, so buttons don't appear before checking their predicate (#1015)

* Fix bucket model (#1008) (#1014)

* Fix: processing array accepting multiblock machines  (#1013)

* fix: Enhance ProcessingArrayMachine no longer use MultiBlock machine controller.

* fix: Enhance ProcessingArrayMachine no longer use MultiBlock machine controller.

* Optimize access widener and convert to access transformer (#1012)

* fix fluid pipes converting an empty fluidstack to an (illegal) null (#1010)

* Ordered large distillery outputs (#1021)

Defaulted to distillation tower recipes instead of distillery
Require 1x output hatches

Co-authored-by: sirjoekcb <[email protected]>

* Wiremill Circuit Recipes (#1004)

* Wiremill Circuit Recipes

* Ported the 1.12.2 Wiremill Circuit recipes

* Keep wooden form in crafting table after recipe (#923)

* fix: always apply OC logic even if amount of OC is 0 so that pyrolyse oven penalties apply. (#1017)

* feat: make rubber saplings, leaves compostable (#1018)

* fix crash in case of somehow pathing air (#1019)

* NO, we DO want to keep the PA deprecated. (#1023)

* move to event for data loading so it shows up in datapack list (TURNS OUT THE SERVER DOESN'T CALL THIS WTF) (#1024)

* Allow the spray can to paint a chain of blocks at once (#1025)

* Allow the spray can to paint a chain of blocks at once

* Use MutableBlockPos for chain spray painting

* Changed return type of getDurabilityForDisplay from int to float (#1026)

* Fixes PA voltage stack overflow on load (#1027)

Co-authored-by: sirjoekcb <[email protected]>

* add ability to use block/fluid tags in multiblock patterns (#1030)

* update, update LDlib, changelog (#1031)

* update, update LDlib, changelog

* more changelog

* Grid UI in multiblock part switcher (#1032)

* feat: use a grid UI in the multiblock part switcher

* chore: version & changelog

* fix errors

* don't get resource from mod, return null instead.

---------

Co-authored-by: Mikerooni <[email protected]>
Co-authored-by: ctrlaltmilk <[email protected]>
Co-authored-by: Alendill <[email protected]>
Co-authored-by: sirjoekcb <[email protected]>
Co-authored-by: sirjoekcb <[email protected]>
Co-authored-by: Reclipse <[email protected]>
Co-authored-by: Maxim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants