Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[BUG] Server Crash When Attempting To Use Fluid Loaders

OCEAN02 opened this issue ยท 7 comments

commented

I'm using the Brigadier with 12 barrels to move fluids back and forth on my server, however whenever I get close (not underneath) to a fluid loader to load or unload, the server crashes. I have no issues using the fluid loader after the server restarts, but if I move to another one it happens again.

All the best.

crash-2020-11-12_14.05.26-server.txt

commented

Looks like the loader is trying to connect to a part that doesn't have a tank, and when it tries to load that tank it crashes. Will have to check to see why it's connecting in the first place...

commented

My setup on the loading side is just a TE portable tank connected to the fluid loader via fluiducts. Unloading side is also fluiducts going to a portable tank set to auto output to IE fluid pipes then to an IE fluid tank multiblock. I use an IE servo to pull the fluid out of the fluid loader.

commented

Er, the tank I meant is the tank on the vehicle, not in the world. So it's wholly on my side. I'll do my best to figure out why this issue is happening. I might be making a bad code assumption somewhere.

commented

Okay, I see what I think is the issue now. Turns out I search for tanks on vehicles if one gets out of range, but I don't check if I actually found a tank before trying to unload from it. Simple null check should fix that. Will have this patched in the next release.

//Don't fuel vehicles or parts that don't exist.
//Also check distance to make sure the part hasn't moved away.
if(!connectedPart.vehicle.isValid || !connectedPart.isValid || connectedPart.worldPos.distanceTo(position) > 10){
updateNearestPart();
}
//Do load or unload operations depending on our state.
if(unloadMode){

commented

Glad to here you found the issue, looking forward to playing the next build.

commented

Re-opening as the next build hasn't been dropped yet, and others might have this issue. If it's closed, then they won't have a status record.

commented

Fixed in V19.10.0.