SuperMartijn642 / MovingElevators

19 stars 15 forks source link

[Crash] Client constantly randomly crashing on server due to mod causing 'Code Explosion'. (Does it look like I know what that means?) #210

Closed Zenvian closed 4 months ago

Zenvian commented 4 months ago

Version Info

Are you using OptiFine?: No.

Steps to Reproduce Literally doing anything involving loading chunks old or new. Happens at my base and out in the middle of nowhere too. (I cannot find a specific action that causes it, it just dies on me.) ...

Crash report (~/logs/latest.log) ... hs_err_pid15892.log hs_err_pid15892.log

SuperMartijn642 commented 4 months ago

That's a jvm crash, which is not something you'd normally cause through program flow. I also haven't had any crash reports like this while Moving Elevators' rendering hasn't changed for quite a while.

My guess is that this is caused by some other mod you have installed. Could you narrow down which mods are needed to reproduce the issue?

Zenvian commented 4 months ago

hs_err_pid1048.log

It's a modpack.

56857 C2 com.supermartijn642.movingelevators.elevator.ElevatorGroupRenderer.renderBlocks(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/RenderType;Lnet/minecraft/client/renderer/IRenderTypeBuffer;)V (166 bytes) @ 0x00000242c93df454 [0x00000242c93df1e0+0x274]

Look for this.

SuperMartijn642 commented 4 months ago

Okay...

That's a jvm crash, which is not something you'd normally cause through program flow. I also haven't had any crash reports like this while Moving Elevators' rendering hasn't changed for quite a while.

My guess is that this is caused by some other mod you have installed. Could you narrow down which mods are needed to reproduce the issue?

Zenvian commented 4 months ago

latest.log

Zenvian commented 4 months ago

(Sorry I opened Minecraft and realized I had to wait for it to crash again to post)

SuperMartijn642 commented 4 months ago

Wut, did you read what I said?

My guess is that this is caused by some other mod you have installed. Could you narrow down which mods are needed to reproduce the issue?

I get that there's a crash involving Moving Elevators. I don't need more logs. The crash is likely caused by a combination with some other mod you have as Moving Elevators works fine on its own and I haven't had any reports like this. Could you narrow down what other mods are needed to reproduce the issue?

Zenvian commented 4 months ago

Masters of Time And Engineering Modpack. To replicate the crash isn't possible as it seems to happen randomly.

Zenvian commented 4 months ago

https://www.curseforge.com/minecraft/modpacks/masters-of-engineering-and-time

I don't even alter anything.

I use Prizm and just port it using the import from Curseforge feature. Happens in newer chunks, happens in old chunks and I can never seem to figure out what is making it suddenly shut my game down... notably seems to happen when I'm near something from Mekanism but its so random I can spend hours at a factorio style Mekanism factory. I teleport away and back and then 5 mins into working on it again (returning to same place) it will then crash for no reason (I have done this multiple times without it crashing). I can only guess it's because I spend massive chunks of my time there.

Initially happened a LOT while using my 'Digital Miner' with my flux point but other than that I can never tell what it is. Has happened simply by jumping into water once, so I am puzzled as to how to recreate it. Booting up the game just means it will or won't take time for it to happen again.

At this point I'm just convinced it's somehow when someone uses an elevator globally on the server and whenever they use it, I crash.

Zenvian commented 4 months ago

Dude look, the problem isn't other mods. I think and other people have also said that the way you have implemented the mod needs improving. It is prone to this behaviour and it is clear that debugging it like this isn't going to help you.

You need to go over your entire code again, improve it and fix what is causing this code explosion. I'm trying to be polite here, but I cannot help you beyond this and the people I have asked about this who, unlike me, actually understand Java code just say your code needs to be redone.

I hope you can make changes from here.

SuperMartijn642 commented 4 months ago

The crash you are experiencing is a jvm crash. A jvm crash isn't caused by regular program flow. Since it occurs during the rendering of the elevators, it is likely caused by something OpenGL related. Any mod which does custom in world rendering will have an affect on that. If you can reproduce the crash with just Moving Elevators installed, sure, let me know, but it is likely caused by a combination with some other mod you have installed.

other people have also said that the way you have implemented the mod needs improving

Who says so? What exactly needs to improved?

It is prone to this behaviour

How so, you are the only one to have reported an issue like this.

You need to go over your entire code again, improve it and fix what is causing this code explosion. I have asked about this who, unlike me, actually understand Java code just say your code needs to be redone.

Then what needs to be improved? If something is wrong with my code then explain what. Just 'yeah your code is bad, just redo the mod' is just dumb.

Zenvian commented 4 months ago

Dude, I have given you so many logs and I showed a specific part of where that problem appears. I have even shown you the whole modpack we use and I have shown you right here:

56857 C2 com.supermartijn642.movingelevators.elevator.ElevatorGroupRenderer.renderBlocks(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/RenderType;Lnet/minecraft/client/renderer/IRenderTypeBuffer;)V (166 bytes) @ 0x00000242c93df454 [0x00000242c93df1e0+0x274]

This is the exact problem. I try and ask the others to explain to me what is specifically wrong with your code, with the logs. This is what they have sent me. YOU need to fix that as the author of the mod. It is not possible to get a more precise answer.

Also apparently you HAVE had a report like this? It's "the one directly above with the same problem lol"?

Extra logs: hs_err_pid9108.log latest.log

SuperMartijn642 commented 4 months ago

This is the exact problem.

That is simply a method call. That is supposed to be there. I have to someone do stuff. You cannot program without calling methods. You seem to keep showing that part as if that is somehow a problem.

Let's give an example as to why I can't solve it from just this: Some mod mixes into Minecraft world rendering code somewhere before where Moving Elevators renders the elevator. They submit incomplete vertices, they bind a buffer and forget to unbind it, or just do something incorrectly OpenGL related. Now Moving Elevators starts rendering. Moving Elevators' requests a buffer for the current render type. When handling this request, Minecraft sees there is still an undrawn buffer waiting and thus draws that first. Since the mod previously rendering did something wrong OpenGL related, OpenGL throws an error and causes a jvm crash. In this case, there is nothing wrong with Moving Elevators and it is caused by some other mod. Without Moving Elevators there just might not have been anything rendered after and whatever the original mod does incorrectly never leads to an actual crash.

Also apparently you HAVE had a report like this? It's "the one directly above with the same problem lol"?

Wut?

Zenvian commented 4 months ago

Ok it turns out that this is all because some other mod 'too many crashes' disrupts crash reports at a maybe.