makamys / Neodymium

Reimplements chunk rendering using modern OpenGL features to improve performance (1.7.10)
Other
113 stars 9 forks source link

Disappearing pipe with GT6 #29

Open Abalieno opened 9 months ago

Abalieno commented 9 months ago

Since you seem back working on Coretweaks, maybe you look here too.

Bear found a weird bug that seems related to Neodymium and maybe interaction with Archaicfix as well, in case it seems to affect something with chunk loading.

Only have a video: https://youtube.com/live/gmQLzJ4VNRA

Around minute 44 At 49:06 he reloads and the pipe is there. Then goes through the Nether once and the problem is back.

SilearFlare commented 9 months ago

I've had that happen before a few times, yes. I simply assumed it to be a GT6 bug to be fair. Can confirm that moving to another dimension/reloading the world/etc fixes the issue. Also it happens to all GT tile entities, not only pipes.

Abalieno commented 9 months ago

In this case going to the Nether and back CREATES the issue. And removing neodymium jar fixed it.

Considering that Bear has played GT6 for years, no, it doesn't just happen.

SilearFlare commented 9 months ago

shrugs I've been playing gt6 for years as well, and I can tell you more often than not, it's more of a matter of never really reporting bugs you find honestly, when this kind of thing happens. Just a few days back I found an issue with rainwater basically deleteing all items inside a crucible well below its contents vaporization point, for example. Still no clue why that happens, and still have to report to anyone yet. For the matter, in my case, going into the nether does not cause this problem. Still, in any case, Yes, it's related to something in neodymium. I personally had it happen in the overworld randomly and, as I said, fixed it by jumping into the nether. It seems to affect almost all tile entities, if I remember correctly, not even just greg's, because I do remember drawers disappearing as well. It's a bit of a weird visual glitch. It's a minor annoyance at best, understanding what it might be creating this problem might be more of a hassle than actually trying to fix it. Who knows.

Abalieno commented 9 months ago

In the case of the bug in the video, the pipe not rendering also seems to cause it to stop working.

SilearFlare commented 9 months ago

Finally managed to reproduce the issue, entirely by accident, I might add, while doing something else. What happened was that all Greg's bushes disappeared in a chunk, for reasons unspecified. This is how it looks in the beginning mpv-shot0001

and this is how it looks afterwards when the bug occurs. mpv-shot0002

Again, switching dimensions or reloading the world fixes the issue. Only thing I can think of that I might have done to trigger this would be actually upping the number of chunk updates in optifine's performance tab for a bit to make the world load faster. In any case, it's not just pipes, it's all of greg's tile entities in a single chunk.

makamys commented 9 months ago

No idea how this is possible, Neodymium only touches chunk rendering, it shouldn't physically affect blocks. It's possible that this is caused by some other mod and removing Neodymium fixing it was only a coincidence, but who knows. It could also be some strange interaction with GT6 code.

