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

apply0 crashes on function with inputs #11

Closed
met4000 opened this issue Jun 10, 2024 · 1 comment
Closed

apply0 crashes on function with inputs #11

met4000 opened this issue Jun 10, 2024 · 1 comment

Comments

@met4000
Copy link

met4000 commented Jun 10, 2024

Issue type:

  • 🐛 Bug

Short description:

apply0 on a function with inputs causes a crash.

Steps to reproduce the problem:

  1. Make a function with inputs and an output, e.g. function f(v) { return 1; }
  2. apply0 the function and put the output in a display panel
  3. Crashes, and upon adding/removing a cable after reloading the world (removing and re-inserting variable cards into displays doesn't crash and doesn't update display panels - I assume that behaviour is intentional to allow people to remove the bugged cards)

Expected behaviour:

An error instead of a crash.


Versions:

image

Log file:

---- Minecraft Crash Report ----
// Don't do that.

Time: [REDACTED]
Description: Exception in server tick loop

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at org.cyclops.integrateddynamics.core.evaluate.operator.OperatorBase$SafeVariablesGetter.getValue(OperatorBase.java:276) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.evaluate.OperatorBuilders.lambda$static$10(OperatorBuilders.java:204) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.evaluate.operator.IterativeFunction.evaluate(IterativeFunction.java:28) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.evaluate.operator.OperatorBase.evaluate(OperatorBase.java:214) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.evaluate.expression.LazyExpression.evaluate(LazyExpression.java:43) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.evaluate.expression.LazyExpression.getValue(LazyExpression.java:65) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.part.panel.PartTypePanelVariableDriven.update(PartTypePanelVariableDriven.java:129) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.part.panel.PartTypePanelVariableDriven.update(PartTypePanelVariableDriven.java:68) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.network.PartNetworkElement.update(PartNetworkElement.java:168) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.network.Network.update(Network.java:409) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.TickHandler.onTick(TickHandler.java:74) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading}
	at org.cyclops.integrateddynamics.core.__TickHandler_onTick_TickEvent.invoke(.dynamic) ~[IntegratedDynamics-1.20.1-1.22.0.jar%23167!/:1.22.0] {re:classloading,pl:eventbus:B}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.5.jar%2387!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%2387!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%2387!/:?] {}
	at net.minecraftforge.event.ForgeEventFactory.onPostServerTick(ForgeEventFactory.java:950) ~[forge-1.20.1-47.2.0-universal.jar%23177!/:?] {re:classloading}
	at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:835) ~[client-1.20.1-20230612.114412-srg.jar%23172!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23172!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23172!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23172!/:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:833) ~[?:?] {}
@met4000 met4000 changed the title apply0 crash on function with inputs apply0 crashes on function with inputs Jun 10, 2024
@rubensworks
Copy link
Member

Thanks for reporting!

rubensworks added a commit to CyclopsMC/IntegratedDynamics that referenced this issue Jun 23, 2024
@rubensworks rubensworks moved this to Done in Maintenance Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants