Chisels & Bits - For Fabric

Chisels & Bits - For Fabric

2M Downloads

Render Threads Delete Data Sent By Server

weeryan17 opened this issue ยท 16 comments

commented

So this was talked about in issue #118 but that was more for another problem with dynamic rendering so they are two separate issues. In this issue I'll be referring to "ghost blocks" witch are blocks indivisible to the client but the server thinks it is their. so ghost blocks have been a problem in vanilla minecraft for quite some time but it's never happened like chisel and bits blocks are doing. so we have a little bit of context for how vanilla ghost blocks work compared to the chisel and bits ghost blocks work I'll be going over vanilla ghost blocks and then chisel and bits ghost blocks.
Vanilla:

  • ghost blocks are created when the client digs blocks to fast or with weird piston behavior.
  • ghost blocks are removed when the player reloads the chunk.
  • ghost blocks are removed when the player right clicks on the block that is being ghosted
  • ghost blocks are removed when another block is placed inside of the ghost block and the ghost block is eater set back to the correct block or set to the new block. depending on if their is a block their and it looks like air or their isn't a block their and looks like a block.

Just for context chisel and bits ghost blocks appear as air but are actually chisel and bits blocks.
chisel and bits:

  • as far as I can tell ghost blocks are only created on world load
  • ghost blocks aren't removed on chunk reload
  • ghost blocks aren't removed when the player right clicks it. well in this case reset to the correct block
  • ghost block isn't reset when a player places another block in the space.
  • bits can be placed in the block.
  • when you remove the bit that you placed in the block it resets and duplicated the bit that was in that space you placed the bit (so a slow dupe bug)

All of these differences makes it seam that it is not just vanilla causing the problem like we discussed in issue #118
This issue has happened both when minecraft was lagged down and when it was running fine. I also have a video showing this effect.
It also could be a weird fore problem but i doubt it.

commented

Most of these differences are likely caused because of tile entity behavior.

For instance, the fact that the block doesn't show the chiseled block after placing a block is because MC has broken code for that, it doesn't send the tile entity data, it just sends the BlockState, which for a C&B Block is equivalent to a block full of air bits, and changing that would require a forge patch, this is actually easier to reproduce because you can do it with spawn protection ( since spawn protection fails to reset tileentitys client side in that case as well ).

That said I need some ideas for a way to reproduce this, since I've yet to see it in my testing, if you think your world would help for that then I guess lets go with that route, it worked reasonably for the other issue.


Are you sure your actuality getting a duplicated item? If the server knows there is a block there, it technically will just refuse to let you do anything, even though the client thinks it worked fine.

So the client says "Yes you place that bit" but the server should have said, "You didn't place that bit"

So if you log out/in the true state from the server should be revealed, and the server shouldn't be duping anything unless there is a dupe in the normal code for placing a bit inside of another bit. Which all in all should basically yield a negative result, not a positive.

commented

@AlgorithmX2 yes I am getting an actual duplicate item witch i also thought was weird. I don't know a good way to reproduce this and I doubt my world will help because the only this special about it is it has a lot of bits. as for a specific way to reproduce it I'd need to work on that I might be able to make an easy way to reproduce it.

commented

That's extremely weird,

I think that will be the biggest problem with trying to solve this issue.

I've had someone report one case of it back in 1.8.9, but since they couldn't reproduce it, and neither could I, I just let it go as a potential sync glitch in MC.

Since your having much better luck reproducing it it suggests that there is a way to cause, or at least increase the chances of running into it however.

However even setting my view range to max and jumping in and out of the world last night several times didn't produce any results.

commented

@AlgorithmX2 I'll get back to you when I'm able to reproduce it again. Things don't seam to break wen you want then to break.

commented

Software Dev Rule, Number 1, if something can go wrong, it will.
Rule Number 2, The second you try to show someone else whats wrong, it all works perfectly.


Alright let me know what you find.

commented

Not sure if related but I'm getting ghosting blocks as well at times. I was chiseling a block and ALL C&B blocks in the area disappeared. This was on a server and it sorted itself out after logging out and back on fwiw.

commented

@Utildayael I assume your probably still on 11.9? give 11.10 a go, I believe your issue is probably already fixed.

commented

Yes sir, 11.9. I'll update to 11.10 and give that a whirl.

Thanks!

commented

I'm pretty sure that this should fix it,
https://dl.dropboxusercontent.com/u/9117298/cb/anti-builds/chiselsandbits-12.0.0.jar

This was probobly one of the most painful bugs I've had in a while... This fix actually requires 1.10.2 So I guess I'll be officially moving to that now.

commented

@AlgorithmX2 ok turns out I'm stupid and it didn't duplicate.... anyways just having a lot of bit blocks close to each other seams to work for getting it to happen.

commented

How are you testing it? Just loading reloading?

How many times does the process take before you see an instance of the issue?

commented

@AlgorithmX2 re loading the world.
Also the amount it happens is random sometimes I'll load my world and everything it fine. The sometime 3 blocks right next to each other are missing.

commented

Well on average how many times does it take for you to reproduce the issue? 2-3 times? or something much larger, like say 30-40?

I'll have to try placing a lot more chiseled blocks in some normal pattern where its easy to recognize the missing blocks. So far I've not seen this issue in any of my test worlds that I know of.

commented

@AlgorithmX2 It usually happens about every 5 times. sometimes big delays then sometimes, and other right after another. it's very random.

commented

Well I haven't been able to get it to happen so it's probably fixed. good job. No clue how you finally found the problem but as long as it's fixed it doesn't really matter.

commented

It was quite the ordeal.... Which boiled down to 2-3 hours of trying to work up a test to "detect and pause on the on the issue".

Once I got that I had to keep testing for another 2-3 hours to find all the places where in the code that were causing the corruption.. and as Time went on it became harder and harder to reproduce ( cause less things where causing it. )

I'm happy your not getting it anymore, cause that was not fun XD