One thing that could help is if I got a log from a run where the issue happened. (Forge keeps the debug logs of the previous three runs around as fml-client-X.log, so if you're lucky it might still be there.)

Also, the pack Bear was using is this one, right? (Uploaded at 2023-10-02 01:52.) I might have to use it as reference.

SilearFlare commented 9 months ago

Yeah honestly I still think it might just be weird gt6 fuckery, it's especially complicated to reproduce really. This was from today, so if you feel like trying to find a needle in a haystack, the solution might be here. fml-client-latest.log

Only issue is that this happened before :15 (I know this because I wrote that message at :14) and other than a bunch of messages from Matmos from the start of the world to :15 I can't really find any crash logs of any kind at a glance, even though the issue is right there. I mean, if the damn thing is silent too it's just too much of a PITA to even bother really.

makamys commented 9 months ago

Yeah, I can't see anything either. (Also I really need to make MAtmos less spammy lol)

Alex-1248 commented 8 months ago

I saw a similar problem, although it was not related to Neodymium. There is a mod called WarpDrive, which makes it possible to build spaceships that move through teleportation. When I put Fire Bricks from GT6 on such a ship and teleport, something very similar to what I see in the video always happens to the Fire Bricks. That is, Fire Bricks becomes invisible. When I try to walk through it, it shakes instead of stopping normally (I think I see the same thing in the video at 44:20, but I'm not sure). Fire Bricks return to normal if I reload the world or if I go a long distance and return. Installing and uninstalling Neodymium has no apparent effect on this issue.

SilearFlare commented 8 months ago

Yep, that's the same bug. I think between the fact I couldn't find anything about it in the logs, and multiple reports of it being mostly being unrelated to neodymium and more of a gt6 thing, it might just be a weird rendering glitch related to GT. Honestly, these bugs are just really weird to assess, but for the most part Bear will probably either live with it or remove neodymium: if it happens again without Nd then we'll end up knowing more.

GregoriusT commented 8 months ago

Just a few days back I found an issue with rainwater basically deleteing all items inside a crucible well below its contents vaporization point, for example. Still no clue why that happens, and still have to report to anyone yet. The Water vaporizes, likely taking everything else with it.

It seems to affect almost all tile entities, if I remember correctly, not even just greg's, because I do remember drawers disappearing as well. It's a bit of a weird visual glitch. Weird, GT6 uses ISBRH, Drawers afaik uses TESR, so it is not rendering that gets screwed.

It must be Network Code that somehow gets ignored. Because my initial Network Packet is what gives the Client the Information on what my "Universal Block" is, without it, it will just be invisible since it has nothing to render.

Here is what triggers GT6 TileEntities to send their Data over.

@SubscribeEvent
public void onChunkWatchEvent(ChunkWatchEvent.Watch aEvent) {
    Chunk tChunk = aEvent.player.worldObj.getChunkFromChunkCoords(aEvent.chunk.chunkXPos, aEvent.chunk.chunkZPos);
    if (tChunk != null && tChunk.isTerrainPopulated) {
        byte tIterations = 8;
        HashSetNoNulls<Object> tSet = new HashSetNoNulls<>();
        while (tIterations-->0) try {
            for (Object tTileEntity : tChunk.chunkTileEntityMap.values()) if (tTileEntity instanceof ITileEntitySynchronising) if (tSet.add(tTileEntity)) ((ITileEntitySynchronising)tTileEntity).sendUpdateToPlayer(aEvent.player);
            tIterations = 0;
        } catch(ConcurrentModificationException e) {
            if (tIterations <= 0) ERR.println("Failed to Iterate 8 times. Giving up on sending Data to Client!");
        }
    }
}

And yes there is an Error Message being printed out for CME's, that will go to the gregtech.log File if it happens, HOWEVER there was supposedly no Error in there when Bear tested that Issue, so we can possibly rule that out.

Edit: Weirdly enough when Bear tried to connect a Pipe to an invisible Pipe, that connection was onesided SOMEHOW, as if the invisible pipe decided to not store the change that was made upon it, so there might be even worse TileEntity fuckery afoot if somethign as simple as a Pipe Connection which is "Serverside" does not get saved at all.

SilearFlare commented 8 months ago

I would have to do another check to say for sure (which is complicated since we do not know what is triggering the bug in the first place), but I think I could possibly confirm drawers weren't disappearing, only GT6 tile entities which just happened to be next to drawers in that chunk. It has been a year and change since it happened and small details like that escape me easily. I supose the most reliable way would be what Alex said, to try to use GT6 tile entities with the mod Warp Drive, and try to teleport.

While we're at it, the iron vaporizing alongside water thing, it's a bug, right? Should I open an issue? I've got a webm of it as it happens, if it helps.

GregoriusT commented 8 months ago

The Warp Drive thing is an obvious case of "thing has been moved as is and it is a non-ticking tileentity so it cant check coordinate validity by itself".

This neodymium thing is actually different somehow as it impedes the functionality of Machines "Serverside" too.

As for the Crucible deleting its Content when something vaporizes, technically only the water should vaporize, are you sure the rest does too? Also are you sure you want the Crucible to be outside in the Rain where it can cause Damage to you?

SilearFlare commented 8 months ago

As for the Crucible deleting its Content when something vaporizes, technically only the water should vaporize, are you sure the rest does too? Also are you sure you want the Crucible to be outside in the Rain where it can cause Damage to you?

Yes, I can confirm that happening. Thing is, someone relied the issue to me, that's how I got the webm. Here is someone pouring a few ingots of tin in the pouring rain with a sensor attached. 1697141266256.webm

Tin should only vaporize at 2875K, but clearly here it is shown to disappear alongside the rainwater at roughly 850K, for some reason. Considering the boiling point of water is 373 K, something weird is definitely happening in here. This is just a visual example, as the original story I've been told by the was that the man was smelting 15 ingots of iron, and the moment it started raining the iron got washed away as well.

Personally I disable weather in my modpack in the first place for other reasons so I never have that issue, but in any case, this seems like a pretty big issue in any case.

Abalieno commented 7 months ago

I couldn't reproduce after reloading the save, and hard to say why it happens since this is a larger modpack, but...

2023-11-23_06 23 03

May be unrelated to GT6, but I have no idea.

(this loaded fine, I walked up to the top, came back down, after I got out it disappeared like that, and I wasn't able to have it back. After reloading the save it was working correctly again)

GregoriusT commented 7 months ago

Yeah I would like to know where either my mistake or neodymiums mistake are for this weird Issue.

(also about the issue that has hijacked this: I tried melting Iron in a Crucible that is subjected to Rain, the Iron stayed, the Rain caused a burst of Heat Damage, so I cant reproduce the Issue on my end somehow)