Crash on server when getting into a vehicle
CreepCoder opened this issue · 37 comments
When entering a vehicle, a server-side crash occurs with the following error:
[20:50:26] [Client thread/FATAL] [minecraft/Minecraft]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_271] at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_271] at net.minecraft.util.Util.func_181617_a(Util.java:48) [h.class:?] at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1088) [bib.class:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) [bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_271] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_271] at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] Caused by: java.lang.NullPointerException at minecrafttransportsimulator.packets.components.APacketEntity.handle(APacketEntity.java:36) ~[APacketEntity.class:?] at mcinterface1122.InterfaceNetwork$WrapperHandler$1.run(InterfaceNetwork.java:146) ~[InterfaceNetwork$WrapperHandler$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_271] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_271] at net.minecraft.util.Util.func_181617_a(Util.java:47) ~[h.class:?] ... 17 more
This error keeps outputting several hundred times. On restarting, I am in the vehicle and everything seems to work normal. When I get out and try to get in again, the same problem occurs. I noticed before the crash that in the chat the following output is given:
[20:47:26] [Client thread/INFO] [minecraft/GuiNewChat]: [CHAT] IMMERSIVE VEHICLES ERROR: Tried to play a sound, but was told no sound slots were available. Some mod is taking up all the sound slots. Probabaly Immersive Railroading. Sound will not play.
Kind regards,
CreepCoder
Edit: needed to put it in a ZIP file, it was too large. There was no crash report, but the server just stopped as seen in the debug log I attached.
Can you give me your crash report file rather than a pasted wall O text? This smells like some mod conflict or something....
I'm suffering the same issue. here's a pastebin of my crash report
https://pastebin.com/x90aAZwG
Are you sure this is a server-sided crash? Because at the top of your crash report @CreepCoder I see [20:50:26] [Client thread/FATAL] [minecraft/Minecraft]: Error executing task
So that to me indicates it's a client crash. Same goes for the packet logs that say:
[20:34:52] [Client thread/FATAL] [net.minecraft.client.Minecraft]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
As to the sound log, that's not a big deal. Audio is its own system.
@mzldh that crash report looks incomplete. Could you upload the file?
I think so yes! I tested in singleplayer in this case, but the client doesn't crash, it's the internal server that just stops after these errors. I can try again to set it up in a dedicated server.
I added the debug log above. We tested a bit last night and we have found that if we run this mod only, there are no problems occurring. Previous version 18.2.0 worked perfectly fine in the same situation.
@CreepCoder could you try that? I'm pretty sure it's the client crashing based on the report, so if you do a dedicated server it should real-quick generate a crash report of proper type.
My forge version is 1.12.2-14.23.5.2854 and my mod version is Immersive+Vehicles-1.12.2-19.8.0. I'm using the latest issue of the Offical pack only. thanks!
@DonBruce64 You were right, my mistake. If I run it on a dedicated server, there are no problems according to the logs of the server. Although the client spits out errors about playing sounds, saying in the chat that there are no sound slots available. I think this is an issue with another mod perhaps. We didn't experience problems in an older version of the mod
@DonBruce64 heres a file of my crash report, and a screen shot of when I get into the vehicle.
crash-2020-11-09_02.53.08-client.txt
Also, because I have vanilla fix mod my game didn't crashed immediately, it just generated the crash log. However it appears that once I trigger this bug, my game will keep on playing the engine starting sound non stop even if the car is destroyed.
@mzldh Could I get a report with VanillaFix not installed? It seems to be "overriding" the normal crash logic, as it says Minecraft is crashing, not IV.
@CreepCoder so it's only on mounting/dismounting that this error occurs? All other vehicle controls work fine, yes?
@mzldh To me, that sounds like VanillaFix is crashing the game, not MTS. That being said, the sound issue is a problem. The notice says that no sound can be played, but the sounds don't go away, correct? Are you able to post a short video?
@DonBruce64 So I tried without Vanilla fix, and the game didn't crashed or generate any crash logs. however the error notice still generates in the chats, and the vehicle starting sound still plays on
@mzldh Could I get a report with VanillaFix not installed? It seems to be "overriding" the normal crash logic, as it says Minecraft is crashing, not IV.
@CreepCoder so it's only on mounting/dismounting that this error occurs? All other vehicle controls work fine, yes?
Correct. It's only a sound issue when entering a vehicle. You will hear the engine 'drive', even though the car is off and the sound will stay in one place. The rest of the controls and the mod seem to work fine, a very good job there! Physics are a lot better and opening and closing doors work perfectly.
@DonBruce64 We do not have immersive railroading installed
@CreepCoder Do you have Immersive Railroading installed? I think the sounds not playing, and the vehicles with sounds in one place may or may not be related. Want to isolate that.
@mzldh I see you have Immersive Railroading installed. If you un-install that mod, do you get the sound errors in the chat window still?
@CreepCoder sorry, getting my wires crossed here with both of y'all with similar problems, but not the same problems. Going to focus on yours. @mzldh, could you submit your own ticket so I can track that individually?
@CreepCoder Let me try and reset myself. You said the following:
- The crash does not occur when connected to a dedicated server.
- The crash does occur when running in singleplayer.
- The sound slot issue occurs in both in singleplayer and on a server.
Also, it might be quicker for you to join the Discord. Git is not the best for rapid debugging of issues where things need to happen one at a time. Also would allow me to have @gyrohero compile test builds while I'm out these following weeks.
No problem, I understand this is a hobby project, so no rushes! I would like to help through Discord, but what is your timezone? The three points you listed are correct.
CST, though I'll be on and off for the following few days. If you don't have a Discord then I can still do work though here. No worries.
Would like to see if we can take care of whatever mod is causing the sound slot issue first. Just so we can start with a clean slate. TheOneProbe, WAILA, and all other client enhancement mods should be the first to get culled for this task.
Sorry for the confusing info earlier, but do we have any feedback on this problem? Is there something we can do? Maybe try to run the client with certain mods disabled?
The one probe was the problem for some reason. once that's removed it's working fine
The one probe was the problem for some reason. once that's removed it's working fine
okay i can confirm this.
removing one probe seems to fix the issue. altho im not sure why "the one probe" causes the sound issues in the first place.
Odd, I've had folks use TOP fine in the past without this particular issue. Though it causes a lot of issues with MTS because it spawns vehicles willy-nilly in the world, and MTS gets confused as to which vehicle goes where. It might be that the code is trying to start the sounds on the vehicles TOP spawns and using up all the sound slots because of it. You said that you can hear the sounds of the vehicle, but that's it, correct? If you place down a second vehicle after you get all those errors the second vehicle doesn't play sounds?
correct
as soon as you get into the vehicle the sound gives an error and it keeps playing and never stops
the TOP issue seems to have started past 19.2 as that where i get errors when i get into the cars
im guessing its because of the model that is placed at the top of the screen ?
Yup. I had someone work with me for a few days on Discord for testing. We found that packets were being sent to the car up on the screen rather than the car in the world. So tires would appear on that car rather than the car in the world. My assumption is that TOP's car model is taking packets, and for some reason it's starting up sounds, but I'm not sure why, as I thought I patched that out in a prior version. Of course, in that version the sounds would all end up at 0,0,0, not at the vehicle.
Also, you said this is when you're getting into the vehicle. If you get into the vehicle, get a slew of errors and playing sounds, and then get into another vehicle, do any sounds play on the second vehicle? Can you even get that far without crashing?
@DonBruce64 For me it’s both. Once the one probe mod is removed it doesn’t crash or indicate the sound slot error.
I did some investigating with @stiderspace and if I'm not mistaken, removing TheOneProbe will fix the sound issues as well as (potential) crashes. Stiderspace is looking into TheOneProbe, what might be the cause of the problem. In the meantime, I could start looking for an alternative for TheOneProbe, if the problem lies in their mod.
Also, do you have simpleThrottle enabled?
i am not sure what simplethrottle is.
Yup. I had someone work with me for a few days on Discord for testing. We found that packets were being sent to the car up on the screen rather than the car in the world. So tires would appear on that car rather than the car in the world. My assumption is that TOP's car model is taking packets, and for some reason it's starting up sounds, but I'm not sure why, as I thought I patched that out in a prior version. Of course, in that version the sounds would all end up at 0,0,0, not at the vehicle.
Also, you said this is when you're getting into the vehicle. If you get into the vehicle, get a slew of errors and playing sounds, and then get into another vehicle, do any sounds play on the second vehicle? Can you even get that far without crashing?
yes when it only happens to me when i get into a vehicle that has an engine before that nothing happens.
i also noticed that the sound plays from very far away like more than 10 chunk or more away, also the sounds gets louder the closer to 0 0 0 you get
getting into an other vehicle doesnt start playing anything after the error has occured
i downloaded the source code and been looking thought the part that keeps giving the error from the first post. it seems like it keeps looping through like a whole bunch of seats when you exit them eventually either crashing the game or lagging it for a while.
okay tested more and it created about 1000 seats and looped though them all when you either got in or got out.
also checked one-probe how it renders its entity's. it seems to use createEntityFromNBT to render the entity in the top of your screen. so it actually does create an entity, but this entity is probably the exact same vehicle as the vehicle you are trying to enter or play a sound from. hens the sound slots being taken up and MTS sending null-pointers for trying to get into or out of a vehicle that doesn't exist according to the server side of minecraft.
at least this is what i think.
multiple different problems stemming from the same issue. you also said something about adding tires.
We found that packets were being sent to the car up on the screen rather than the car in the world. So tires would appear on that car rather than the car in the world.
this is probably coming from the same issue with one probe
@mzldh Can you test this version? I'm pretty sure it'll fix your issues. You'll have to change this from a zip to a jar as GitHub doesn't let me upload zips.
Immersive Vehicles-1.12.2-19.10.0-BETA25.zip
Did some testing with @stiderspace. The solution works perfectly! Thank you so much! We are looking forward to the release.