Liquid Provider Pipe crashes when placed on ExtraCells Fluid Interface
ruifung opened this issue ยท 14 comments
Stack Trace:
2013-12-22 10:33:34 [INFO] [STDERR] net.minecraft.util.ReportedException: Ticking tile entity
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:674)
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:587)
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:129)
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)
2013-12-22 10:33:34 [INFO] [STDERR] Caused by: java.lang.NullPointerException
2013-12-22 10:33:34 [INFO] [STDERR] at logisticspipes.pipes.PipeFluidProvider.getSpecificInterests(PipeFluidProvider.java:163)
2013-12-22 10:33:34 [INFO] [STDERR] at logisticspipes.routing.ServerRouter.updateInterests(ServerRouter.java:868)
2013-12-22 10:33:34 [INFO] [STDERR] at logisticspipes.routing.ServerRouter.update(ServerRouter.java:763)
2013-12-22 10:33:34 [INFO] [STDERR] at logisticspipes.pipes.basic.CoreRoutedPipe.updateEntity(CoreRoutedPipe.java:358)
2013-12-22 10:33:34 [INFO] [STDERR] at buildcraft.transport.TileGenericPipe.func_70316_g(TileGenericPipe.java:178)
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.world.World.func_72939_s(World.java:2209)
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:550)
2013-12-22 10:33:34 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668)
2013-12-22 10:33:34 [INFO] [STDERR] ... 4 more
full crash:
http://hastebin.com/yupitukifi.coffee
the method crashing is, according to github, not active...
the tileentity of the fluid interface:
https://github.com/M3gaFr3ak/ExtraCells/blob/master/src/main/java/extracells/tile/TileEntityInterfaceFluid.java
Hopefully fixed by 55ad34f. Could you retest with dev build 83?
Test with dev build 83, it no longer crashes, but if I try to open a fluid request pipe when a provider is on a fluid interface, I get a internal server error.
Error:
https://gist.github.com/ruifung/b9a45de3a7b4614591b0
On a side note, does the fluid interface & fluid provider pipe work like the regular item interface / item provider pipe?
Ok 5532c26 should cover that now. Could you retest with dev build 84.
I haven't done anything with ExtraCells yet, so I can't tell you how fine it works. You would have to test that for yourself.
can you tell me what was the issue? did you forget a nullcheck or did i do sth wrong?
The array that was returned when asking for the TankInformation contained null values. Normaly I wouldn't suspect any nulls inside this type of array, because it is just used to return several tank information which don't have any order. But on the other hand there is nothing inside the documentation that says that the array can't contain null values. As always there probably is no right or wrong with this type of problem. I still suspect, that the null values inside the array weren't intended on your side. If so, I would recommmand you to check your code to figure out why the array contained null values.
uhm, if the direction (from) is ForgeDirection.UNKNOWN i return null, not an array w/ null in it. if its something else i return a TankInfo[] w/ index 0 being the tankinfor of the sided tank...
I return null because it occured to me many times that it was null, so i thought it was some kind of community standart xd... should i just return an empty []?
That's not the problem. The error clearly indicates that there is an array with an element "null"
new TankInfo[]{null}
The direction inserted is NOT Unknown. So there seems to be a bug.
For reference I added the null checks INSIDE the foreach loop: https://github.com/RS485/LogisticsPipes-Dev/blob/mc16/common/logisticspipes/pipes/PipeFluidProvider.java#L165
And regarding the UNKNOWN direction case, I personaly would recommand to return an empty array, to avoid any problems with other mods. If an array is requested an empty one is probably better than null.
ok, found the bug ;P
i had this:
FluidTankInfo[] tankInfos = new FluidTankInfo[6];
tankInfos[0] = tanks[from.ordinal()].getInfo();
return tankInfos;
it initialized an array w/ 6 places ( first i thought of all tanks) but it only gives it the sided tank (wanted sided tanks then)
so now it's:
return new FluidTankInfo[]
{ tanks[from.ordinal()].getInfo() };
when i push it to github :D
hehe meh, you've read it before i was able to find out about syntax highlighting in markdown :D
That's a question I would have to redirect to @ruifung.